generated-configure.sh revision 2024:cc16e2a24f94
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649TEST_JOBS
650JOBS
651MEMORY_SIZE
652NUM_CORES
653ENABLE_INTREE_EC
654JVM_VARIANT_CORE
655JVM_VARIANT_ZEROSHARK
656JVM_VARIANT_ZERO
657JVM_VARIANT_HOTSPOT
658JVM_VARIANT_MINIMAL1
659JVM_VARIANT_CLIENT
660JVM_VARIANT_SERVER
661JVM_VARIANTS_COMMA
662TEST_IN_BUILD
663HOTSPOT_MAKE_ARGS
664MACOSX_UNIVERSAL
665DEBUG_CLASSFILES
666FASTDEBUG
667VARIANT
668USE_NEW_HOTSPOT_BUILD
669LIBZIP_CAN_USE_MMAP
670LIBDL
671LIBM
672USE_EXTERNAL_LCMS
673LCMS_LIBS
674LCMS_CFLAGS
675USE_EXTERNAL_LIBZ
676USE_EXTERNAL_LIBPNG
677PNG_LIBS
678PNG_CFLAGS
679USE_EXTERNAL_LIBGIF
680USE_EXTERNAL_LIBJPEG
681LLVM_LIBS
682LLVM_LDFLAGS
683LLVM_CFLAGS
684LLVM_CONFIG
685LIBFFI_LIBS
686LIBFFI_CFLAGS
687ALSA_LIBS
688ALSA_CFLAGS
689FREETYPE_BUNDLE_LIB_PATH
690FREETYPE_LIBS
691FREETYPE_CFLAGS
692CUPS_CFLAGS
693X_EXTRA_LIBS
694X_LIBS
695X_PRE_LIBS
696X_CFLAGS
697XMKMF
698MSVCP_DLL
699MSVCR_DLL
700LIBCXX
701STATIC_CXX_SETTING
702FIXPATH_DETACH_FLAG
703FIXPATH
704VALID_JVM_FEATURES
705JVM_FEATURES_custom
706JVM_FEATURES_zeroshark
707JVM_FEATURES_zero
708JVM_FEATURES_minimal
709JVM_FEATURES_core
710JVM_FEATURES_client
711JVM_FEATURES_server
712INCLUDE_DTRACE
713GCOV_ENABLED
714STRIP_POLICY
715DEBUG_BINARIES
716ZIP_EXTERNAL_DEBUG_SYMBOLS
717COPY_DEBUG_SYMBOLS
718COMPILE_WITH_DEBUG_SYMBOLS
719CFLAGS_WARNINGS_ARE_ERRORS
720BUILD_CC_DISABLE_WARNING_PREFIX
721DISABLE_WARNING_PREFIX
722HOTSPOT_SET_WARNINGS_AS_ERRORS
723WARNINGS_AS_ERRORS
724COMPILER_SUPPORTS_TARGET_BITS_FLAG
725ZERO_ARCHFLAG
726LDFLAGS_TESTEXE
727LDFLAGS_TESTLIB
728CXXFLAGS_TESTEXE
729CXXFLAGS_TESTLIB
730CFLAGS_TESTEXE
731CFLAGS_TESTLIB
732OPENJDK_BUILD_JVM_LIBS
733OPENJDK_BUILD_JVM_ASFLAGS
734OPENJDK_BUILD_JVM_LDFLAGS
735OPENJDK_BUILD_JVM_CFLAGS
736OPENJDK_BUILD_LDFLAGS_HASH_STYLE
737OPENJDK_BUILD_LDFLAGS_CXX_JDK
738OPENJDK_BUILD_JDKEXE_LIBS
739OPENJDK_BUILD_JDKLIB_LIBS
740OPENJDK_BUILD_LDFLAGS_JDKEXE
741OPENJDK_BUILD_LDFLAGS_JDKLIB
742OPENJDK_BUILD_CXXFLAGS_JDKEXE
743OPENJDK_BUILD_CXXFLAGS_JDKLIB
744OPENJDK_BUILD_CFLAGS_JDKEXE
745OPENJDK_BUILD_CFLAGS_JDKLIB
746OPENJDK_BUILD_CXXSTD_CXXFLAG
747JVM_LIBS
748JVM_ASFLAGS
749JVM_LDFLAGS
750JVM_CFLAGS
751LDFLAGS_HASH_STYLE
752LDFLAGS_CXX_JDK
753JDKEXE_LIBS
754JDKLIB_LIBS
755LDFLAGS_JDKEXE
756LDFLAGS_JDKLIB
757CXXFLAGS_JDKEXE
758CXXFLAGS_JDKLIB
759CFLAGS_JDKEXE
760CFLAGS_JDKLIB
761MACOSX_VERSION_MIN
762NO_LIFETIME_DSE_CFLAG
763NO_NULL_POINTER_CHECK_CFLAG
764CXXSTD_CXXFLAG
765CXX_O_FLAG_SIZE
766CXX_O_FLAG_NONE
767CXX_O_FLAG_DEBUG
768CXX_O_FLAG_NORM
769CXX_O_FLAG_HI
770CXX_O_FLAG_HIGHEST
771CXX_O_FLAG_HIGHEST_JVM
772C_O_FLAG_SIZE
773C_O_FLAG_NONE
774C_O_FLAG_DEBUG
775C_O_FLAG_NORM
776C_O_FLAG_HI
777C_O_FLAG_HIGHEST
778C_O_FLAG_HIGHEST_JVM
779JVM_CFLAGS_SYMBOLS
780CXXFLAGS_DEBUG_SYMBOLS
781CFLAGS_DEBUG_SYMBOLS
782CXX_FLAG_DEPS
783C_FLAG_DEPS
784SHARED_LIBRARY_FLAGS
785SET_SHARED_LIBRARY_MAPFILE
786SET_SHARED_LIBRARY_NAME
787SET_SHARED_LIBRARY_ORIGIN
788SET_EXECUTABLE_ORIGIN
789CXX_FLAG_REORDER
790C_FLAG_REORDER
791JVM_RCFLAGS
792RC_FLAGS
793AR_OUT_OPTION
794LD_OUT_OPTION
795EXE_OUT_OPTION
796CC_OUT_OPTION
797STRIPFLAGS
798ARFLAGS
799COMPILER_BINDCMD_FILE_FLAG
800COMPILER_COMMAND_FILE_FLAG
801COMPILER_TARGET_BITS_FLAG
802JT_HOME
803JTREGEXE
804HOTSPOT_TOOLCHAIN_TYPE
805USING_BROKEN_SUSE_LD
806PACKAGE_PATH
807USE_CLANG
808HOTSPOT_LD
809HOTSPOT_CXX
810HOTSPOT_RC
811HOTSPOT_MT
812BUILD_AS
813BUILD_LDCXX
814BUILD_LD
815BUILD_STRIP
816BUILD_OBJCOPY
817BUILD_AR
818BUILD_NM
819BUILD_CXX
820BUILD_CC
821BUILD_SYSROOT_LDFLAGS
822BUILD_SYSROOT_CFLAGS
823ac_ct_OBJDUMP
824OBJDUMP
825ac_ct_OBJCOPY
826OBJCOPY
827ac_ct_NM
828ac_ct_STRIP
829GNM
830NM
831STRIP
832MSBUILD
833DUMPBIN
834RC
835MT
836LIPO
837ac_ct_AR
838AR
839AS
840LDCXX
841LD
842CXXCPP
843CPP
844CXX_VERSION_NUMBER
845CC_VERSION_NUMBER
846ac_ct_CXX
847CXXFLAGS
848CXX
849TOOLCHAIN_PATH_CXX
850POTENTIAL_CXX
851OBJEXT
852EXEEXT
853ac_ct_CC
854CPPFLAGS
855LDFLAGS
856CFLAGS
857CC
858TOOLCHAIN_PATH_CC
859POTENTIAL_CC
860TOOLCHAIN_VERSION
861VS_LIB
862VS_INCLUDE
863VS_PATH
864CYGWIN_LINK
865SYSROOT_LDFLAGS
866SYSROOT_CFLAGS
867EXTRA_LDFLAGS
868EXTRA_CXXFLAGS
869EXTRA_CFLAGS
870LEGACY_EXTRA_LDFLAGS
871LEGACY_EXTRA_CXXFLAGS
872LEGACY_EXTRA_CFLAGS
873EXE_SUFFIX
874OBJ_SUFFIX
875STATIC_LIBRARY
876SHARED_LIBRARY
877STATIC_LIBRARY_SUFFIX
878SHARED_LIBRARY_SUFFIX
879LIBRARY_PREFIX
880TOOLCHAIN_TYPE
881STATIC_BUILD
882IMPORT_MODULES_MAKE
883IMPORT_MODULES_SRC
884IMPORT_MODULES_CONF
885IMPORT_MODULES_LIBS
886IMPORT_MODULES_CMDS
887IMPORT_MODULES_CLASSES
888BUILD_HOTSPOT
889HOTSPOT_DIST
890BUILD_OUTPUT
891JDK_TOPDIR
892NASHORN_TOPDIR
893HOTSPOT_TOPDIR
894JAXWS_TOPDIR
895JAXP_TOPDIR
896CORBA_TOPDIR
897LANGTOOLS_TOPDIR
898BUILD_JDK
899CREATE_BUILDJDK
900BOOT_JDK_BITS
901JAVAC_FLAGS
902BOOT_JDK_MODULAR
903BOOT_JDK_SOURCETARGET
904JARSIGNER
905JAR
906JAVAH
907JAVAC
908JAVA
909BOOT_JDK
910JAVA_CHECK
911JAVAC_CHECK
912VERSION_IS_GA
913VERSION_SHORT
914VERSION_STRING
915VERSION_NUMBER_FOUR_POSITIONS
916VERSION_NUMBER
917VERSION_OPT
918VERSION_BUILD
919VERSION_PRE
920VERSION_PATCH
921VERSION_SECURITY
922VERSION_MINOR
923VERSION_MAJOR
924MACOSX_BUNDLE_ID_BASE
925MACOSX_BUNDLE_NAME_BASE
926HOTSPOT_VM_DISTRO
927COMPANY_NAME
928JDK_RC_PLATFORM_NAME
929PRODUCT_SUFFIX
930PRODUCT_NAME
931LAUNCHER_NAME
932JLINK_KEEP_PACKAGED_MODULES
933COPYRIGHT_YEAR
934COMPRESS_JARS
935INCLUDE_SA
936UNLIMITED_CRYPTO
937CACERTS_FILE
938BUILD_HEADLESS
939SUPPORT_HEADFUL
940SUPPORT_HEADLESS
941DEFAULT_MAKE_TARGET
942OS_VERSION_MICRO
943OS_VERSION_MINOR
944OS_VERSION_MAJOR
945PKG_CONFIG
946BASH_ARGS
947SETFILE
948CODESIGN
949XATTR
950DSYMUTIL
951IS_GNU_TIME
952PATCH
953DTRACE
954TIME
955STAT
956HG
957READELF
958OTOOL
959LDD
960ZIP
961UNZIP
962FIND_DELETE
963OUTPUT_SYNC
964OUTPUT_SYNC_SUPPORTED
965CHECK_TOOLSDIR_MAKE
966CHECK_TOOLSDIR_GMAKE
967CHECK_MAKE
968CHECK_GMAKE
969MAKE
970PKGHANDLER
971CONFIGURESUPPORT_OUTPUTDIR
972OUTPUT_ROOT
973CONF_NAME
974SPEC
975SDKROOT
976XCODEBUILD
977VALID_JVM_VARIANTS
978JVM_VARIANTS
979DEBUG_LEVEL
980HOTSPOT_DEBUG_LEVEL
981JDK_VARIANT
982SET_OPENJDK
983USERNAME
984CANONICAL_TOPDIR
985ORIGINAL_TOPDIR
986TOPDIR
987PATH_SEP
988ZERO_ARCHDEF
989HOTSPOT_BUILD_CPU_DEFINE
990HOTSPOT_BUILD_CPU_ARCH
991HOTSPOT_BUILD_CPU
992HOTSPOT_BUILD_OS_TYPE
993HOTSPOT_BUILD_OS
994OPENJDK_BUILD_OS_EXPORT_DIR
995OPENJDK_BUILD_CPU_JLI_CFLAGS
996OPENJDK_BUILD_CPU_OSARCH
997OPENJDK_BUILD_CPU_ISADIR
998OPENJDK_BUILD_CPU_LIBDIR
999OPENJDK_BUILD_CPU_LEGACY_LIB
1000OPENJDK_BUILD_CPU_LEGACY
1001HOTSPOT_TARGET_CPU_DEFINE
1002HOTSPOT_TARGET_CPU_ARCH
1003HOTSPOT_TARGET_CPU
1004HOTSPOT_TARGET_OS_TYPE
1005HOTSPOT_TARGET_OS
1006DEFINE_CROSS_COMPILE_ARCH
1007LP64
1008OPENJDK_TARGET_OS_EXPORT_DIR
1009OPENJDK_TARGET_CPU_JLI_CFLAGS
1010OPENJDK_TARGET_CPU_OSARCH
1011OPENJDK_TARGET_CPU_ISADIR
1012OPENJDK_TARGET_CPU_LIBDIR
1013OPENJDK_TARGET_CPU_LEGACY_LIB
1014OPENJDK_TARGET_CPU_LEGACY
1015REQUIRED_OS_VERSION
1016REQUIRED_OS_NAME
1017COMPILE_TYPE
1018OPENJDK_TARGET_CPU_ENDIAN
1019OPENJDK_TARGET_CPU_BITS
1020OPENJDK_TARGET_CPU_ARCH
1021OPENJDK_TARGET_CPU
1022OPENJDK_TARGET_OS_ENV
1023OPENJDK_TARGET_OS_TYPE
1024OPENJDK_TARGET_OS
1025OPENJDK_BUILD_CPU_ENDIAN
1026OPENJDK_BUILD_CPU_BITS
1027OPENJDK_BUILD_CPU_ARCH
1028OPENJDK_BUILD_CPU
1029OPENJDK_BUILD_OS_ENV
1030OPENJDK_BUILD_OS_TYPE
1031OPENJDK_BUILD_OS
1032OPENJDK_BUILD_AUTOCONF_NAME
1033OPENJDK_TARGET_AUTOCONF_NAME
1034target_os
1035target_vendor
1036target_cpu
1037target
1038host_os
1039host_vendor
1040host_cpu
1041host
1042build_os
1043build_vendor
1044build_cpu
1045build
1046NICE
1047CPIO
1048DF
1049READLINK
1050CYGPATH
1051SED
1052FGREP
1053EGREP
1054GREP
1055AWK
1056XARGS
1057WHICH
1058WC
1059UNIQ
1060UNAME
1061TR
1062TOUCH
1063TEE
1064TAR
1065TAIL
1066SORT
1067SH
1068RMDIR
1069RM
1070PRINTF
1071NAWK
1072MV
1073MKTEMP
1074MKDIR
1075LS
1076LN
1077HEAD
1078FIND
1079FILE
1080EXPR
1081ECHO
1082DIRNAME
1083DIFF
1084DATE
1085CUT
1086CP
1087COMM
1088CMP
1089CHMOD
1090CAT
1091BASH
1092BASENAME
1093DATE_WHEN_CONFIGURED
1094ORIGINAL_PATH
1095CONFIGURE_COMMAND_LINE
1096target_alias
1097host_alias
1098build_alias
1099LIBS
1100ECHO_T
1101ECHO_N
1102ECHO_C
1103DEFS
1104mandir
1105localedir
1106libdir
1107psdir
1108pdfdir
1109dvidir
1110htmldir
1111infodir
1112docdir
1113oldincludedir
1114includedir
1115localstatedir
1116sharedstatedir
1117sysconfdir
1118datadir
1119datarootdir
1120libexecdir
1121sbindir
1122bindir
1123program_transform_name
1124prefix
1125exec_prefix
1126PACKAGE_URL
1127PACKAGE_BUGREPORT
1128PACKAGE_STRING
1129PACKAGE_VERSION
1130PACKAGE_TARNAME
1131PACKAGE_NAME
1132PATH_SEPARATOR
1133SHELL'
1134ac_subst_files=''
1135ac_user_opts='
1136enable_option_checking
1137with_target_bits
1138enable_openjdk_only
1139with_custom_make_dir
1140with_jdk_variant
1141enable_debug
1142with_debug_level
1143with_jvm_variants
1144with_devkit
1145with_sys_root
1146with_sysroot
1147with_tools_dir
1148with_toolchain_path
1149with_extra_path
1150with_sdk_name
1151with_conf_name
1152with_output_sync
1153with_default_make_target
1154enable_headful
1155with_cacerts_file
1156enable_unlimited_crypto
1157with_copyright_year
1158enable_keep_packaged_modules
1159with_milestone
1160with_update_version
1161with_user_release_suffix
1162with_build_number
1163with_version_string
1164with_version_pre
1165with_version_opt
1166with_version_build
1167with_version_major
1168with_version_minor
1169with_version_security
1170with_version_patch
1171with_boot_jdk
1172with_build_jdk
1173with_add_source_root
1174with_override_source_root
1175with_adds_and_overrides
1176with_override_langtools
1177with_override_corba
1178with_override_jaxp
1179with_override_jaxws
1180with_override_hotspot
1181with_override_nashorn
1182with_override_jdk
1183with_import_hotspot
1184with_import_modules
1185enable_static_build
1186with_toolchain_type
1187with_extra_cflags
1188with_extra_cxxflags
1189with_extra_ldflags
1190with_toolchain_version
1191with_build_devkit
1192with_jtreg
1193enable_warnings_as_errors
1194with_native_debug_symbols
1195enable_debug_symbols
1196enable_zip_debug_info
1197enable_native_coverage
1198enable_dtrace
1199with_jvm_features
1200with_jvm_interpreter
1201with_stdc__lib
1202with_msvcr_dll
1203with_msvcp_dll
1204with_x
1205with_cups
1206with_cups_include
1207with_freetype
1208with_freetype_include
1209with_freetype_lib
1210with_freetype_src
1211enable_freetype_bundling
1212with_alsa
1213with_alsa_include
1214with_alsa_lib
1215with_libffi
1216with_libffi_include
1217with_libffi_lib
1218with_libjpeg
1219with_giflib
1220with_libpng
1221with_zlib
1222with_lcms
1223with_dxsdk
1224with_dxsdk_lib
1225with_dxsdk_include
1226enable_new_hotspot_build
1227enable_hotspot_test_in_build
1228with_num_cores
1229with_memory_size
1230with_jobs
1231with_test_jobs
1232with_boot_jdk_jvmargs
1233with_sjavac_server_java
1234enable_sjavac
1235enable_javac_server
1236enable_icecc
1237enable_precompiled_headers
1238enable_ccache
1239with_ccache_dir
1240'
1241      ac_precious_vars='build_alias
1242host_alias
1243target_alias
1244BASENAME
1245BASH
1246CAT
1247CHMOD
1248CMP
1249COMM
1250CP
1251CUT
1252DATE
1253DIFF
1254DIRNAME
1255ECHO
1256EXPR
1257FILE
1258FIND
1259HEAD
1260LN
1261LS
1262MKDIR
1263MKTEMP
1264MV
1265NAWK
1266PRINTF
1267RM
1268RMDIR
1269SH
1270SORT
1271TAIL
1272TAR
1273TEE
1274TOUCH
1275TR
1276UNAME
1277UNIQ
1278WC
1279WHICH
1280XARGS
1281AWK
1282GREP
1283EGREP
1284FGREP
1285SED
1286CYGPATH
1287READLINK
1288DF
1289CPIO
1290NICE
1291MAKE
1292UNZIP
1293ZIP
1294LDD
1295OTOOL
1296READELF
1297HG
1298STAT
1299TIME
1300DTRACE
1301PATCH
1302DSYMUTIL
1303XATTR
1304CODESIGN
1305SETFILE
1306PKG_CONFIG
1307JAVA
1308JAVAC
1309JAVAH
1310JAR
1311JARSIGNER
1312CC
1313CFLAGS
1314LDFLAGS
1315LIBS
1316CPPFLAGS
1317CXX
1318CXXFLAGS
1319CCC
1320CPP
1321CXXCPP
1322AS
1323AR
1324LIPO
1325STRIP
1326NM
1327GNM
1328OBJCOPY
1329OBJDUMP
1330BUILD_CC
1331BUILD_CXX
1332BUILD_NM
1333BUILD_AR
1334BUILD_OBJCOPY
1335BUILD_STRIP
1336JTREGEXE
1337XMKMF
1338FREETYPE_CFLAGS
1339FREETYPE_LIBS
1340ALSA_CFLAGS
1341ALSA_LIBS
1342LIBFFI_CFLAGS
1343LIBFFI_LIBS
1344PNG_CFLAGS
1345PNG_LIBS
1346LCMS_CFLAGS
1347LCMS_LIBS
1348ICECC_CMD
1349ICECC_CREATE_ENV
1350ICECC_WRAPPER
1351CCACHE'
1352
1353
1354# Initialize some variables set by options.
1355ac_init_help=
1356ac_init_version=false
1357ac_unrecognized_opts=
1358ac_unrecognized_sep=
1359# The variables have the same names as the options, with
1360# dashes changed to underlines.
1361cache_file=/dev/null
1362exec_prefix=NONE
1363no_create=
1364no_recursion=
1365prefix=NONE
1366program_prefix=NONE
1367program_suffix=NONE
1368program_transform_name=s,x,x,
1369silent=
1370site=
1371srcdir=
1372verbose=
1373x_includes=NONE
1374x_libraries=NONE
1375
1376# Installation directory options.
1377# These are left unexpanded so users can "make install exec_prefix=/foo"
1378# and all the variables that are supposed to be based on exec_prefix
1379# by default will actually change.
1380# Use braces instead of parens because sh, perl, etc. also accept them.
1381# (The list follows the same order as the GNU Coding Standards.)
1382bindir='${exec_prefix}/bin'
1383sbindir='${exec_prefix}/sbin'
1384libexecdir='${exec_prefix}/libexec'
1385datarootdir='${prefix}/share'
1386datadir='${datarootdir}'
1387sysconfdir='${prefix}/etc'
1388sharedstatedir='${prefix}/com'
1389localstatedir='${prefix}/var'
1390includedir='${prefix}/include'
1391oldincludedir='/usr/include'
1392docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1393infodir='${datarootdir}/info'
1394htmldir='${docdir}'
1395dvidir='${docdir}'
1396pdfdir='${docdir}'
1397psdir='${docdir}'
1398libdir='${exec_prefix}/lib'
1399localedir='${datarootdir}/locale'
1400mandir='${datarootdir}/man'
1401
1402ac_prev=
1403ac_dashdash=
1404for ac_option
1405do
1406  # If the previous option needs an argument, assign it.
1407  if test -n "$ac_prev"; then
1408    eval $ac_prev=\$ac_option
1409    ac_prev=
1410    continue
1411  fi
1412
1413  case $ac_option in
1414  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1415  *=)   ac_optarg= ;;
1416  *)    ac_optarg=yes ;;
1417  esac
1418
1419  # Accept the important Cygnus configure options, so we can diagnose typos.
1420
1421  case $ac_dashdash$ac_option in
1422  --)
1423    ac_dashdash=yes ;;
1424
1425  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1426    ac_prev=bindir ;;
1427  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1428    bindir=$ac_optarg ;;
1429
1430  -build | --build | --buil | --bui | --bu)
1431    ac_prev=build_alias ;;
1432  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1433    build_alias=$ac_optarg ;;
1434
1435  -cache-file | --cache-file | --cache-fil | --cache-fi \
1436  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1437    ac_prev=cache_file ;;
1438  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1439  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1440    cache_file=$ac_optarg ;;
1441
1442  --config-cache | -C)
1443    cache_file=config.cache ;;
1444
1445  -datadir | --datadir | --datadi | --datad)
1446    ac_prev=datadir ;;
1447  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1448    datadir=$ac_optarg ;;
1449
1450  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1451  | --dataroo | --dataro | --datar)
1452    ac_prev=datarootdir ;;
1453  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1454  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1455    datarootdir=$ac_optarg ;;
1456
1457  -disable-* | --disable-*)
1458    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1459    # Reject names that are not valid shell variable names.
1460    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1461      as_fn_error $? "invalid feature name: $ac_useropt"
1462    ac_useropt_orig=$ac_useropt
1463    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1464    case $ac_user_opts in
1465      *"
1466"enable_$ac_useropt"
1467"*) ;;
1468      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1469	 ac_unrecognized_sep=', ';;
1470    esac
1471    eval enable_$ac_useropt=no ;;
1472
1473  -docdir | --docdir | --docdi | --doc | --do)
1474    ac_prev=docdir ;;
1475  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1476    docdir=$ac_optarg ;;
1477
1478  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1479    ac_prev=dvidir ;;
1480  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1481    dvidir=$ac_optarg ;;
1482
1483  -enable-* | --enable-*)
1484    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1485    # Reject names that are not valid shell variable names.
1486    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1487      as_fn_error $? "invalid feature name: $ac_useropt"
1488    ac_useropt_orig=$ac_useropt
1489    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1490    case $ac_user_opts in
1491      *"
1492"enable_$ac_useropt"
1493"*) ;;
1494      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1495	 ac_unrecognized_sep=', ';;
1496    esac
1497    eval enable_$ac_useropt=\$ac_optarg ;;
1498
1499  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1500  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1501  | --exec | --exe | --ex)
1502    ac_prev=exec_prefix ;;
1503  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1504  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1505  | --exec=* | --exe=* | --ex=*)
1506    exec_prefix=$ac_optarg ;;
1507
1508  -gas | --gas | --ga | --g)
1509    # Obsolete; use --with-gas.
1510    with_gas=yes ;;
1511
1512  -help | --help | --hel | --he | -h)
1513    ac_init_help=long ;;
1514  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1515    ac_init_help=recursive ;;
1516  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1517    ac_init_help=short ;;
1518
1519  -host | --host | --hos | --ho)
1520    ac_prev=host_alias ;;
1521  -host=* | --host=* | --hos=* | --ho=*)
1522    host_alias=$ac_optarg ;;
1523
1524  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1525    ac_prev=htmldir ;;
1526  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1527  | --ht=*)
1528    htmldir=$ac_optarg ;;
1529
1530  -includedir | --includedir | --includedi | --included | --include \
1531  | --includ | --inclu | --incl | --inc)
1532    ac_prev=includedir ;;
1533  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1534  | --includ=* | --inclu=* | --incl=* | --inc=*)
1535    includedir=$ac_optarg ;;
1536
1537  -infodir | --infodir | --infodi | --infod | --info | --inf)
1538    ac_prev=infodir ;;
1539  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1540    infodir=$ac_optarg ;;
1541
1542  -libdir | --libdir | --libdi | --libd)
1543    ac_prev=libdir ;;
1544  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1545    libdir=$ac_optarg ;;
1546
1547  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1548  | --libexe | --libex | --libe)
1549    ac_prev=libexecdir ;;
1550  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1551  | --libexe=* | --libex=* | --libe=*)
1552    libexecdir=$ac_optarg ;;
1553
1554  -localedir | --localedir | --localedi | --localed | --locale)
1555    ac_prev=localedir ;;
1556  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1557    localedir=$ac_optarg ;;
1558
1559  -localstatedir | --localstatedir | --localstatedi | --localstated \
1560  | --localstate | --localstat | --localsta | --localst | --locals)
1561    ac_prev=localstatedir ;;
1562  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1563  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1564    localstatedir=$ac_optarg ;;
1565
1566  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1567    ac_prev=mandir ;;
1568  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1569    mandir=$ac_optarg ;;
1570
1571  -nfp | --nfp | --nf)
1572    # Obsolete; use --without-fp.
1573    with_fp=no ;;
1574
1575  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1576  | --no-cr | --no-c | -n)
1577    no_create=yes ;;
1578
1579  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1580  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1581    no_recursion=yes ;;
1582
1583  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1584  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1585  | --oldin | --oldi | --old | --ol | --o)
1586    ac_prev=oldincludedir ;;
1587  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1588  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1589  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1590    oldincludedir=$ac_optarg ;;
1591
1592  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1593    ac_prev=prefix ;;
1594  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1595    prefix=$ac_optarg ;;
1596
1597  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1598  | --program-pre | --program-pr | --program-p)
1599    ac_prev=program_prefix ;;
1600  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1601  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1602    program_prefix=$ac_optarg ;;
1603
1604  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1605  | --program-suf | --program-su | --program-s)
1606    ac_prev=program_suffix ;;
1607  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1608  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1609    program_suffix=$ac_optarg ;;
1610
1611  -program-transform-name | --program-transform-name \
1612  | --program-transform-nam | --program-transform-na \
1613  | --program-transform-n | --program-transform- \
1614  | --program-transform | --program-transfor \
1615  | --program-transfo | --program-transf \
1616  | --program-trans | --program-tran \
1617  | --progr-tra | --program-tr | --program-t)
1618    ac_prev=program_transform_name ;;
1619  -program-transform-name=* | --program-transform-name=* \
1620  | --program-transform-nam=* | --program-transform-na=* \
1621  | --program-transform-n=* | --program-transform-=* \
1622  | --program-transform=* | --program-transfor=* \
1623  | --program-transfo=* | --program-transf=* \
1624  | --program-trans=* | --program-tran=* \
1625  | --progr-tra=* | --program-tr=* | --program-t=*)
1626    program_transform_name=$ac_optarg ;;
1627
1628  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1629    ac_prev=pdfdir ;;
1630  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1631    pdfdir=$ac_optarg ;;
1632
1633  -psdir | --psdir | --psdi | --psd | --ps)
1634    ac_prev=psdir ;;
1635  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1636    psdir=$ac_optarg ;;
1637
1638  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1639  | -silent | --silent | --silen | --sile | --sil)
1640    silent=yes ;;
1641
1642  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1643    ac_prev=sbindir ;;
1644  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1645  | --sbi=* | --sb=*)
1646    sbindir=$ac_optarg ;;
1647
1648  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1649  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1650  | --sharedst | --shareds | --shared | --share | --shar \
1651  | --sha | --sh)
1652    ac_prev=sharedstatedir ;;
1653  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1654  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1655  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1656  | --sha=* | --sh=*)
1657    sharedstatedir=$ac_optarg ;;
1658
1659  -site | --site | --sit)
1660    ac_prev=site ;;
1661  -site=* | --site=* | --sit=*)
1662    site=$ac_optarg ;;
1663
1664  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1665    ac_prev=srcdir ;;
1666  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1667    srcdir=$ac_optarg ;;
1668
1669  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1670  | --syscon | --sysco | --sysc | --sys | --sy)
1671    ac_prev=sysconfdir ;;
1672  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1673  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1674    sysconfdir=$ac_optarg ;;
1675
1676  -target | --target | --targe | --targ | --tar | --ta | --t)
1677    ac_prev=target_alias ;;
1678  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1679    target_alias=$ac_optarg ;;
1680
1681  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1682    verbose=yes ;;
1683
1684  -version | --version | --versio | --versi | --vers | -V)
1685    ac_init_version=: ;;
1686
1687  -with-* | --with-*)
1688    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1689    # Reject names that are not valid shell variable names.
1690    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1691      as_fn_error $? "invalid package name: $ac_useropt"
1692    ac_useropt_orig=$ac_useropt
1693    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1694    case $ac_user_opts in
1695      *"
1696"with_$ac_useropt"
1697"*) ;;
1698      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1699	 ac_unrecognized_sep=', ';;
1700    esac
1701    eval with_$ac_useropt=\$ac_optarg ;;
1702
1703  -without-* | --without-*)
1704    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1705    # Reject names that are not valid shell variable names.
1706    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1707      as_fn_error $? "invalid package name: $ac_useropt"
1708    ac_useropt_orig=$ac_useropt
1709    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1710    case $ac_user_opts in
1711      *"
1712"with_$ac_useropt"
1713"*) ;;
1714      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1715	 ac_unrecognized_sep=', ';;
1716    esac
1717    eval with_$ac_useropt=no ;;
1718
1719  --x)
1720    # Obsolete; use --with-x.
1721    with_x=yes ;;
1722
1723  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1724  | --x-incl | --x-inc | --x-in | --x-i)
1725    ac_prev=x_includes ;;
1726  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1727  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1728    x_includes=$ac_optarg ;;
1729
1730  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1731  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1732    ac_prev=x_libraries ;;
1733  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1734  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1735    x_libraries=$ac_optarg ;;
1736
1737  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1738Try \`$0 --help' for more information"
1739    ;;
1740
1741  *=*)
1742    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1743    # Reject names that are not valid shell variable names.
1744    case $ac_envvar in #(
1745      '' | [0-9]* | *[!_$as_cr_alnum]* )
1746      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1747    esac
1748    eval $ac_envvar=\$ac_optarg
1749    export $ac_envvar ;;
1750
1751  *)
1752    # FIXME: should be removed in autoconf 3.0.
1753    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1754    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1755      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1756    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1757    ;;
1758
1759  esac
1760done
1761
1762if test -n "$ac_prev"; then
1763  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1764  as_fn_error $? "missing argument to $ac_option"
1765fi
1766
1767if test -n "$ac_unrecognized_opts"; then
1768  case $enable_option_checking in
1769    no) ;;
1770    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1771    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1772  esac
1773fi
1774
1775# Check all directory arguments for consistency.
1776for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1777		datadir sysconfdir sharedstatedir localstatedir includedir \
1778		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1779		libdir localedir mandir
1780do
1781  eval ac_val=\$$ac_var
1782  # Remove trailing slashes.
1783  case $ac_val in
1784    */ )
1785      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1786      eval $ac_var=\$ac_val;;
1787  esac
1788  # Be sure to have absolute directory names.
1789  case $ac_val in
1790    [\\/$]* | ?:[\\/]* )  continue;;
1791    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1792  esac
1793  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1794done
1795
1796# There might be people who depend on the old broken behavior: `$host'
1797# used to hold the argument of --host etc.
1798# FIXME: To remove some day.
1799build=$build_alias
1800host=$host_alias
1801target=$target_alias
1802
1803# FIXME: To remove some day.
1804if test "x$host_alias" != x; then
1805  if test "x$build_alias" = x; then
1806    cross_compiling=maybe
1807  elif test "x$build_alias" != "x$host_alias"; then
1808    cross_compiling=yes
1809  fi
1810fi
1811
1812ac_tool_prefix=
1813test -n "$host_alias" && ac_tool_prefix=$host_alias-
1814
1815test "$silent" = yes && exec 6>/dev/null
1816
1817
1818ac_pwd=`pwd` && test -n "$ac_pwd" &&
1819ac_ls_di=`ls -di .` &&
1820ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1821  as_fn_error $? "working directory cannot be determined"
1822test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1823  as_fn_error $? "pwd does not report name of working directory"
1824
1825
1826# Find the source files, if location was not specified.
1827if test -z "$srcdir"; then
1828  ac_srcdir_defaulted=yes
1829  # Try the directory containing this script, then the parent directory.
1830  ac_confdir=`$as_dirname -- "$as_myself" ||
1831$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1832	 X"$as_myself" : 'X\(//\)[^/]' \| \
1833	 X"$as_myself" : 'X\(//\)$' \| \
1834	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1835$as_echo X"$as_myself" |
1836    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1837	    s//\1/
1838	    q
1839	  }
1840	  /^X\(\/\/\)[^/].*/{
1841	    s//\1/
1842	    q
1843	  }
1844	  /^X\(\/\/\)$/{
1845	    s//\1/
1846	    q
1847	  }
1848	  /^X\(\/\).*/{
1849	    s//\1/
1850	    q
1851	  }
1852	  s/.*/./; q'`
1853  srcdir=$ac_confdir
1854  if test ! -r "$srcdir/$ac_unique_file"; then
1855    srcdir=..
1856  fi
1857else
1858  ac_srcdir_defaulted=no
1859fi
1860if test ! -r "$srcdir/$ac_unique_file"; then
1861  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1862  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1863fi
1864ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1865ac_abs_confdir=`(
1866	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1867	pwd)`
1868# When building in place, set srcdir=.
1869if test "$ac_abs_confdir" = "$ac_pwd"; then
1870  srcdir=.
1871fi
1872# Remove unnecessary trailing slashes from srcdir.
1873# Double slashes in file names in object file debugging info
1874# mess up M-x gdb in Emacs.
1875case $srcdir in
1876*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1877esac
1878for ac_var in $ac_precious_vars; do
1879  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1880  eval ac_env_${ac_var}_value=\$${ac_var}
1881  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1882  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1883done
1884
1885#
1886# Report the --help message.
1887#
1888if test "$ac_init_help" = "long"; then
1889  # Omit some internal or obsolete options to make the list less imposing.
1890  # This message is too long to be a string in the A/UX 3.1 sh.
1891  cat <<_ACEOF
1892\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1893
1894Usage: $0 [OPTION]... [VAR=VALUE]...
1895
1896To assign environment variables (e.g., CC, CFLAGS...), specify them as
1897VAR=VALUE.  See below for descriptions of some of the useful variables.
1898
1899Defaults for the options are specified in brackets.
1900
1901Configuration:
1902  -h, --help              display this help and exit
1903      --help=short        display options specific to this package
1904      --help=recursive    display the short help of all the included packages
1905  -V, --version           display version information and exit
1906  -q, --quiet, --silent   do not print \`checking ...' messages
1907      --cache-file=FILE   cache test results in FILE [disabled]
1908  -C, --config-cache      alias for \`--cache-file=config.cache'
1909  -n, --no-create         do not create output files
1910      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1911
1912Installation directories:
1913  --prefix=PREFIX         install architecture-independent files in PREFIX
1914                          [$ac_default_prefix]
1915  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1916                          [PREFIX]
1917
1918By default, \`make install' will install all the files in
1919\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1920an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1921for instance \`--prefix=\$HOME'.
1922
1923For better control, use the options below.
1924
1925Fine tuning of the installation directories:
1926  --bindir=DIR            user executables [EPREFIX/bin]
1927  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1928  --libexecdir=DIR        program executables [EPREFIX/libexec]
1929  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1930  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1931  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1932  --libdir=DIR            object code libraries [EPREFIX/lib]
1933  --includedir=DIR        C header files [PREFIX/include]
1934  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1935  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1936  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1937  --infodir=DIR           info documentation [DATAROOTDIR/info]
1938  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1939  --mandir=DIR            man documentation [DATAROOTDIR/man]
1940  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1941  --htmldir=DIR           html documentation [DOCDIR]
1942  --dvidir=DIR            dvi documentation [DOCDIR]
1943  --pdfdir=DIR            pdf documentation [DOCDIR]
1944  --psdir=DIR             ps documentation [DOCDIR]
1945_ACEOF
1946
1947  cat <<\_ACEOF
1948
1949X features:
1950  --x-includes=DIR    X include files are in DIR
1951  --x-libraries=DIR   X library files are in DIR
1952
1953System types:
1954  --build=BUILD     configure for building on BUILD [guessed]
1955  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1956  --target=TARGET   configure for building compilers for TARGET [HOST]
1957_ACEOF
1958fi
1959
1960if test -n "$ac_init_help"; then
1961  case $ac_init_help in
1962     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1963   esac
1964  cat <<\_ACEOF
1965
1966Optional Features:
1967  --disable-option-checking  ignore unrecognized --enable/--with options
1968  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1969  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1970  --enable-openjdk-only   suppress building custom source even if present
1971                          [disabled]
1972  --enable-debug          set the debug level to fastdebug (shorthand for
1973                          --with-debug-level=fastdebug) [disabled]
1974  --disable-headful       disable building headful support (graphical UI
1975                          support) [enabled]
1976  --enable-unlimited-crypto
1977                          Enable unlimited crypto policy [disabled]
1978  --disable-keep-packaged-modules
1979                          Do not keep packaged modules in jdk image [enable]
1980  --enable-static-build   enable static library build [disabled]
1981  --disable-warnings-as-errors
1982                          do not consider native warnings to be an error
1983                          [enabled]
1984  --enable-debug-symbols  Deprecated. Option is kept for backwards
1985                          compatibility and is ignored
1986  --enable-zip-debug-info Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --enable-native-coverage
1989                          enable native compilation with code coverage
1990                          data[disabled]
1991  --enable-dtrace[=yes/no/auto]
1992                          enable dtrace. Default is auto, where dtrace is
1993                          enabled if all dependencies are present.
1994  --disable-freetype-bundling
1995                          disable bundling of the freetype library with the
1996                          build result [enabled on Windows or when using
1997                          --with-freetype, disabled otherwise]
1998  --disable-new-hotspot-build
1999                          disable the new hotspot build system (use the old)
2000                          [enabled]
2001  --enable-hotspot-test-in-build
2002                          run the Queens test after Hotspot build [disabled]
2003  --enable-sjavac         use sjavac to do fast incremental compiles
2004                          [disabled]
2005  --disable-javac-server  disable javac server [enabled]
2006  --enable-icecc          enable distribted compilation of native code using
2007                          icecc/icecream [disabled]
2008  --disable-precompiled-headers
2009                          disable using precompiled headers when compiling C++
2010                          [enabled]
2011  --enable-ccache         enable using ccache to speed up recompilations
2012                          [disabled]
2013
2014Optional Packages:
2015  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2016  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2017  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2018                          support it), e.g. --with-target-bits=32 [guessed]
2019  --with-custom-make-dir  Deprecated. Option is kept for backwards
2020                          compatibility and is ignored
2021  --with-jdk-variant      JDK variant to build (normal) [normal]
2022  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2023                          optimized) [release]
2024  --with-jvm-variants     JVM variants (separated by commas) to build
2025                          (server,client,minimal,core,zero,zeroshark,custom)
2026                          [server]
2027  --with-devkit           use this devkit for compilers, tools and resources
2028  --with-sys-root         alias for --with-sysroot for backwards compatability
2029  --with-sysroot          use this directory as sysroot
2030  --with-tools-dir        alias for --with-toolchain-path for backwards
2031                          compatibility
2032  --with-toolchain-path   prepend these directories when searching for
2033                          toolchain binaries (compilers etc)
2034  --with-extra-path       prepend these directories to the default path
2035  --with-sdk-name         use the platform SDK of the given name. [macosx]
2036  --with-conf-name        use this as the name of the configuration [generated
2037                          from important configuration options]
2038  --with-output-sync      set make output sync type if supported by make.
2039                          [recurse]
2040  --with-default-make-target
2041                          set the default make target [exploded-image]
2042  --with-cacerts-file     specify alternative cacerts file
2043  --with-copyright-year   Set copyright year value for build [current year]
2044  --with-milestone        Deprecated. Option is kept for backwards
2045                          compatibility and is ignored
2046  --with-update-version   Deprecated. Option is kept for backwards
2047                          compatibility and is ignored
2048  --with-user-release-suffix
2049                          Deprecated. Option is kept for backwards
2050                          compatibility and is ignored
2051  --with-build-number     Deprecated. Option is kept for backwards
2052                          compatibility and is ignored
2053  --with-version-string   Set version string [calculated]
2054  --with-version-pre      Set the base part of the version 'PRE' field
2055                          (pre-release identifier) ['internal']
2056  --with-version-opt      Set version 'OPT' field (build metadata)
2057                          [<timestamp>.<user>.<dirname>]
2058  --with-version-build    Set version 'BUILD' field (build number) [not
2059                          specified]
2060  --with-version-major    Set version 'MAJOR' field (first number) [current
2061                          source value]
2062  --with-version-minor    Set version 'MINOR' field (second number) [current
2063                          source value]
2064  --with-version-security Set version 'SECURITY' field (third number) [current
2065                          source value]
2066  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2067                          specified]
2068  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2069  --with-build-jdk        path to JDK of same version as is being built[the
2070                          newly built JDK]
2071  --with-add-source-root  Deprecated. Option is kept for backwards
2072                          compatibility and is ignored
2073  --with-override-source-root
2074                          Deprecated. Option is kept for backwards
2075                          compatibility and is ignored
2076  --with-adds-and-overrides
2077                          Deprecated. Option is kept for backwards
2078                          compatibility and is ignored
2079  --with-override-langtools
2080                          Deprecated. Option is kept for backwards
2081                          compatibility and is ignored
2082  --with-override-corba   Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-override-jaxp    Deprecated. Option is kept for backwards
2085                          compatibility and is ignored
2086  --with-override-jaxws   Deprecated. Option is kept for backwards
2087                          compatibility and is ignored
2088  --with-override-hotspot Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-nashorn Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-jdk     Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-import-hotspot   import hotspot binaries from this jdk image or
2095                          hotspot build dist dir instead of building from
2096                          source
2097  --with-import-modules   import a set of prebuilt modules either as a zip
2098                          file or an exploded directory
2099  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2100                          to show possible values [platform dependent]
2101  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2102  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2103  --with-extra-ldflags    extra flags to be used when linking jdk
2104  --with-toolchain-version
2105                          the version of the toolchain to look for, use
2106                          '--help' to show possible values [platform
2107                          dependent]
2108  --with-build-devkit     Devkit to use for the build platform toolchain
2109  --with-jtreg            Regression Test Harness [probed]
2110  --with-native-debug-symbols
2111                          set the native debug symbol configuration (none,
2112                          internal, external, zipped) [varying]
2113  --with-jvm-features     additional JVM features to enable (separated by
2114                          comma), use '--help' to show possible values [none]
2115  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2116                          compatibility and is ignored
2117  --with-stdc++lib=<static>,<dynamic>,<default>
2118                          force linking of the C++ runtime on Linux to either
2119                          static or dynamic, default is static with dynamic as
2120                          fallback
2121  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2122                          (Windows only) [probed]
2123  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2124                          (Windows only) [probed]
2125  --with-x                use the X Window System
2126  --with-cups             specify prefix directory for the cups package
2127                          (expecting the headers under PATH/include)
2128  --with-cups-include     specify directory for the cups include files
2129  --with-freetype         specify prefix directory for the freetype package
2130                          (expecting the libraries under PATH/lib and the
2131                          headers under PATH/include)
2132  --with-freetype-include specify directory for the freetype include files
2133  --with-freetype-lib     specify directory for the freetype library
2134  --with-freetype-src     specify directory with freetype sources to
2135                          automatically build the library (experimental,
2136                          Windows-only)
2137  --with-alsa             specify prefix directory for the alsa package
2138                          (expecting the libraries under PATH/lib and the
2139                          headers under PATH/include)
2140  --with-alsa-include     specify directory for the alsa include files
2141  --with-alsa-lib         specify directory for the alsa library
2142  --with-libffi           specify prefix directory for the libffi package
2143                          (expecting the libraries under PATH/lib and the
2144                          headers under PATH/include)
2145  --with-libffi-include   specify directory for the libffi include files
2146  --with-libffi-lib       specify directory for the libffi library
2147  --with-libjpeg          use libjpeg from build system or OpenJDK source
2148                          (system, bundled) [bundled]
2149  --with-giflib           use giflib from build system or OpenJDK source
2150                          (system, bundled) [bundled]
2151  --with-libpng           use libpng from build system or OpenJDK source
2152                          (system, bundled) [bundled]
2153  --with-zlib             use zlib from build system or OpenJDK source
2154                          (system, bundled) [bundled]
2155  --with-lcms             use lcms2 from build system or OpenJDK source
2156                          (system, bundled) [bundled]
2157  --with-dxsdk            Deprecated. Option is kept for backwards
2158                          compatibility and is ignored
2159  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2160                          compatibility and is ignored
2161  --with-dxsdk-include    Deprecated. Option is kept for backwards
2162                          compatibility and is ignored
2163  --with-num-cores        number of cores in the build system, e.g.
2164                          --with-num-cores=8 [probed]
2165  --with-memory-size      memory (in MB) available in the build system, e.g.
2166                          --with-memory-size=1024 [probed]
2167  --with-jobs             number of parallel jobs to let make run [calculated
2168                          based on cores and memory]
2169  --with-test-jobs        number of parallel tests jobs to run [based on build
2170                          jobs]
2171  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2172                          invocations of boot JDK, overriding the default
2173                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2174                          -enableassertions"
2175  --with-sjavac-server-java
2176                          use this java binary for running the sjavac
2177                          background server [Boot JDK java]
2178  --with-ccache-dir       where to store ccache files [~/.ccache]
2179
2180Some influential environment variables:
2181  BASENAME    Override default value for BASENAME
2182  BASH        Override default value for BASH
2183  CAT         Override default value for CAT
2184  CHMOD       Override default value for CHMOD
2185  CMP         Override default value for CMP
2186  COMM        Override default value for COMM
2187  CP          Override default value for CP
2188  CUT         Override default value for CUT
2189  DATE        Override default value for DATE
2190  DIFF        Override default value for DIFF
2191  DIRNAME     Override default value for DIRNAME
2192  ECHO        Override default value for ECHO
2193  EXPR        Override default value for EXPR
2194  FILE        Override default value for FILE
2195  FIND        Override default value for FIND
2196  HEAD        Override default value for HEAD
2197  LN          Override default value for LN
2198  LS          Override default value for LS
2199  MKDIR       Override default value for MKDIR
2200  MKTEMP      Override default value for MKTEMP
2201  MV          Override default value for MV
2202  NAWK        Override default value for NAWK
2203  PRINTF      Override default value for PRINTF
2204  RM          Override default value for RM
2205  RMDIR       Override default value for RMDIR
2206  SH          Override default value for SH
2207  SORT        Override default value for SORT
2208  TAIL        Override default value for TAIL
2209  TAR         Override default value for TAR
2210  TEE         Override default value for TEE
2211  TOUCH       Override default value for TOUCH
2212  TR          Override default value for TR
2213  UNAME       Override default value for UNAME
2214  UNIQ        Override default value for UNIQ
2215  WC          Override default value for WC
2216  WHICH       Override default value for WHICH
2217  XARGS       Override default value for XARGS
2218  AWK         Override default value for AWK
2219  GREP        Override default value for GREP
2220  EGREP       Override default value for EGREP
2221  FGREP       Override default value for FGREP
2222  SED         Override default value for SED
2223  CYGPATH     Override default value for CYGPATH
2224  READLINK    Override default value for READLINK
2225  DF          Override default value for DF
2226  CPIO        Override default value for CPIO
2227  NICE        Override default value for NICE
2228  MAKE        Override default value for MAKE
2229  UNZIP       Override default value for UNZIP
2230  ZIP         Override default value for ZIP
2231  LDD         Override default value for LDD
2232  OTOOL       Override default value for OTOOL
2233  READELF     Override default value for READELF
2234  HG          Override default value for HG
2235  STAT        Override default value for STAT
2236  TIME        Override default value for TIME
2237  DTRACE      Override default value for DTRACE
2238  PATCH       Override default value for PATCH
2239  DSYMUTIL    Override default value for DSYMUTIL
2240  XATTR       Override default value for XATTR
2241  CODESIGN    Override default value for CODESIGN
2242  SETFILE     Override default value for SETFILE
2243  PKG_CONFIG  path to pkg-config utility
2244  JAVA        Override default value for JAVA
2245  JAVAC       Override default value for JAVAC
2246  JAVAH       Override default value for JAVAH
2247  JAR         Override default value for JAR
2248  JARSIGNER   Override default value for JARSIGNER
2249  CC          C compiler command
2250  CFLAGS      C compiler flags
2251  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2252              nonstandard directory <lib dir>
2253  LIBS        libraries to pass to the linker, e.g. -l<library>
2254  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2255              you have headers in a nonstandard directory <include dir>
2256  CXX         C++ compiler command
2257  CXXFLAGS    C++ compiler flags
2258  CPP         C preprocessor
2259  CXXCPP      C++ preprocessor
2260  AS          Override default value for AS
2261  AR          Override default value for AR
2262  LIPO        Override default value for LIPO
2263  STRIP       Override default value for STRIP
2264  NM          Override default value for NM
2265  GNM         Override default value for GNM
2266  OBJCOPY     Override default value for OBJCOPY
2267  OBJDUMP     Override default value for OBJDUMP
2268  BUILD_CC    Override default value for BUILD_CC
2269  BUILD_CXX   Override default value for BUILD_CXX
2270  BUILD_NM    Override default value for BUILD_NM
2271  BUILD_AR    Override default value for BUILD_AR
2272  BUILD_OBJCOPY
2273              Override default value for BUILD_OBJCOPY
2274  BUILD_STRIP Override default value for BUILD_STRIP
2275  JTREGEXE    Override default value for JTREGEXE
2276  XMKMF       Path to xmkmf, Makefile generator for X Window System
2277  FREETYPE_CFLAGS
2278              C compiler flags for FREETYPE, overriding pkg-config
2279  FREETYPE_LIBS
2280              linker flags for FREETYPE, overriding pkg-config
2281  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2282  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2283  LIBFFI_CFLAGS
2284              C compiler flags for LIBFFI, overriding pkg-config
2285  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2286  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2287  PNG_LIBS    linker flags for PNG, overriding pkg-config
2288  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2289  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2290  ICECC_CMD   Override default value for ICECC_CMD
2291  ICECC_CREATE_ENV
2292              Override default value for ICECC_CREATE_ENV
2293  ICECC_WRAPPER
2294              Override default value for ICECC_WRAPPER
2295  CCACHE      Override default value for CCACHE
2296
2297Use these variables to override the choices made by `configure' or to help
2298it to find libraries and programs with nonstandard names/locations.
2299
2300Report bugs to <build-dev@openjdk.java.net>.
2301OpenJDK home page: <http://openjdk.java.net>.
2302_ACEOF
2303ac_status=$?
2304fi
2305
2306if test "$ac_init_help" = "recursive"; then
2307  # If there are subdirs, report their specific --help.
2308  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2309    test -d "$ac_dir" ||
2310      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2311      continue
2312    ac_builddir=.
2313
2314case "$ac_dir" in
2315.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2316*)
2317  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2318  # A ".." for each directory in $ac_dir_suffix.
2319  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2320  case $ac_top_builddir_sub in
2321  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2322  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2323  esac ;;
2324esac
2325ac_abs_top_builddir=$ac_pwd
2326ac_abs_builddir=$ac_pwd$ac_dir_suffix
2327# for backward compatibility:
2328ac_top_builddir=$ac_top_build_prefix
2329
2330case $srcdir in
2331  .)  # We are building in place.
2332    ac_srcdir=.
2333    ac_top_srcdir=$ac_top_builddir_sub
2334    ac_abs_top_srcdir=$ac_pwd ;;
2335  [\\/]* | ?:[\\/]* )  # Absolute name.
2336    ac_srcdir=$srcdir$ac_dir_suffix;
2337    ac_top_srcdir=$srcdir
2338    ac_abs_top_srcdir=$srcdir ;;
2339  *) # Relative name.
2340    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2341    ac_top_srcdir=$ac_top_build_prefix$srcdir
2342    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2343esac
2344ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2345
2346    cd "$ac_dir" || { ac_status=$?; continue; }
2347    # Check for guested configure.
2348    if test -f "$ac_srcdir/configure.gnu"; then
2349      echo &&
2350      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2351    elif test -f "$ac_srcdir/configure"; then
2352      echo &&
2353      $SHELL "$ac_srcdir/configure" --help=recursive
2354    else
2355      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2356    fi || ac_status=$?
2357    cd "$ac_pwd" || { ac_status=$?; break; }
2358  done
2359fi
2360
2361test -n "$ac_init_help" && exit $ac_status
2362if $ac_init_version; then
2363  cat <<\_ACEOF
2364OpenJDK configure jdk9
2365generated by GNU Autoconf 2.69
2366
2367Copyright (C) 2012 Free Software Foundation, Inc.
2368This configure script is free software; the Free Software Foundation
2369gives unlimited permission to copy, distribute and modify it.
2370_ACEOF
2371  exit
2372fi
2373
2374## ------------------------ ##
2375## Autoconf initialization. ##
2376## ------------------------ ##
2377
2378# ac_fn_c_try_compile LINENO
2379# --------------------------
2380# Try to compile conftest.$ac_ext, and return whether this succeeded.
2381ac_fn_c_try_compile ()
2382{
2383  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2384  rm -f conftest.$ac_objext
2385  if { { ac_try="$ac_compile"
2386case "(($ac_try" in
2387  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2388  *) ac_try_echo=$ac_try;;
2389esac
2390eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2391$as_echo "$ac_try_echo"; } >&5
2392  (eval "$ac_compile") 2>conftest.err
2393  ac_status=$?
2394  if test -s conftest.err; then
2395    grep -v '^ *+' conftest.err >conftest.er1
2396    cat conftest.er1 >&5
2397    mv -f conftest.er1 conftest.err
2398  fi
2399  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2400  test $ac_status = 0; } && {
2401	 test -z "$ac_c_werror_flag" ||
2402	 test ! -s conftest.err
2403       } && test -s conftest.$ac_objext; then :
2404  ac_retval=0
2405else
2406  $as_echo "$as_me: failed program was:" >&5
2407sed 's/^/| /' conftest.$ac_ext >&5
2408
2409	ac_retval=1
2410fi
2411  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2412  as_fn_set_status $ac_retval
2413
2414} # ac_fn_c_try_compile
2415
2416# ac_fn_cxx_try_compile LINENO
2417# ----------------------------
2418# Try to compile conftest.$ac_ext, and return whether this succeeded.
2419ac_fn_cxx_try_compile ()
2420{
2421  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2422  rm -f conftest.$ac_objext
2423  if { { ac_try="$ac_compile"
2424case "(($ac_try" in
2425  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2426  *) ac_try_echo=$ac_try;;
2427esac
2428eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2429$as_echo "$ac_try_echo"; } >&5
2430  (eval "$ac_compile") 2>conftest.err
2431  ac_status=$?
2432  if test -s conftest.err; then
2433    grep -v '^ *+' conftest.err >conftest.er1
2434    cat conftest.er1 >&5
2435    mv -f conftest.er1 conftest.err
2436  fi
2437  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2438  test $ac_status = 0; } && {
2439	 test -z "$ac_cxx_werror_flag" ||
2440	 test ! -s conftest.err
2441       } && test -s conftest.$ac_objext; then :
2442  ac_retval=0
2443else
2444  $as_echo "$as_me: failed program was:" >&5
2445sed 's/^/| /' conftest.$ac_ext >&5
2446
2447	ac_retval=1
2448fi
2449  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2450  as_fn_set_status $ac_retval
2451
2452} # ac_fn_cxx_try_compile
2453
2454# ac_fn_c_try_cpp LINENO
2455# ----------------------
2456# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2457ac_fn_c_try_cpp ()
2458{
2459  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2460  if { { ac_try="$ac_cpp conftest.$ac_ext"
2461case "(($ac_try" in
2462  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2463  *) ac_try_echo=$ac_try;;
2464esac
2465eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2466$as_echo "$ac_try_echo"; } >&5
2467  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2468  ac_status=$?
2469  if test -s conftest.err; then
2470    grep -v '^ *+' conftest.err >conftest.er1
2471    cat conftest.er1 >&5
2472    mv -f conftest.er1 conftest.err
2473  fi
2474  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2475  test $ac_status = 0; } > conftest.i && {
2476	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2477	 test ! -s conftest.err
2478       }; then :
2479  ac_retval=0
2480else
2481  $as_echo "$as_me: failed program was:" >&5
2482sed 's/^/| /' conftest.$ac_ext >&5
2483
2484    ac_retval=1
2485fi
2486  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2487  as_fn_set_status $ac_retval
2488
2489} # ac_fn_c_try_cpp
2490
2491# ac_fn_cxx_try_cpp LINENO
2492# ------------------------
2493# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2494ac_fn_cxx_try_cpp ()
2495{
2496  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2497  if { { ac_try="$ac_cpp conftest.$ac_ext"
2498case "(($ac_try" in
2499  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2500  *) ac_try_echo=$ac_try;;
2501esac
2502eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2503$as_echo "$ac_try_echo"; } >&5
2504  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2505  ac_status=$?
2506  if test -s conftest.err; then
2507    grep -v '^ *+' conftest.err >conftest.er1
2508    cat conftest.er1 >&5
2509    mv -f conftest.er1 conftest.err
2510  fi
2511  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2512  test $ac_status = 0; } > conftest.i && {
2513	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2514	 test ! -s conftest.err
2515       }; then :
2516  ac_retval=0
2517else
2518  $as_echo "$as_me: failed program was:" >&5
2519sed 's/^/| /' conftest.$ac_ext >&5
2520
2521    ac_retval=1
2522fi
2523  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2524  as_fn_set_status $ac_retval
2525
2526} # ac_fn_cxx_try_cpp
2527
2528# ac_fn_c_try_link LINENO
2529# -----------------------
2530# Try to link conftest.$ac_ext, and return whether this succeeded.
2531ac_fn_c_try_link ()
2532{
2533  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2534  rm -f conftest.$ac_objext conftest$ac_exeext
2535  if { { ac_try="$ac_link"
2536case "(($ac_try" in
2537  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2538  *) ac_try_echo=$ac_try;;
2539esac
2540eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2541$as_echo "$ac_try_echo"; } >&5
2542  (eval "$ac_link") 2>conftest.err
2543  ac_status=$?
2544  if test -s conftest.err; then
2545    grep -v '^ *+' conftest.err >conftest.er1
2546    cat conftest.er1 >&5
2547    mv -f conftest.er1 conftest.err
2548  fi
2549  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2550  test $ac_status = 0; } && {
2551	 test -z "$ac_c_werror_flag" ||
2552	 test ! -s conftest.err
2553       } && test -s conftest$ac_exeext && {
2554	 test "$cross_compiling" = yes ||
2555	 test -x conftest$ac_exeext
2556       }; then :
2557  ac_retval=0
2558else
2559  $as_echo "$as_me: failed program was:" >&5
2560sed 's/^/| /' conftest.$ac_ext >&5
2561
2562	ac_retval=1
2563fi
2564  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2565  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2566  # interfere with the next link command; also delete a directory that is
2567  # left behind by Apple's compiler.  We do this before executing the actions.
2568  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2569  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2570  as_fn_set_status $ac_retval
2571
2572} # ac_fn_c_try_link
2573
2574# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2575# ---------------------------------------------------------
2576# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2577# the include files in INCLUDES and setting the cache variable VAR
2578# accordingly.
2579ac_fn_cxx_check_header_mongrel ()
2580{
2581  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2582  if eval \${$3+:} false; then :
2583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2584$as_echo_n "checking for $2... " >&6; }
2585if eval \${$3+:} false; then :
2586  $as_echo_n "(cached) " >&6
2587fi
2588eval ac_res=\$$3
2589	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2590$as_echo "$ac_res" >&6; }
2591else
2592  # Is the header compilable?
2593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2594$as_echo_n "checking $2 usability... " >&6; }
2595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2596/* end confdefs.h.  */
2597$4
2598#include <$2>
2599_ACEOF
2600if ac_fn_cxx_try_compile "$LINENO"; then :
2601  ac_header_compiler=yes
2602else
2603  ac_header_compiler=no
2604fi
2605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2607$as_echo "$ac_header_compiler" >&6; }
2608
2609# Is the header present?
2610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2611$as_echo_n "checking $2 presence... " >&6; }
2612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2613/* end confdefs.h.  */
2614#include <$2>
2615_ACEOF
2616if ac_fn_cxx_try_cpp "$LINENO"; then :
2617  ac_header_preproc=yes
2618else
2619  ac_header_preproc=no
2620fi
2621rm -f conftest.err conftest.i conftest.$ac_ext
2622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2623$as_echo "$ac_header_preproc" >&6; }
2624
2625# So?  What about this header?
2626case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2627  yes:no: )
2628    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2629$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2630    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2631$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2632    ;;
2633  no:yes:* )
2634    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2635$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2636    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2637$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2638    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2639$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2640    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2641$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2642    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2643$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2644( $as_echo "## ----------------------------------------- ##
2645## Report this to build-dev@openjdk.java.net ##
2646## ----------------------------------------- ##"
2647     ) | sed "s/^/$as_me: WARNING:     /" >&2
2648    ;;
2649esac
2650  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2651$as_echo_n "checking for $2... " >&6; }
2652if eval \${$3+:} false; then :
2653  $as_echo_n "(cached) " >&6
2654else
2655  eval "$3=\$ac_header_compiler"
2656fi
2657eval ac_res=\$$3
2658	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2659$as_echo "$ac_res" >&6; }
2660fi
2661  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2662
2663} # ac_fn_cxx_check_header_mongrel
2664
2665# ac_fn_cxx_try_run LINENO
2666# ------------------------
2667# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2668# that executables *can* be run.
2669ac_fn_cxx_try_run ()
2670{
2671  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2672  if { { ac_try="$ac_link"
2673case "(($ac_try" in
2674  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2675  *) ac_try_echo=$ac_try;;
2676esac
2677eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2678$as_echo "$ac_try_echo"; } >&5
2679  (eval "$ac_link") 2>&5
2680  ac_status=$?
2681  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2682  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2683  { { case "(($ac_try" in
2684  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2685  *) ac_try_echo=$ac_try;;
2686esac
2687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2688$as_echo "$ac_try_echo"; } >&5
2689  (eval "$ac_try") 2>&5
2690  ac_status=$?
2691  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2692  test $ac_status = 0; }; }; then :
2693  ac_retval=0
2694else
2695  $as_echo "$as_me: program exited with status $ac_status" >&5
2696       $as_echo "$as_me: failed program was:" >&5
2697sed 's/^/| /' conftest.$ac_ext >&5
2698
2699       ac_retval=$ac_status
2700fi
2701  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2702  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2703  as_fn_set_status $ac_retval
2704
2705} # ac_fn_cxx_try_run
2706
2707# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2708# ---------------------------------------------------------
2709# Tests whether HEADER exists and can be compiled using the include files in
2710# INCLUDES, setting the cache variable VAR accordingly.
2711ac_fn_cxx_check_header_compile ()
2712{
2713  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2714  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2715$as_echo_n "checking for $2... " >&6; }
2716if eval \${$3+:} false; then :
2717  $as_echo_n "(cached) " >&6
2718else
2719  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2720/* end confdefs.h.  */
2721$4
2722#include <$2>
2723_ACEOF
2724if ac_fn_cxx_try_compile "$LINENO"; then :
2725  eval "$3=yes"
2726else
2727  eval "$3=no"
2728fi
2729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2730fi
2731eval ac_res=\$$3
2732	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2733$as_echo "$ac_res" >&6; }
2734  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2735
2736} # ac_fn_cxx_check_header_compile
2737
2738# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2739# ----------------------------------------------
2740# Tries to find the compile-time value of EXPR in a program that includes
2741# INCLUDES, setting VAR accordingly. Returns whether the value could be
2742# computed
2743ac_fn_cxx_compute_int ()
2744{
2745  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2746  if test "$cross_compiling" = yes; then
2747    # Depending upon the size, compute the lo and hi bounds.
2748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2749/* end confdefs.h.  */
2750$4
2751int
2752main ()
2753{
2754static int test_array [1 - 2 * !(($2) >= 0)];
2755test_array [0] = 0;
2756return test_array [0];
2757
2758  ;
2759  return 0;
2760}
2761_ACEOF
2762if ac_fn_cxx_try_compile "$LINENO"; then :
2763  ac_lo=0 ac_mid=0
2764  while :; do
2765    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2766/* end confdefs.h.  */
2767$4
2768int
2769main ()
2770{
2771static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2772test_array [0] = 0;
2773return test_array [0];
2774
2775  ;
2776  return 0;
2777}
2778_ACEOF
2779if ac_fn_cxx_try_compile "$LINENO"; then :
2780  ac_hi=$ac_mid; break
2781else
2782  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2783			if test $ac_lo -le $ac_mid; then
2784			  ac_lo= ac_hi=
2785			  break
2786			fi
2787			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2788fi
2789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2790  done
2791else
2792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2793/* end confdefs.h.  */
2794$4
2795int
2796main ()
2797{
2798static int test_array [1 - 2 * !(($2) < 0)];
2799test_array [0] = 0;
2800return test_array [0];
2801
2802  ;
2803  return 0;
2804}
2805_ACEOF
2806if ac_fn_cxx_try_compile "$LINENO"; then :
2807  ac_hi=-1 ac_mid=-1
2808  while :; do
2809    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2810/* end confdefs.h.  */
2811$4
2812int
2813main ()
2814{
2815static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2816test_array [0] = 0;
2817return test_array [0];
2818
2819  ;
2820  return 0;
2821}
2822_ACEOF
2823if ac_fn_cxx_try_compile "$LINENO"; then :
2824  ac_lo=$ac_mid; break
2825else
2826  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2827			if test $ac_mid -le $ac_hi; then
2828			  ac_lo= ac_hi=
2829			  break
2830			fi
2831			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2832fi
2833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2834  done
2835else
2836  ac_lo= ac_hi=
2837fi
2838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2839fi
2840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2841# Binary search between lo and hi bounds.
2842while test "x$ac_lo" != "x$ac_hi"; do
2843  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2844  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2845/* end confdefs.h.  */
2846$4
2847int
2848main ()
2849{
2850static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2851test_array [0] = 0;
2852return test_array [0];
2853
2854  ;
2855  return 0;
2856}
2857_ACEOF
2858if ac_fn_cxx_try_compile "$LINENO"; then :
2859  ac_hi=$ac_mid
2860else
2861  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2862fi
2863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2864done
2865case $ac_lo in #((
2866?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2867'') ac_retval=1 ;;
2868esac
2869  else
2870    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2871/* end confdefs.h.  */
2872$4
2873static long int longval () { return $2; }
2874static unsigned long int ulongval () { return $2; }
2875#include <stdio.h>
2876#include <stdlib.h>
2877int
2878main ()
2879{
2880
2881  FILE *f = fopen ("conftest.val", "w");
2882  if (! f)
2883    return 1;
2884  if (($2) < 0)
2885    {
2886      long int i = longval ();
2887      if (i != ($2))
2888	return 1;
2889      fprintf (f, "%ld", i);
2890    }
2891  else
2892    {
2893      unsigned long int i = ulongval ();
2894      if (i != ($2))
2895	return 1;
2896      fprintf (f, "%lu", i);
2897    }
2898  /* Do not output a trailing newline, as this causes \r\n confusion
2899     on some platforms.  */
2900  return ferror (f) || fclose (f) != 0;
2901
2902  ;
2903  return 0;
2904}
2905_ACEOF
2906if ac_fn_cxx_try_run "$LINENO"; then :
2907  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2908else
2909  ac_retval=1
2910fi
2911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2912  conftest.$ac_objext conftest.beam conftest.$ac_ext
2913rm -f conftest.val
2914
2915  fi
2916  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2917  as_fn_set_status $ac_retval
2918
2919} # ac_fn_cxx_compute_int
2920
2921# ac_fn_cxx_try_link LINENO
2922# -------------------------
2923# Try to link conftest.$ac_ext, and return whether this succeeded.
2924ac_fn_cxx_try_link ()
2925{
2926  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2927  rm -f conftest.$ac_objext conftest$ac_exeext
2928  if { { ac_try="$ac_link"
2929case "(($ac_try" in
2930  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2931  *) ac_try_echo=$ac_try;;
2932esac
2933eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2934$as_echo "$ac_try_echo"; } >&5
2935  (eval "$ac_link") 2>conftest.err
2936  ac_status=$?
2937  if test -s conftest.err; then
2938    grep -v '^ *+' conftest.err >conftest.er1
2939    cat conftest.er1 >&5
2940    mv -f conftest.er1 conftest.err
2941  fi
2942  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2943  test $ac_status = 0; } && {
2944	 test -z "$ac_cxx_werror_flag" ||
2945	 test ! -s conftest.err
2946       } && test -s conftest$ac_exeext && {
2947	 test "$cross_compiling" = yes ||
2948	 test -x conftest$ac_exeext
2949       }; then :
2950  ac_retval=0
2951else
2952  $as_echo "$as_me: failed program was:" >&5
2953sed 's/^/| /' conftest.$ac_ext >&5
2954
2955	ac_retval=1
2956fi
2957  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2958  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2959  # interfere with the next link command; also delete a directory that is
2960  # left behind by Apple's compiler.  We do this before executing the actions.
2961  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2962  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2963  as_fn_set_status $ac_retval
2964
2965} # ac_fn_cxx_try_link
2966
2967# ac_fn_cxx_check_func LINENO FUNC VAR
2968# ------------------------------------
2969# Tests whether FUNC exists, setting the cache variable VAR accordingly
2970ac_fn_cxx_check_func ()
2971{
2972  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2973  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2974$as_echo_n "checking for $2... " >&6; }
2975if eval \${$3+:} false; then :
2976  $as_echo_n "(cached) " >&6
2977else
2978  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2979/* end confdefs.h.  */
2980/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2981   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2982#define $2 innocuous_$2
2983
2984/* System header to define __stub macros and hopefully few prototypes,
2985    which can conflict with char $2 (); below.
2986    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2987    <limits.h> exists even on freestanding compilers.  */
2988
2989#ifdef __STDC__
2990# include <limits.h>
2991#else
2992# include <assert.h>
2993#endif
2994
2995#undef $2
2996
2997/* Override any GCC internal prototype to avoid an error.
2998   Use char because int might match the return type of a GCC
2999   builtin and then its argument prototype would still apply.  */
3000#ifdef __cplusplus
3001extern "C"
3002#endif
3003char $2 ();
3004/* The GNU C library defines this for functions which it implements
3005    to always fail with ENOSYS.  Some functions are actually named
3006    something starting with __ and the normal name is an alias.  */
3007#if defined __stub_$2 || defined __stub___$2
3008choke me
3009#endif
3010
3011int
3012main ()
3013{
3014return $2 ();
3015  ;
3016  return 0;
3017}
3018_ACEOF
3019if ac_fn_cxx_try_link "$LINENO"; then :
3020  eval "$3=yes"
3021else
3022  eval "$3=no"
3023fi
3024rm -f core conftest.err conftest.$ac_objext \
3025    conftest$ac_exeext conftest.$ac_ext
3026fi
3027eval ac_res=\$$3
3028	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3029$as_echo "$ac_res" >&6; }
3030  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3031
3032} # ac_fn_cxx_check_func
3033
3034# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3035# -------------------------------------------------------
3036# Tests whether HEADER exists and can be compiled using the include files in
3037# INCLUDES, setting the cache variable VAR accordingly.
3038ac_fn_c_check_header_compile ()
3039{
3040  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3041  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3042$as_echo_n "checking for $2... " >&6; }
3043if eval \${$3+:} false; then :
3044  $as_echo_n "(cached) " >&6
3045else
3046  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3047/* end confdefs.h.  */
3048$4
3049#include <$2>
3050_ACEOF
3051if ac_fn_c_try_compile "$LINENO"; then :
3052  eval "$3=yes"
3053else
3054  eval "$3=no"
3055fi
3056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3057fi
3058eval ac_res=\$$3
3059	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3060$as_echo "$ac_res" >&6; }
3061  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3062
3063} # ac_fn_c_check_header_compile
3064cat >config.log <<_ACEOF
3065This file contains any messages produced by compilers while
3066running configure, to aid debugging if configure makes a mistake.
3067
3068It was created by OpenJDK $as_me jdk9, which was
3069generated by GNU Autoconf 2.69.  Invocation command line was
3070
3071  $ $0 $@
3072
3073_ACEOF
3074exec 5>>config.log
3075{
3076cat <<_ASUNAME
3077## --------- ##
3078## Platform. ##
3079## --------- ##
3080
3081hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3082uname -m = `(uname -m) 2>/dev/null || echo unknown`
3083uname -r = `(uname -r) 2>/dev/null || echo unknown`
3084uname -s = `(uname -s) 2>/dev/null || echo unknown`
3085uname -v = `(uname -v) 2>/dev/null || echo unknown`
3086
3087/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3088/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3089
3090/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3091/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3092/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3093/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3094/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3095/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3096/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3097
3098_ASUNAME
3099
3100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3101for as_dir in $PATH
3102do
3103  IFS=$as_save_IFS
3104  test -z "$as_dir" && as_dir=.
3105    $as_echo "PATH: $as_dir"
3106  done
3107IFS=$as_save_IFS
3108
3109} >&5
3110
3111cat >&5 <<_ACEOF
3112
3113
3114## ----------- ##
3115## Core tests. ##
3116## ----------- ##
3117
3118_ACEOF
3119
3120
3121# Keep a trace of the command line.
3122# Strip out --no-create and --no-recursion so they do not pile up.
3123# Strip out --silent because we don't want to record it for future runs.
3124# Also quote any args containing shell meta-characters.
3125# Make two passes to allow for proper duplicate-argument suppression.
3126ac_configure_args=
3127ac_configure_args0=
3128ac_configure_args1=
3129ac_must_keep_next=false
3130for ac_pass in 1 2
3131do
3132  for ac_arg
3133  do
3134    case $ac_arg in
3135    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3136    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3137    | -silent | --silent | --silen | --sile | --sil)
3138      continue ;;
3139    *\'*)
3140      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3141    esac
3142    case $ac_pass in
3143    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3144    2)
3145      as_fn_append ac_configure_args1 " '$ac_arg'"
3146      if test $ac_must_keep_next = true; then
3147	ac_must_keep_next=false # Got value, back to normal.
3148      else
3149	case $ac_arg in
3150	  *=* | --config-cache | -C | -disable-* | --disable-* \
3151	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3152	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3153	  | -with-* | --with-* | -without-* | --without-* | --x)
3154	    case "$ac_configure_args0 " in
3155	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3156	    esac
3157	    ;;
3158	  -* ) ac_must_keep_next=true ;;
3159	esac
3160      fi
3161      as_fn_append ac_configure_args " '$ac_arg'"
3162      ;;
3163    esac
3164  done
3165done
3166{ ac_configure_args0=; unset ac_configure_args0;}
3167{ ac_configure_args1=; unset ac_configure_args1;}
3168
3169# When interrupted or exit'd, cleanup temporary files, and complete
3170# config.log.  We remove comments because anyway the quotes in there
3171# would cause problems or look ugly.
3172# WARNING: Use '\'' to represent an apostrophe within the trap.
3173# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3174trap 'exit_status=$?
3175  # Save into config.log some information that might help in debugging.
3176  {
3177    echo
3178
3179    $as_echo "## ---------------- ##
3180## Cache variables. ##
3181## ---------------- ##"
3182    echo
3183    # The following way of writing the cache mishandles newlines in values,
3184(
3185  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3186    eval ac_val=\$$ac_var
3187    case $ac_val in #(
3188    *${as_nl}*)
3189      case $ac_var in #(
3190      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3191$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3192      esac
3193      case $ac_var in #(
3194      _ | IFS | as_nl) ;; #(
3195      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3196      *) { eval $ac_var=; unset $ac_var;} ;;
3197      esac ;;
3198    esac
3199  done
3200  (set) 2>&1 |
3201    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3202    *${as_nl}ac_space=\ *)
3203      sed -n \
3204	"s/'\''/'\''\\\\'\'''\''/g;
3205	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3206      ;; #(
3207    *)
3208      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3209      ;;
3210    esac |
3211    sort
3212)
3213    echo
3214
3215    $as_echo "## ----------------- ##
3216## Output variables. ##
3217## ----------------- ##"
3218    echo
3219    for ac_var in $ac_subst_vars
3220    do
3221      eval ac_val=\$$ac_var
3222      case $ac_val in
3223      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3224      esac
3225      $as_echo "$ac_var='\''$ac_val'\''"
3226    done | sort
3227    echo
3228
3229    if test -n "$ac_subst_files"; then
3230      $as_echo "## ------------------- ##
3231## File substitutions. ##
3232## ------------------- ##"
3233      echo
3234      for ac_var in $ac_subst_files
3235      do
3236	eval ac_val=\$$ac_var
3237	case $ac_val in
3238	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3239	esac
3240	$as_echo "$ac_var='\''$ac_val'\''"
3241      done | sort
3242      echo
3243    fi
3244
3245    if test -s confdefs.h; then
3246      $as_echo "## ----------- ##
3247## confdefs.h. ##
3248## ----------- ##"
3249      echo
3250      cat confdefs.h
3251      echo
3252    fi
3253    test "$ac_signal" != 0 &&
3254      $as_echo "$as_me: caught signal $ac_signal"
3255    $as_echo "$as_me: exit $exit_status"
3256  } >&5
3257  rm -f core *.core core.conftest.* &&
3258    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3259    exit $exit_status
3260' 0
3261for ac_signal in 1 2 13 15; do
3262  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3263done
3264ac_signal=0
3265
3266# confdefs.h avoids OS command line length limits that DEFS can exceed.
3267rm -f -r conftest* confdefs.h
3268
3269$as_echo "/* confdefs.h */" > confdefs.h
3270
3271# Predefined preprocessor variables.
3272
3273cat >>confdefs.h <<_ACEOF
3274#define PACKAGE_NAME "$PACKAGE_NAME"
3275_ACEOF
3276
3277cat >>confdefs.h <<_ACEOF
3278#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3279_ACEOF
3280
3281cat >>confdefs.h <<_ACEOF
3282#define PACKAGE_VERSION "$PACKAGE_VERSION"
3283_ACEOF
3284
3285cat >>confdefs.h <<_ACEOF
3286#define PACKAGE_STRING "$PACKAGE_STRING"
3287_ACEOF
3288
3289cat >>confdefs.h <<_ACEOF
3290#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3291_ACEOF
3292
3293cat >>confdefs.h <<_ACEOF
3294#define PACKAGE_URL "$PACKAGE_URL"
3295_ACEOF
3296
3297
3298# Let the site file select an alternate cache file if it wants to.
3299# Prefer an explicitly selected file to automatically selected ones.
3300ac_site_file1=NONE
3301ac_site_file2=NONE
3302if test -n "$CONFIG_SITE"; then
3303  # We do not want a PATH search for config.site.
3304  case $CONFIG_SITE in #((
3305    -*)  ac_site_file1=./$CONFIG_SITE;;
3306    */*) ac_site_file1=$CONFIG_SITE;;
3307    *)   ac_site_file1=./$CONFIG_SITE;;
3308  esac
3309elif test "x$prefix" != xNONE; then
3310  ac_site_file1=$prefix/share/config.site
3311  ac_site_file2=$prefix/etc/config.site
3312else
3313  ac_site_file1=$ac_default_prefix/share/config.site
3314  ac_site_file2=$ac_default_prefix/etc/config.site
3315fi
3316for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3317do
3318  test "x$ac_site_file" = xNONE && continue
3319  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3320    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3321$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3322    sed 's/^/| /' "$ac_site_file" >&5
3323    . "$ac_site_file" \
3324      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3325$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3326as_fn_error $? "failed to load site script $ac_site_file
3327See \`config.log' for more details" "$LINENO" 5; }
3328  fi
3329done
3330
3331if test -r "$cache_file"; then
3332  # Some versions of bash will fail to source /dev/null (special files
3333  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3334  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3335    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3336$as_echo "$as_me: loading cache $cache_file" >&6;}
3337    case $cache_file in
3338      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3339      *)                      . "./$cache_file";;
3340    esac
3341  fi
3342else
3343  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3344$as_echo "$as_me: creating cache $cache_file" >&6;}
3345  >$cache_file
3346fi
3347
3348# Check that the precious variables saved in the cache have kept the same
3349# value.
3350ac_cache_corrupted=false
3351for ac_var in $ac_precious_vars; do
3352  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3353  eval ac_new_set=\$ac_env_${ac_var}_set
3354  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3355  eval ac_new_val=\$ac_env_${ac_var}_value
3356  case $ac_old_set,$ac_new_set in
3357    set,)
3358      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3359$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3360      ac_cache_corrupted=: ;;
3361    ,set)
3362      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3363$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3364      ac_cache_corrupted=: ;;
3365    ,);;
3366    *)
3367      if test "x$ac_old_val" != "x$ac_new_val"; then
3368	# differences in whitespace do not lead to failure.
3369	ac_old_val_w=`echo x $ac_old_val`
3370	ac_new_val_w=`echo x $ac_new_val`
3371	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3372	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3373$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3374	  ac_cache_corrupted=:
3375	else
3376	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3377$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3378	  eval $ac_var=\$ac_old_val
3379	fi
3380	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3381$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3382	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3383$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3384      fi;;
3385  esac
3386  # Pass precious variables to config.status.
3387  if test "$ac_new_set" = set; then
3388    case $ac_new_val in
3389    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3390    *) ac_arg=$ac_var=$ac_new_val ;;
3391    esac
3392    case " $ac_configure_args " in
3393      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3394      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3395    esac
3396  fi
3397done
3398if $ac_cache_corrupted; then
3399  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3400$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3401  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3402$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3403  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3404fi
3405## -------------------- ##
3406## Main body of script. ##
3407## -------------------- ##
3408
3409ac_ext=c
3410ac_cpp='$CPP $CPPFLAGS'
3411ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3412ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3413ac_compiler_gnu=$ac_cv_c_compiler_gnu
3414
3415
3416
3417ac_aux_dir=
3418for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3419  if test -f "$ac_dir/install-sh"; then
3420    ac_aux_dir=$ac_dir
3421    ac_install_sh="$ac_aux_dir/install-sh -c"
3422    break
3423  elif test -f "$ac_dir/install.sh"; then
3424    ac_aux_dir=$ac_dir
3425    ac_install_sh="$ac_aux_dir/install.sh -c"
3426    break
3427  elif test -f "$ac_dir/shtool"; then
3428    ac_aux_dir=$ac_dir
3429    ac_install_sh="$ac_aux_dir/shtool install -c"
3430    break
3431  fi
3432done
3433if test -z "$ac_aux_dir"; then
3434  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
3435fi
3436
3437# These three variables are undocumented and unsupported,
3438# and are intended to be withdrawn in a future Autoconf release.
3439# They can cause serious problems if a builder's source tree is in a directory
3440# whose full name contains unusual characters.
3441ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3442ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3443ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3444
3445
3446# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3447
3448#
3449# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3450# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3451#
3452# This code is free software; you can redistribute it and/or modify it
3453# under the terms of the GNU General Public License version 2 only, as
3454# published by the Free Software Foundation.  Oracle designates this
3455# particular file as subject to the "Classpath" exception as provided
3456# by Oracle in the LICENSE file that accompanied this code.
3457#
3458# This code is distributed in the hope that it will be useful, but WITHOUT
3459# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3460# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3461# version 2 for more details (a copy is included in the LICENSE file that
3462# accompanied this code).
3463#
3464# You should have received a copy of the GNU General Public License version
3465# 2 along with this work; if not, write to the Free Software Foundation,
3466# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3467#
3468# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3469# or visit www.oracle.com if you need additional information or have any
3470# questions.
3471#
3472
3473#
3474# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3475#
3476# This program is free software; you can redistribute it and/or modify
3477# it under the terms of the GNU General Public License as published by
3478# the Free Software Foundation; either version 2 of the License, or
3479# (at your option) any later version.
3480#
3481# This program is distributed in the hope that it will be useful, but
3482# WITHOUT ANY WARRANTY; without even the implied warranty of
3483# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3484# General Public License for more details.
3485#
3486# You should have received a copy of the GNU General Public License
3487# along with this program; if not, write to the Free Software
3488# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3489#
3490# As a special exception to the GNU General Public License, if you
3491# distribute this file as part of a program that contains a
3492# configuration script generated by Autoconf, you may include it under
3493# the same distribution terms that you use for the rest of that program.
3494
3495# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3496# ----------------------------------
3497# PKG_PROG_PKG_CONFIG
3498
3499# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3500#
3501# Check to see whether a particular set of modules exists.  Similar
3502# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3503#
3504#
3505# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3506# this or PKG_CHECK_MODULES is called, or make sure to call
3507# PKG_CHECK_EXISTS manually
3508# --------------------------------------------------------------
3509
3510
3511
3512# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3513# ---------------------------------------------
3514# _PKG_CONFIG
3515
3516# _PKG_SHORT_ERRORS_SUPPORTED
3517# -----------------------------
3518# _PKG_SHORT_ERRORS_SUPPORTED
3519
3520
3521# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3522# [ACTION-IF-NOT-FOUND])
3523#
3524#
3525# Note that if there is a possibility the first call to
3526# PKG_CHECK_MODULES might not happen, you should be sure to include an
3527# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3528#
3529#
3530# --------------------------------------------------------------
3531# PKG_CHECK_MODULES
3532
3533
3534# Include these first...
3535#
3536# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3537# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3538#
3539# This code is free software; you can redistribute it and/or modify it
3540# under the terms of the GNU General Public License version 2 only, as
3541# published by the Free Software Foundation.  Oracle designates this
3542# particular file as subject to the "Classpath" exception as provided
3543# by Oracle in the LICENSE file that accompanied this code.
3544#
3545# This code is distributed in the hope that it will be useful, but WITHOUT
3546# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3547# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3548# version 2 for more details (a copy is included in the LICENSE file that
3549# accompanied this code).
3550#
3551# You should have received a copy of the GNU General Public License version
3552# 2 along with this work; if not, write to the Free Software Foundation,
3553# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3554#
3555# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3556# or visit www.oracle.com if you need additional information or have any
3557# questions.
3558#
3559
3560# Create a function/macro that takes a series of named arguments. The call is
3561# similar to AC_DEFUN, but the setup of the function looks like this:
3562# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3563# ... do something
3564#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3565# ])
3566# A star (*) in front of a named argument means that it is required and it's
3567# presence will be verified. To pass e.g. the first value as a normal indexed
3568# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3569# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3570# "ARG_FOO".
3571#
3572# The generated function can be called like this:
3573# MYFUNC(FOO: [foo-val],
3574#     BAR: [
3575#         $ECHO hello world
3576#     ])
3577# Note that the argument value must start on the same line as the argument name.
3578#
3579# Argument 1: Name of the function to define
3580# Argument 2: List of legal named arguments, with a * prefix for required arguments
3581# Argument 3: Argument array to treat as named, typically $@
3582# Argument 4: The main function body
3583
3584
3585# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3586# If so, then append $1 to $2 \
3587# Also set JVM_ARG_OK to true/false depending on outcome.
3588
3589
3590# Appends a string to a path variable, only adding the : when needed.
3591
3592
3593# Prepends a string to a path variable, only adding the : when needed.
3594
3595
3596# This will make sure the given variable points to a full and proper
3597# path. This means:
3598# 1) There will be no spaces in the path. On unix platforms,
3599#    spaces in the path will result in an error. On Windows,
3600#    the path will be rewritten using short-style to be space-free.
3601# 2) The path will be absolute, and it will be in unix-style (on
3602#     cygwin).
3603# $1: The name of the variable to fix
3604
3605
3606# This will make sure the given variable points to a executable
3607# with a full and proper path. This means:
3608# 1) There will be no spaces in the path. On unix platforms,
3609#    spaces in the path will result in an error. On Windows,
3610#    the path will be rewritten using short-style to be space-free.
3611# 2) The path will be absolute, and it will be in unix-style (on
3612#     cygwin).
3613# Any arguments given to the executable is preserved.
3614# If the input variable does not have a directory specification, then
3615# it need to be in the PATH.
3616# $1: The name of the variable to fix
3617
3618
3619
3620
3621# Register a --with argument but mark it as deprecated
3622# $1: The name of the with argument to deprecate, not including --with-
3623
3624
3625# Register a --enable argument but mark it as deprecated
3626# $1: The name of the with argument to deprecate, not including --enable-
3627# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3628# $3: Messages to user.
3629
3630
3631
3632
3633# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3634# $1: variable to check
3635
3636
3637# Check that there are no unprocessed overridden variables left.
3638# If so, they are an incorrect argument and we will exit with an error.
3639
3640
3641# Setup a tool for the given variable. If correctly specified by the user,
3642# use that value, otherwise search for the tool using the supplied code snippet.
3643# $1: variable to set
3644# $2: code snippet to call to look for the tool
3645# $3: code snippet to call if variable was used to find tool
3646
3647
3648# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3649# $1: variable to set
3650# $2: executable name (or list of names) to look for
3651
3652
3653# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3654# $1: variable to set
3655# $2: executable name (or list of names) to look for
3656
3657
3658# Like BASIC_PATH_PROGS but fails if no tool was found.
3659# $1: variable to set
3660# $2: executable name (or list of names) to look for
3661
3662
3663# Like BASIC_SETUP_TOOL but fails if no tool was found.
3664# $1: variable to set
3665# $2: autoconf macro to call to look for the special tool
3666
3667
3668# Setup the most fundamental tools that relies on not much else to set up,
3669# but is used by much of the early bootstrap code.
3670
3671
3672# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3673
3674
3675# Evaluates platform specific overrides for devkit variables.
3676# $1: Name of variable
3677
3678
3679
3680
3681
3682
3683#%%% Simple tools %%%
3684
3685# Check if we have found a usable version of make
3686# $1: the path to a potential make binary (or empty)
3687# $2: the description on how we found this
3688
3689
3690
3691
3692# Goes looking for a usable version of GNU make.
3693
3694
3695
3696
3697
3698
3699# Check if build directory is on local disk. If not possible to determine,
3700# we prefer to claim it's local.
3701# Argument 1: directory to test
3702# Argument 2: what to do if it is on local disk
3703# Argument 3: what to do otherwise (remote disk or failure)
3704
3705
3706# Check that source files have basic read permissions set. This might
3707# not be the case in cygwin in certain conditions.
3708
3709
3710
3711
3712# Check for support for specific options in bash
3713
3714
3715################################################################################
3716#
3717# Default make target
3718#
3719
3720
3721# Code to run after AC_OUTPUT
3722
3723
3724#
3725# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3726# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3727#
3728# This code is free software; you can redistribute it and/or modify it
3729# under the terms of the GNU General Public License version 2 only, as
3730# published by the Free Software Foundation.  Oracle designates this
3731# particular file as subject to the "Classpath" exception as provided
3732# by Oracle in the LICENSE file that accompanied this code.
3733#
3734# This code is distributed in the hope that it will be useful, but WITHOUT
3735# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3736# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3737# version 2 for more details (a copy is included in the LICENSE file that
3738# accompanied this code).
3739#
3740# You should have received a copy of the GNU General Public License version
3741# 2 along with this work; if not, write to the Free Software Foundation,
3742# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3743#
3744# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3745# or visit www.oracle.com if you need additional information or have any
3746# questions.
3747#
3748
3749
3750
3751
3752
3753# Helper function which possibly converts a path using DOS-style short mode.
3754# If so, the updated path is stored in $new_path.
3755# $1: The path to check
3756
3757
3758# Helper function which possibly converts a path using DOS-style short mode.
3759# If so, the updated path is stored in $new_path.
3760# $1: The path to check
3761
3762
3763# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3764# and could probably be heavily simplified. However, all changes in this
3765# area tend to need lot of testing in different scenarios, and in lack of
3766# proper unit testing, cleaning this up has not been deemed worth the effort
3767# at the moment.
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3778
3779
3780
3781
3782# ... then the rest
3783#
3784# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3785# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3786#
3787# This code is free software; you can redistribute it and/or modify it
3788# under the terms of the GNU General Public License version 2 only, as
3789# published by the Free Software Foundation.  Oracle designates this
3790# particular file as subject to the "Classpath" exception as provided
3791# by Oracle in the LICENSE file that accompanied this code.
3792#
3793# This code is distributed in the hope that it will be useful, but WITHOUT
3794# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3795# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3796# version 2 for more details (a copy is included in the LICENSE file that
3797# accompanied this code).
3798#
3799# You should have received a copy of the GNU General Public License version
3800# 2 along with this work; if not, write to the Free Software Foundation,
3801# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3802#
3803# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3804# or visit www.oracle.com if you need additional information or have any
3805# questions.
3806#
3807
3808########################################################################
3809# This file handles detection of the Boot JDK. The Boot JDK detection
3810# process has been developed as a response to solve a complex real-world
3811# problem. Initially, it was simple, but it has grown as platform after
3812# platform, idiosyncracy after idiosyncracy has been supported.
3813#
3814# The basic idea is this:
3815# 1) You need an acceptable *) JDK to use as a Boot JDK
3816# 2) There are several ways to locate a JDK, that are mostly platform
3817#    dependent **)
3818# 3) You can have multiple JDKs installed
3819# 4) If possible, configure should try to dig out an acceptable JDK
3820#    automatically, without having to resort to command-line options
3821#
3822# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3823#     javac) and not a JRE, etc.
3824#
3825# **) On Windows we typically use a well-known path.
3826#     On MacOSX we typically use the tool java_home.
3827#     On Linux we typically find javac in the $PATH, and then follow a
3828#     chain of symlinks that often ends up in a real JDK.
3829#
3830# This leads to the code where we check in different ways to locate a
3831# JDK, and if one is found, check if it is acceptable. If not, we print
3832# our reasons for rejecting it (useful when debugging non-working
3833# configure situations) and continue checking the next one.
3834########################################################################
3835
3836# Execute the check given as argument, and verify the result
3837# If the Boot JDK was previously found, do nothing
3838# $1 A command line (typically autoconf macro) to execute
3839
3840
3841# Test: Is bootjdk explicitely set by command line arguments?
3842
3843
3844# Test: Is $JAVA_HOME set?
3845
3846
3847# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3848
3849
3850# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3851# $1: Argument to the java_home binary (optional)
3852
3853
3854# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3855
3856
3857# Look for a jdk in the given path. If there are multiple, try to select the newest.
3858# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3859# $1 = Path to directory containing jdk installations.
3860# $2 = String to append to the found JDK directory to get the proper JDK home
3861
3862
3863# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3864# environmental variable as base for where to look.
3865# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3866
3867
3868# Test: Is there a JDK installed in default, well-known locations?
3869
3870
3871# Check that a command-line tool in the Boot JDK is correct
3872# $1 = name of variable to assign
3873# $2 = name of binary
3874
3875
3876###############################################################################
3877#
3878# We need a Boot JDK to bootstrap the build.
3879#
3880
3881
3882
3883
3884
3885# BUILD_JDK: the location of the latest JDK that can run
3886#   on the host system and supports the target class file version
3887#   generated in this JDK build.  This variable should only be
3888#   used after the launchers are built.
3889#
3890
3891# Execute the check given as argument, and verify the result.
3892# If the JDK was previously found, do nothing.
3893# $1 A command line (typically autoconf macro) to execute
3894
3895
3896# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3897# is different than the host system doing the build (e.g. cross-compilation),
3898# a special BUILD_JDK is built as part of the build process.  An external
3899# prebuilt BUILD_JDK can also be supplied.
3900
3901
3902#
3903# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3904# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3905#
3906# This code is free software; you can redistribute it and/or modify it
3907# under the terms of the GNU General Public License version 2 only, as
3908# published by the Free Software Foundation.  Oracle designates this
3909# particular file as subject to the "Classpath" exception as provided
3910# by Oracle in the LICENSE file that accompanied this code.
3911#
3912# This code is distributed in the hope that it will be useful, but WITHOUT
3913# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3914# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3915# version 2 for more details (a copy is included in the LICENSE file that
3916# accompanied this code).
3917#
3918# You should have received a copy of the GNU General Public License version
3919# 2 along with this work; if not, write to the Free Software Foundation,
3920# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3921#
3922# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3923# or visit www.oracle.com if you need additional information or have any
3924# questions.
3925#
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943################################################################################
3944#
3945# Runs icecc-create-env once and prints the error if it fails
3946#
3947# $1: arguments to icecc-create-env
3948# $2: log file
3949#
3950
3951
3952################################################################################
3953#
3954# Optionally enable distributed compilation of native code using icecc/icecream
3955#
3956
3957
3958
3959
3960
3961
3962
3963#
3964# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3965# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3966#
3967# This code is free software; you can redistribute it and/or modify it
3968# under the terms of the GNU General Public License version 2 only, as
3969# published by the Free Software Foundation.  Oracle designates this
3970# particular file as subject to the "Classpath" exception as provided
3971# by Oracle in the LICENSE file that accompanied this code.
3972#
3973# This code is distributed in the hope that it will be useful, but WITHOUT
3974# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3975# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3976# version 2 for more details (a copy is included in the LICENSE file that
3977# accompanied this code).
3978#
3979# You should have received a copy of the GNU General Public License version
3980# 2 along with this work; if not, write to the Free Software Foundation,
3981# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3982#
3983# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3984# or visit www.oracle.com if you need additional information or have any
3985# questions.
3986#
3987
3988# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3989# corresponding configure arguments instead
3990
3991
3992# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3993# that configure can use them while detecting compilers.
3994# TOOLCHAIN_TYPE is available here.
3995# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3996
3997
3998
3999
4000
4001
4002# Documentation on common flags used for solstudio in HIGHEST.
4003#
4004# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4005#          done with care, there are some assumptions below that need to
4006#          be understood about the use of pointers, and IEEE behavior.
4007#
4008# -fns: Use non-standard floating point mode (not IEEE 754)
4009# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4010# -fsingle: Use single precision floating point with 'float'
4011# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4012#   (Source with excessing pointer casting and data access with mixed
4013#    pointer types are not recommended)
4014# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4015#   (If you expect perfect errno behavior, do not use this)
4016# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4017# -xrestrict: Pointer parameters to functions do not overlap
4018#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4019#    If you pass in multiple pointers to the same data, do not use this)
4020# -xlibmil: Inline some library routines
4021#   (If you expect perfect errno behavior, do not use this)
4022# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4023#   (If you expect perfect errno behavior, do not use this)
4024#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4025
4026    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4027    # Bug?
4028    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4029    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4030    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4031    #fi
4032
4033
4034
4035
4036
4037
4038################################################################################
4039# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4040#      conditionals against.
4041# $2 - Optional prefix for each variable defined.
4042
4043
4044# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4045#                                  IF_FALSE: [RUN-IF-FALSE])
4046# ------------------------------------------------------------
4047# Check that the C compiler supports an argument
4048
4049
4050
4051
4052# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4053#                                    IF_FALSE: [RUN-IF-FALSE])
4054# ------------------------------------------------------------
4055# Check that the C++ compiler supports an argument
4056
4057
4058
4059
4060# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4061#                                IF_FALSE: [RUN-IF-FALSE])
4062# ------------------------------------------------------------
4063# Check that the C and C++ compilers support an argument
4064
4065
4066
4067
4068# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4069#                                   IF_FALSE: [RUN-IF-FALSE])
4070# ------------------------------------------------------------
4071# Check that the linker support an argument
4072
4073
4074
4075
4076
4077
4078
4079
4080#
4081# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4082# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4083#
4084# This code is free software; you can redistribute it and/or modify it
4085# under the terms of the GNU General Public License version 2 only, as
4086# published by the Free Software Foundation.  Oracle designates this
4087# particular file as subject to the "Classpath" exception as provided
4088# by Oracle in the LICENSE file that accompanied this code.
4089#
4090# This code is distributed in the hope that it will be useful, but WITHOUT
4091# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4092# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4093# version 2 for more details (a copy is included in the LICENSE file that
4094# accompanied this code).
4095#
4096# You should have received a copy of the GNU General Public License version
4097# 2 along with this work; if not, write to the Free Software Foundation,
4098# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4099#
4100# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4101# or visit www.oracle.com if you need additional information or have any
4102# questions.
4103#
4104
4105
4106
4107
4108
4109cygwin_help() {
4110  case $1 in
4111    unzip)
4112      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4113      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4114      ;;
4115    zip)
4116      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4117      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4118      ;;
4119    make)
4120      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4121      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4122      ;;
4123    freetype)
4124      HELP_MSG="
4125The freetype library can now be build during the configure process.
4126Download the freetype sources and unpack them into an arbitrary directory:
4127
4128wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4129tar -xzf freetype-2.5.3.tar.gz
4130
4131Then run configure with '--with-freetype-src=<freetype_src>'. This will
4132automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4133builds or into '<freetype_src>/lib32' for 32-bit builds.
4134Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4135and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4136
4137Alternatively you can unpack the sources like this to use the default directory:
4138
4139tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4140      ;;
4141  esac
4142}
4143
4144msys_help() {
4145  PKGHANDLER_COMMAND=""
4146}
4147
4148apt_help() {
4149  case $1 in
4150    reduced)
4151      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4152    devkit)
4153      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4154    openjdk)
4155      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4156    alsa)
4157      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4158    cups)
4159      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4160    freetype)
4161      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4162    ffi)
4163      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4164    x11)
4165      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4166    ccache)
4167      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4168    dtrace)
4169      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4170  esac
4171}
4172
4173yum_help() {
4174  case $1 in
4175    devkit)
4176      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4177    openjdk)
4178      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4179    alsa)
4180      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4181    cups)
4182      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4183    freetype)
4184      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4185    x11)
4186      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4187    ccache)
4188      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4189  esac
4190}
4191
4192port_help() {
4193  PKGHANDLER_COMMAND=""
4194}
4195
4196pkgutil_help() {
4197  PKGHANDLER_COMMAND=""
4198}
4199
4200pkgadd_help() {
4201  PKGHANDLER_COMMAND=""
4202}
4203
4204# This function will check if we're called from the "configure" wrapper while
4205# printing --help. If so, we will print out additional information that can
4206# only be extracted within the autoconf script, and then exit. This must be
4207# called at the very beginning in configure.ac.
4208
4209
4210
4211
4212
4213
4214#
4215# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4216# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4217#
4218# This code is free software; you can redistribute it and/or modify it
4219# under the terms of the GNU General Public License version 2 only, as
4220# published by the Free Software Foundation.  Oracle designates this
4221# particular file as subject to the "Classpath" exception as provided
4222# by Oracle in the LICENSE file that accompanied this code.
4223#
4224# This code is distributed in the hope that it will be useful, but WITHOUT
4225# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4226# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4227# version 2 for more details (a copy is included in the LICENSE file that
4228# accompanied this code).
4229#
4230# You should have received a copy of the GNU General Public License version
4231# 2 along with this work; if not, write to the Free Software Foundation,
4232# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4233#
4234# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4235# or visit www.oracle.com if you need additional information or have any
4236# questions.
4237#
4238
4239# All valid JVM features, regardless of platform
4240VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4241    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4242
4243# All valid JVM variants
4244VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4245
4246###############################################################################
4247# Check if the specified JVM variant should be built. To be used in shell if
4248# constructs, like this:
4249# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4250#
4251# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4252
4253# Definition kept in one line to allow inlining in if statements.
4254# Additional [] needed to keep m4 from mangling shell constructs.
4255
4256
4257###############################################################################
4258# Check if the specified JVM features are explicitly enabled. To be used in
4259# shell if constructs, like this:
4260# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4261#
4262# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4263
4264# Definition kept in one line to allow inlining in if statements.
4265# Additional [] needed to keep m4 from mangling shell constructs.
4266
4267
4268###############################################################################
4269# Check which variants of the JVM that we want to build. Available variants are:
4270#   server: normal interpreter, and a tiered C1/C2 compiler
4271#   client: normal interpreter, and C1 (no C2 compiler)
4272#   minimal: reduced form of client with optional features stripped out
4273#   core: normal interpreter only, no compiler
4274#   zero: C++ based interpreter only, no compiler
4275#   zeroshark: C++ based interpreter, and a llvm-based compiler
4276#   custom: baseline JVM with no default features
4277#
4278
4279
4280###############################################################################
4281# Check if dtrace should be enabled and has all prerequisites present.
4282#
4283
4284
4285###############################################################################
4286# Set up all JVM features for each JVM variant.
4287#
4288
4289
4290###############################################################################
4291# Validate JVM features once all setup is complete, including custom setup.
4292#
4293
4294
4295###############################################################################
4296# Support for old hotspot build. Remove once new hotspot build has proven
4297# to work satisfactory.
4298#
4299
4300
4301#
4302# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4303# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4304#
4305# This code is free software; you can redistribute it and/or modify it
4306# under the terms of the GNU General Public License version 2 only, as
4307# published by the Free Software Foundation.  Oracle designates this
4308# particular file as subject to the "Classpath" exception as provided
4309# by Oracle in the LICENSE file that accompanied this code.
4310#
4311# This code is distributed in the hope that it will be useful, but WITHOUT
4312# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4313# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4314# version 2 for more details (a copy is included in the LICENSE file that
4315# accompanied this code).
4316#
4317# You should have received a copy of the GNU General Public License version
4318# 2 along with this work; if not, write to the Free Software Foundation,
4319# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4320#
4321# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4322# or visit www.oracle.com if you need additional information or have any
4323# questions.
4324#
4325
4326###############################################################################
4327# Check which variant of the JDK that we want to build.
4328# Currently we have:
4329#    normal:   standard edition
4330# but the custom make system may add other variants
4331#
4332# Effectively the JDK variant gives a name to a specific set of
4333# modules to compile into the JDK.
4334
4335
4336###############################################################################
4337# Set the debug level
4338#    release: no debug information, all optimizations, no asserts.
4339#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4340#    fastdebug: debug information (-g), all optimizations, all asserts
4341#    slowdebug: debug information (-g), no optimizations, all asserts
4342
4343
4344###############################################################################
4345#
4346# Should we build only OpenJDK even if closed sources are present?
4347#
4348
4349
4350
4351
4352###############################################################################
4353#
4354# Enable or disable the elliptic curve crypto implementation
4355#
4356
4357
4358
4359
4360################################################################################
4361#
4362# Gcov coverage data for hotspot
4363#
4364
4365
4366################################################################################
4367#
4368# Static build support.  When enabled will generate static
4369# libraries instead of shared libraries for all JDK libs.
4370#
4371
4372
4373################################################################################
4374#
4375# jlink options.
4376# We always keep packaged modules in JDK image.
4377#
4378
4379
4380#
4381# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4382# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4383#
4384# This code is free software; you can redistribute it and/or modify it
4385# under the terms of the GNU General Public License version 2 only, as
4386# published by the Free Software Foundation.  Oracle designates this
4387# particular file as subject to the "Classpath" exception as provided
4388# by Oracle in the LICENSE file that accompanied this code.
4389#
4390# This code is distributed in the hope that it will be useful, but WITHOUT
4391# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4392# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4393# version 2 for more details (a copy is included in the LICENSE file that
4394# accompanied this code).
4395#
4396# You should have received a copy of the GNU General Public License version
4397# 2 along with this work; if not, write to the Free Software Foundation,
4398# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4399#
4400# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4401# or visit www.oracle.com if you need additional information or have any
4402# questions.
4403#
4404
4405###############################################################################
4406#
4407# Setup version numbers
4408#
4409
4410# Verify that a given string represents a valid version number, and assign it
4411# to a variable.
4412
4413# Argument 1: the variable to assign to
4414# Argument 2: the value given by the user
4415
4416
4417
4418
4419#
4420# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4421# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4422#
4423# This code is free software; you can redistribute it and/or modify it
4424# under the terms of the GNU General Public License version 2 only, as
4425# published by the Free Software Foundation.  Oracle designates this
4426# particular file as subject to the "Classpath" exception as provided
4427# by Oracle in the LICENSE file that accompanied this code.
4428#
4429# This code is distributed in the hope that it will be useful, but WITHOUT
4430# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4431# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4432# version 2 for more details (a copy is included in the LICENSE file that
4433# accompanied this code).
4434#
4435# You should have received a copy of the GNU General Public License version
4436# 2 along with this work; if not, write to the Free Software Foundation,
4437# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4438#
4439# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4440# or visit www.oracle.com if you need additional information or have any
4441# questions.
4442#
4443
4444# Major library component reside in separate files.
4445#
4446# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4447# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4448#
4449# This code is free software; you can redistribute it and/or modify it
4450# under the terms of the GNU General Public License version 2 only, as
4451# published by the Free Software Foundation.  Oracle designates this
4452# particular file as subject to the "Classpath" exception as provided
4453# by Oracle in the LICENSE file that accompanied this code.
4454#
4455# This code is distributed in the hope that it will be useful, but WITHOUT
4456# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4457# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4458# version 2 for more details (a copy is included in the LICENSE file that
4459# accompanied this code).
4460#
4461# You should have received a copy of the GNU General Public License version
4462# 2 along with this work; if not, write to the Free Software Foundation,
4463# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4464#
4465# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4466# or visit www.oracle.com if you need additional information or have any
4467# questions.
4468#
4469
4470################################################################################
4471# Setup alsa (Advanced Linux Sound Architecture)
4472################################################################################
4473
4474
4475#
4476# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4477# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4478#
4479# This code is free software; you can redistribute it and/or modify it
4480# under the terms of the GNU General Public License version 2 only, as
4481# published by the Free Software Foundation.  Oracle designates this
4482# particular file as subject to the "Classpath" exception as provided
4483# by Oracle in the LICENSE file that accompanied this code.
4484#
4485# This code is distributed in the hope that it will be useful, but WITHOUT
4486# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4487# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4488# version 2 for more details (a copy is included in the LICENSE file that
4489# accompanied this code).
4490#
4491# You should have received a copy of the GNU General Public License version
4492# 2 along with this work; if not, write to the Free Software Foundation,
4493# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4494#
4495# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4496# or visit www.oracle.com if you need additional information or have any
4497# questions.
4498#
4499
4500################################################################################
4501# Setup bundled libraries.
4502#
4503# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4504# OpenJDK repository. Default is to use these libraries as bundled, but they
4505# might be replaced by en external version by the user.
4506################################################################################
4507
4508
4509################################################################################
4510# Setup libjpeg
4511################################################################################
4512
4513
4514################################################################################
4515# Setup giflib
4516################################################################################
4517
4518
4519################################################################################
4520# Setup libpng
4521################################################################################
4522
4523
4524################################################################################
4525# Setup zlib
4526################################################################################
4527
4528
4529################################################################################
4530# Setup lcms (Little CMS)
4531################################################################################
4532
4533
4534#
4535# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4536# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4537#
4538# This code is free software; you can redistribute it and/or modify it
4539# under the terms of the GNU General Public License version 2 only, as
4540# published by the Free Software Foundation.  Oracle designates this
4541# particular file as subject to the "Classpath" exception as provided
4542# by Oracle in the LICENSE file that accompanied this code.
4543#
4544# This code is distributed in the hope that it will be useful, but WITHOUT
4545# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4546# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4547# version 2 for more details (a copy is included in the LICENSE file that
4548# accompanied this code).
4549#
4550# You should have received a copy of the GNU General Public License version
4551# 2 along with this work; if not, write to the Free Software Foundation,
4552# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4553#
4554# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4555# or visit www.oracle.com if you need additional information or have any
4556# questions.
4557#
4558
4559################################################################################
4560# Setup cups (Common Unix Printing System)
4561################################################################################
4562
4563
4564#
4565# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4566# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4567#
4568# This code is free software; you can redistribute it and/or modify it
4569# under the terms of the GNU General Public License version 2 only, as
4570# published by the Free Software Foundation.  Oracle designates this
4571# particular file as subject to the "Classpath" exception as provided
4572# by Oracle in the LICENSE file that accompanied this code.
4573#
4574# This code is distributed in the hope that it will be useful, but WITHOUT
4575# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4576# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4577# version 2 for more details (a copy is included in the LICENSE file that
4578# accompanied this code).
4579#
4580# You should have received a copy of the GNU General Public License version
4581# 2 along with this work; if not, write to the Free Software Foundation,
4582# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4583#
4584# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4585# or visit www.oracle.com if you need additional information or have any
4586# questions.
4587#
4588
4589################################################################################
4590# Setup libffi (Foreign Function Interface)
4591################################################################################
4592
4593
4594#
4595# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4596# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4597#
4598# This code is free software; you can redistribute it and/or modify it
4599# under the terms of the GNU General Public License version 2 only, as
4600# published by the Free Software Foundation.  Oracle designates this
4601# particular file as subject to the "Classpath" exception as provided
4602# by Oracle in the LICENSE file that accompanied this code.
4603#
4604# This code is distributed in the hope that it will be useful, but WITHOUT
4605# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4606# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4607# version 2 for more details (a copy is included in the LICENSE file that
4608# accompanied this code).
4609#
4610# You should have received a copy of the GNU General Public License version
4611# 2 along with this work; if not, write to the Free Software Foundation,
4612# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4613#
4614# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4615# or visit www.oracle.com if you need additional information or have any
4616# questions.
4617#
4618
4619################################################################################
4620# Build the freetype lib from source
4621################################################################################
4622
4623
4624################################################################################
4625# Check if a potential freeype library match is correct and usable
4626################################################################################
4627
4628
4629################################################################################
4630# Setup freetype (The FreeType2 font rendering library)
4631################################################################################
4632
4633
4634#
4635# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4636# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4637#
4638# This code is free software; you can redistribute it and/or modify it
4639# under the terms of the GNU General Public License version 2 only, as
4640# published by the Free Software Foundation.  Oracle designates this
4641# particular file as subject to the "Classpath" exception as provided
4642# by Oracle in the LICENSE file that accompanied this code.
4643#
4644# This code is distributed in the hope that it will be useful, but WITHOUT
4645# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4646# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4647# version 2 for more details (a copy is included in the LICENSE file that
4648# accompanied this code).
4649#
4650# You should have received a copy of the GNU General Public License version
4651# 2 along with this work; if not, write to the Free Software Foundation,
4652# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4653#
4654# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4655# or visit www.oracle.com if you need additional information or have any
4656# questions.
4657#
4658
4659################################################################################
4660# Setup the standard C/C++ runtime libraries.
4661#
4662# Most importantly, determine if stdc++ should be linked statically or
4663# dynamically.
4664################################################################################
4665
4666
4667#
4668# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4669# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4670#
4671# This code is free software; you can redistribute it and/or modify it
4672# under the terms of the GNU General Public License version 2 only, as
4673# published by the Free Software Foundation.  Oracle designates this
4674# particular file as subject to the "Classpath" exception as provided
4675# by Oracle in the LICENSE file that accompanied this code.
4676#
4677# This code is distributed in the hope that it will be useful, but WITHOUT
4678# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4679# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4680# version 2 for more details (a copy is included in the LICENSE file that
4681# accompanied this code).
4682#
4683# You should have received a copy of the GNU General Public License version
4684# 2 along with this work; if not, write to the Free Software Foundation,
4685# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4686#
4687# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4688# or visit www.oracle.com if you need additional information or have any
4689# questions.
4690#
4691
4692################################################################################
4693# Setup X11 Windows system
4694################################################################################
4695
4696
4697
4698################################################################################
4699# Determine which libraries are needed for this configuration
4700################################################################################
4701
4702
4703################################################################################
4704# Parse library options, and setup needed libraries
4705################################################################################
4706
4707
4708################################################################################
4709# Setup llvm (Low-Level VM)
4710################################################################################
4711
4712
4713################################################################################
4714# Setup various libraries, typically small system libraries
4715################################################################################
4716
4717
4718#
4719# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4720# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4721#
4722# This code is free software; you can redistribute it and/or modify it
4723# under the terms of the GNU General Public License version 2 only, as
4724# published by the Free Software Foundation.  Oracle designates this
4725# particular file as subject to the "Classpath" exception as provided
4726# by Oracle in the LICENSE file that accompanied this code.
4727#
4728# This code is distributed in the hope that it will be useful, but WITHOUT
4729# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4730# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4731# version 2 for more details (a copy is included in the LICENSE file that
4732# accompanied this code).
4733#
4734# You should have received a copy of the GNU General Public License version
4735# 2 along with this work; if not, write to the Free Software Foundation,
4736# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4737#
4738# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4739# or visit www.oracle.com if you need additional information or have any
4740# questions.
4741#
4742
4743# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4744# Converts autoconf style CPU name to OpenJDK style, into
4745# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4746
4747
4748# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4749# Converts autoconf style OS name to OpenJDK style, into
4750# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4751
4752
4753# Expects $host_os $host_cpu $build_os and $build_cpu
4754# and $with_target_bits to have been setup!
4755#
4756# Translate the standard triplet(quadruplet) definition
4757# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4758# OPENJDK_BUILD_OS, etc.
4759
4760
4761# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4762# accordingly. Must be done after setting up build and target system, but before
4763# doing anything else with these values.
4764
4765
4766# Setup the legacy variables, for controlling the old makefiles.
4767#
4768
4769
4770# $1 - Either TARGET or BUILD to setup the variables for.
4771
4772
4773
4774
4775#%%% Build and target systems %%%
4776
4777
4778
4779
4780# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4781# Add -mX to various FLAGS variables.
4782
4783
4784
4785
4786
4787
4788#
4789# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4790# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4791#
4792# This code is free software; you can redistribute it and/or modify it
4793# under the terms of the GNU General Public License version 2 only, as
4794# published by the Free Software Foundation.  Oracle designates this
4795# particular file as subject to the "Classpath" exception as provided
4796# by Oracle in the LICENSE file that accompanied this code.
4797#
4798# This code is distributed in the hope that it will be useful, but WITHOUT
4799# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4800# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4801# version 2 for more details (a copy is included in the LICENSE file that
4802# accompanied this code).
4803#
4804# You should have received a copy of the GNU General Public License version
4805# 2 along with this work; if not, write to the Free Software Foundation,
4806# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4807#
4808# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4809# or visit www.oracle.com if you need additional information or have any
4810# questions.
4811#
4812
4813
4814
4815
4816
4817
4818
4819################################################################################
4820# Define a mechanism for importing extra prebuilt modules
4821#
4822
4823
4824
4825#
4826# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4827# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4828#
4829# This code is free software; you can redistribute it and/or modify it
4830# under the terms of the GNU General Public License version 2 only, as
4831# published by the Free Software Foundation.  Oracle designates this
4832# particular file as subject to the "Classpath" exception as provided
4833# by Oracle in the LICENSE file that accompanied this code.
4834#
4835# This code is distributed in the hope that it will be useful, but WITHOUT
4836# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4837# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4838# version 2 for more details (a copy is included in the LICENSE file that
4839# accompanied this code).
4840#
4841# You should have received a copy of the GNU General Public License version
4842# 2 along with this work; if not, write to the Free Software Foundation,
4843# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4844#
4845# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4846# or visit www.oracle.com if you need additional information or have any
4847# questions.
4848#
4849
4850########################################################################
4851# This file is responsible for detecting, verifying and setting up the
4852# toolchain, i.e. the compiler, linker and related utilities. It will setup
4853# proper paths to the binaries, but it will not setup any flags.
4854#
4855# The binaries used is determined by the toolchain type, which is the family of
4856# compilers and related tools that are used.
4857########################################################################
4858
4859
4860# All valid toolchains, regardless of platform (used by help.m4)
4861VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4862
4863# These toolchains are valid on different platforms
4864VALID_TOOLCHAINS_linux="gcc clang"
4865VALID_TOOLCHAINS_solaris="solstudio"
4866VALID_TOOLCHAINS_macosx="gcc clang"
4867VALID_TOOLCHAINS_aix="xlc"
4868VALID_TOOLCHAINS_windows="microsoft"
4869
4870# Toolchain descriptions
4871TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4872TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4873TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4874TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4875TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4876
4877# Minimum supported versions, empty means unspecified
4878TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4879TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4880TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4881TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4882TOOLCHAIN_MINIMUM_VERSION_xlc=""
4883
4884# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4885# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4886
4887
4888# Check if the configured compiler (C and C++) is of a specific version or
4889# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4890#
4891# Arguments:
4892#   VERSION:   The version string to check against the found version
4893#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4894#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4895
4896
4897
4898
4899# Setup a number of variables describing how native output files are
4900# named on this platform/toolchain.
4901
4902
4903# Determine which toolchain type to use, and make sure it is valid for this
4904# platform. Setup various information about the selected toolchain.
4905
4906
4907# Before we start detecting the toolchain executables, we might need some
4908# special setup, e.g. additional paths etc.
4909
4910
4911# Restore path, etc
4912
4913
4914# Check if a compiler is of the toolchain type we expect, and save the version
4915# information from it. If the compiler does not match the expected type,
4916# this function will abort using AC_MSG_ERROR. If it matches, the version will
4917# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4918# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4919#
4920# $1 = compiler to test (CC or CXX)
4921# $2 = human readable name of compiler (C or C++)
4922
4923
4924# Try to locate the given C or C++ compiler in the path, or otherwise.
4925#
4926# $1 = compiler to test (CC or CXX)
4927# $2 = human readable name of compiler (C or C++)
4928# $3 = list of compiler names to search for
4929
4930
4931# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4932# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4933# archiver (AR). Verify that the compilers are correct according to the
4934# toolchain type.
4935
4936
4937# Setup additional tools that is considered a part of the toolchain, but not the
4938# core part. Many of these are highly platform-specific and do not exist,
4939# and/or are not needed on all platforms.
4940
4941
4942# Setup the build tools (i.e, the compiler and linker used to build programs
4943# that should be run on the build platform, not the target platform, as a build
4944# helper). Since the non-cross-compile case uses the normal, target compilers
4945# for this, we can only do this after these have been setup.
4946
4947
4948# Setup legacy variables that are still needed as alternative ways to refer to
4949# parts of the toolchain.
4950
4951
4952# Do some additional checks on the detected tools.
4953
4954
4955# Setup the JTReg Regression Test Harness.
4956
4957
4958#
4959# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4960# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4961#
4962# This code is free software; you can redistribute it and/or modify it
4963# under the terms of the GNU General Public License version 2 only, as
4964# published by the Free Software Foundation.  Oracle designates this
4965# particular file as subject to the "Classpath" exception as provided
4966# by Oracle in the LICENSE file that accompanied this code.
4967#
4968# This code is distributed in the hope that it will be useful, but WITHOUT
4969# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4970# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4971# version 2 for more details (a copy is included in the LICENSE file that
4972# accompanied this code).
4973#
4974# You should have received a copy of the GNU General Public License version
4975# 2 along with this work; if not, write to the Free Software Foundation,
4976# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4977#
4978# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4979# or visit www.oracle.com if you need additional information or have any
4980# questions.
4981#
4982
4983################################################################################
4984# The order of these defines the priority by which we try to find them.
4985VALID_VS_VERSIONS="2013 2012 2010"
4986
4987VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4988VS_VERSION_INTERNAL_2010=100
4989VS_MSVCR_2010=msvcr100.dll
4990# We don't use msvcp on Visual Studio 2010
4991#VS_MSVCP_2010=msvcp100.dll
4992VS_ENVVAR_2010="VS100COMNTOOLS"
4993VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4994VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4995VS_VS_PLATFORM_NAME_2010="v100"
4996VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4997
4998VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4999VS_VERSION_INTERNAL_2012=110
5000VS_MSVCR_2012=msvcr110.dll
5001VS_MSVCP_2012=msvcp110.dll
5002VS_ENVVAR_2012="VS110COMNTOOLS"
5003VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5004VS_SDK_INSTALLDIR_2012=
5005VS_VS_PLATFORM_NAME_2012="v110"
5006VS_SDK_PLATFORM_NAME_2012=
5007
5008VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5009VS_VERSION_INTERNAL_2013=120
5010VS_MSVCR_2013=msvcr120.dll
5011VS_MSVCP_2013=msvcp120.dll
5012VS_ENVVAR_2013="VS120COMNTOOLS"
5013VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5014VS_SDK_INSTALLDIR_2013=
5015VS_VS_PLATFORM_NAME_2013="v120"
5016VS_SDK_PLATFORM_NAME_2013=
5017
5018################################################################################
5019
5020
5021
5022################################################################################
5023
5024
5025
5026################################################################################
5027# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5028# build environment and assigns it to VS_ENV_CMD
5029
5030
5031################################################################################
5032
5033
5034
5035################################################################################
5036# Check if the VS env variables were setup prior to running configure.
5037# If not, then find vcvarsall.bat and run it automatically, and integrate
5038# the set env variables into the spec file.
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053# This line needs to be here, verbatim, after all includes and the dummy hook
5054# definitions. It is replaced with custom functionality when building
5055# custom sources.
5056#CUSTOM_AUTOCONF_INCLUDE
5057
5058# Do not change or remove the following line, it is needed for consistency checks:
5059DATE_WHEN_GENERATED=1460103573
5060
5061###############################################################################
5062#
5063# Initialization / Boot-strapping
5064#
5065# The bootstrapping process needs to solve the "chicken or the egg" problem,
5066# thus it jumps back and forth, each time gaining something needed later on.
5067#
5068###############################################################################
5069
5070# If we are requested to print additional help, do that and then exit.
5071# This must be the very first call.
5072
5073  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5074
5075    # Print available toolchains
5076    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5077    $PRINTF "Which are valid to use depends on the build platform.\n"
5078    for toolchain in $VALID_TOOLCHAINS_all; do
5079      # Use indirect variable referencing
5080      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5081      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5082      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5083    done
5084    $PRINTF "\n"
5085
5086    # Print available jvm features
5087    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5088    $PRINTF "Which are valid to use depends on the target platform.\n  "
5089    $PRINTF "%s " $VALID_JVM_FEATURES
5090    $PRINTF "\n"
5091
5092    # And now exit directly
5093    exit 0
5094  fi
5095
5096
5097# Basic initialization that must happen first of all in the normal process.
5098
5099  # Save the original command line. This is passed to us by the wrapper configure script.
5100
5101  # Save the path variable before it gets changed
5102  ORIGINAL_PATH="$PATH"
5103
5104  DATE_WHEN_CONFIGURED=`LANG=C date`
5105
5106  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5107$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5108  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5109$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5110
5111
5112  # Start with tools that do not need have cross compilation support
5113  # and can be expected to be found in the default PATH. These tools are
5114  # used by configure.
5115
5116  # First are all the simple required tools.
5117
5118
5119
5120  # Publish this variable in the help.
5121
5122
5123  if [ -z "${BASENAME+x}" ]; then
5124    # The variable is not set by user, try to locate tool using the code snippet
5125    for ac_prog in basename
5126do
5127  # Extract the first word of "$ac_prog", so it can be a program name with args.
5128set dummy $ac_prog; ac_word=$2
5129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5130$as_echo_n "checking for $ac_word... " >&6; }
5131if ${ac_cv_path_BASENAME+:} false; then :
5132  $as_echo_n "(cached) " >&6
5133else
5134  case $BASENAME in
5135  [\\/]* | ?:[\\/]*)
5136  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5137  ;;
5138  *)
5139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5140for as_dir in $PATH
5141do
5142  IFS=$as_save_IFS
5143  test -z "$as_dir" && as_dir=.
5144    for ac_exec_ext in '' $ac_executable_extensions; do
5145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5146    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5148    break 2
5149  fi
5150done
5151  done
5152IFS=$as_save_IFS
5153
5154  ;;
5155esac
5156fi
5157BASENAME=$ac_cv_path_BASENAME
5158if test -n "$BASENAME"; then
5159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5160$as_echo "$BASENAME" >&6; }
5161else
5162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5163$as_echo "no" >&6; }
5164fi
5165
5166
5167  test -n "$BASENAME" && break
5168done
5169
5170  else
5171    # The variable is set, but is it from the command line or the environment?
5172
5173    # Try to remove the string !BASENAME! from our list.
5174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5176      # If it failed, the variable was not from the command line. Ignore it,
5177      # but warn the user (except for BASH, which is always set by the calling BASH).
5178      if test "xBASENAME" != xBASH; then
5179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5180$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5181      fi
5182      # Try to locate tool using the code snippet
5183      for ac_prog in basename
5184do
5185  # Extract the first word of "$ac_prog", so it can be a program name with args.
5186set dummy $ac_prog; ac_word=$2
5187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5188$as_echo_n "checking for $ac_word... " >&6; }
5189if ${ac_cv_path_BASENAME+:} false; then :
5190  $as_echo_n "(cached) " >&6
5191else
5192  case $BASENAME in
5193  [\\/]* | ?:[\\/]*)
5194  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5195  ;;
5196  *)
5197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5198for as_dir in $PATH
5199do
5200  IFS=$as_save_IFS
5201  test -z "$as_dir" && as_dir=.
5202    for ac_exec_ext in '' $ac_executable_extensions; do
5203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5204    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5206    break 2
5207  fi
5208done
5209  done
5210IFS=$as_save_IFS
5211
5212  ;;
5213esac
5214fi
5215BASENAME=$ac_cv_path_BASENAME
5216if test -n "$BASENAME"; then
5217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5218$as_echo "$BASENAME" >&6; }
5219else
5220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5221$as_echo "no" >&6; }
5222fi
5223
5224
5225  test -n "$BASENAME" && break
5226done
5227
5228    else
5229      # If it succeeded, then it was overridden by the user. We will use it
5230      # for the tool.
5231
5232      # First remove it from the list of overridden variables, so we can test
5233      # for unknown variables in the end.
5234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5235
5236      # Check if we try to supply an empty value
5237      if test "x$BASENAME" = x; then
5238        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5239$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5241$as_echo_n "checking for BASENAME... " >&6; }
5242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5243$as_echo "disabled" >&6; }
5244      else
5245        # Check if the provided tool contains a complete path.
5246        tool_specified="$BASENAME"
5247        tool_basename="${tool_specified##*/}"
5248        if test "x$tool_basename" = "x$tool_specified"; then
5249          # A command without a complete path is provided, search $PATH.
5250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5251$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5252          # Extract the first word of "$tool_basename", so it can be a program name with args.
5253set dummy $tool_basename; ac_word=$2
5254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5255$as_echo_n "checking for $ac_word... " >&6; }
5256if ${ac_cv_path_BASENAME+:} false; then :
5257  $as_echo_n "(cached) " >&6
5258else
5259  case $BASENAME in
5260  [\\/]* | ?:[\\/]*)
5261  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5262  ;;
5263  *)
5264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5265for as_dir in $PATH
5266do
5267  IFS=$as_save_IFS
5268  test -z "$as_dir" && as_dir=.
5269    for ac_exec_ext in '' $ac_executable_extensions; do
5270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5271    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5273    break 2
5274  fi
5275done
5276  done
5277IFS=$as_save_IFS
5278
5279  ;;
5280esac
5281fi
5282BASENAME=$ac_cv_path_BASENAME
5283if test -n "$BASENAME"; then
5284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5285$as_echo "$BASENAME" >&6; }
5286else
5287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5288$as_echo "no" >&6; }
5289fi
5290
5291
5292          if test "x$BASENAME" = x; then
5293            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5294          fi
5295        else
5296          # Otherwise we believe it is a complete path. Use it as it is.
5297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5298$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5299          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5300$as_echo_n "checking for BASENAME... " >&6; }
5301          if test ! -x "$tool_specified"; then
5302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5303$as_echo "not found" >&6; }
5304            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5305          fi
5306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5307$as_echo "$tool_specified" >&6; }
5308        fi
5309      fi
5310    fi
5311
5312  fi
5313
5314
5315
5316  if test "x$BASENAME" = x; then
5317    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5318  fi
5319
5320
5321
5322
5323
5324  # Publish this variable in the help.
5325
5326
5327  if [ -z "${BASH+x}" ]; then
5328    # The variable is not set by user, try to locate tool using the code snippet
5329    for ac_prog in bash
5330do
5331  # Extract the first word of "$ac_prog", so it can be a program name with args.
5332set dummy $ac_prog; ac_word=$2
5333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5334$as_echo_n "checking for $ac_word... " >&6; }
5335if ${ac_cv_path_BASH+:} false; then :
5336  $as_echo_n "(cached) " >&6
5337else
5338  case $BASH in
5339  [\\/]* | ?:[\\/]*)
5340  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5341  ;;
5342  *)
5343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5344for as_dir in $PATH
5345do
5346  IFS=$as_save_IFS
5347  test -z "$as_dir" && as_dir=.
5348    for ac_exec_ext in '' $ac_executable_extensions; do
5349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5350    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5352    break 2
5353  fi
5354done
5355  done
5356IFS=$as_save_IFS
5357
5358  ;;
5359esac
5360fi
5361BASH=$ac_cv_path_BASH
5362if test -n "$BASH"; then
5363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5364$as_echo "$BASH" >&6; }
5365else
5366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367$as_echo "no" >&6; }
5368fi
5369
5370
5371  test -n "$BASH" && break
5372done
5373
5374  else
5375    # The variable is set, but is it from the command line or the environment?
5376
5377    # Try to remove the string !BASH! from our list.
5378    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5379    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5380      # If it failed, the variable was not from the command line. Ignore it,
5381      # but warn the user (except for BASH, which is always set by the calling BASH).
5382      if test "xBASH" != xBASH; then
5383        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5384$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5385      fi
5386      # Try to locate tool using the code snippet
5387      for ac_prog in bash
5388do
5389  # Extract the first word of "$ac_prog", so it can be a program name with args.
5390set dummy $ac_prog; ac_word=$2
5391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5392$as_echo_n "checking for $ac_word... " >&6; }
5393if ${ac_cv_path_BASH+:} false; then :
5394  $as_echo_n "(cached) " >&6
5395else
5396  case $BASH in
5397  [\\/]* | ?:[\\/]*)
5398  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5399  ;;
5400  *)
5401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5402for as_dir in $PATH
5403do
5404  IFS=$as_save_IFS
5405  test -z "$as_dir" && as_dir=.
5406    for ac_exec_ext in '' $ac_executable_extensions; do
5407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5408    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5410    break 2
5411  fi
5412done
5413  done
5414IFS=$as_save_IFS
5415
5416  ;;
5417esac
5418fi
5419BASH=$ac_cv_path_BASH
5420if test -n "$BASH"; then
5421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5422$as_echo "$BASH" >&6; }
5423else
5424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5425$as_echo "no" >&6; }
5426fi
5427
5428
5429  test -n "$BASH" && break
5430done
5431
5432    else
5433      # If it succeeded, then it was overridden by the user. We will use it
5434      # for the tool.
5435
5436      # First remove it from the list of overridden variables, so we can test
5437      # for unknown variables in the end.
5438      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5439
5440      # Check if we try to supply an empty value
5441      if test "x$BASH" = x; then
5442        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5443$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5444        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5445$as_echo_n "checking for BASH... " >&6; }
5446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5447$as_echo "disabled" >&6; }
5448      else
5449        # Check if the provided tool contains a complete path.
5450        tool_specified="$BASH"
5451        tool_basename="${tool_specified##*/}"
5452        if test "x$tool_basename" = "x$tool_specified"; then
5453          # A command without a complete path is provided, search $PATH.
5454          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5455$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5456          # Extract the first word of "$tool_basename", so it can be a program name with args.
5457set dummy $tool_basename; ac_word=$2
5458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5459$as_echo_n "checking for $ac_word... " >&6; }
5460if ${ac_cv_path_BASH+:} false; then :
5461  $as_echo_n "(cached) " >&6
5462else
5463  case $BASH in
5464  [\\/]* | ?:[\\/]*)
5465  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5466  ;;
5467  *)
5468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5469for as_dir in $PATH
5470do
5471  IFS=$as_save_IFS
5472  test -z "$as_dir" && as_dir=.
5473    for ac_exec_ext in '' $ac_executable_extensions; do
5474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5475    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5477    break 2
5478  fi
5479done
5480  done
5481IFS=$as_save_IFS
5482
5483  ;;
5484esac
5485fi
5486BASH=$ac_cv_path_BASH
5487if test -n "$BASH"; then
5488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5489$as_echo "$BASH" >&6; }
5490else
5491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5492$as_echo "no" >&6; }
5493fi
5494
5495
5496          if test "x$BASH" = x; then
5497            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5498          fi
5499        else
5500          # Otherwise we believe it is a complete path. Use it as it is.
5501          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5502$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5503          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5504$as_echo_n "checking for BASH... " >&6; }
5505          if test ! -x "$tool_specified"; then
5506            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5507$as_echo "not found" >&6; }
5508            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5509          fi
5510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5511$as_echo "$tool_specified" >&6; }
5512        fi
5513      fi
5514    fi
5515
5516  fi
5517
5518
5519
5520  if test "x$BASH" = x; then
5521    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5522  fi
5523
5524
5525
5526
5527
5528  # Publish this variable in the help.
5529
5530
5531  if [ -z "${CAT+x}" ]; then
5532    # The variable is not set by user, try to locate tool using the code snippet
5533    for ac_prog in cat
5534do
5535  # Extract the first word of "$ac_prog", so it can be a program name with args.
5536set dummy $ac_prog; ac_word=$2
5537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5538$as_echo_n "checking for $ac_word... " >&6; }
5539if ${ac_cv_path_CAT+:} false; then :
5540  $as_echo_n "(cached) " >&6
5541else
5542  case $CAT in
5543  [\\/]* | ?:[\\/]*)
5544  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5545  ;;
5546  *)
5547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5548for as_dir in $PATH
5549do
5550  IFS=$as_save_IFS
5551  test -z "$as_dir" && as_dir=.
5552    for ac_exec_ext in '' $ac_executable_extensions; do
5553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5554    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5556    break 2
5557  fi
5558done
5559  done
5560IFS=$as_save_IFS
5561
5562  ;;
5563esac
5564fi
5565CAT=$ac_cv_path_CAT
5566if test -n "$CAT"; then
5567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5568$as_echo "$CAT" >&6; }
5569else
5570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5571$as_echo "no" >&6; }
5572fi
5573
5574
5575  test -n "$CAT" && break
5576done
5577
5578  else
5579    # The variable is set, but is it from the command line or the environment?
5580
5581    # Try to remove the string !CAT! from our list.
5582    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5583    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5584      # If it failed, the variable was not from the command line. Ignore it,
5585      # but warn the user (except for BASH, which is always set by the calling BASH).
5586      if test "xCAT" != xBASH; then
5587        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5588$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5589      fi
5590      # Try to locate tool using the code snippet
5591      for ac_prog in cat
5592do
5593  # Extract the first word of "$ac_prog", so it can be a program name with args.
5594set dummy $ac_prog; ac_word=$2
5595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5596$as_echo_n "checking for $ac_word... " >&6; }
5597if ${ac_cv_path_CAT+:} false; then :
5598  $as_echo_n "(cached) " >&6
5599else
5600  case $CAT in
5601  [\\/]* | ?:[\\/]*)
5602  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5603  ;;
5604  *)
5605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5606for as_dir in $PATH
5607do
5608  IFS=$as_save_IFS
5609  test -z "$as_dir" && as_dir=.
5610    for ac_exec_ext in '' $ac_executable_extensions; do
5611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5612    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5614    break 2
5615  fi
5616done
5617  done
5618IFS=$as_save_IFS
5619
5620  ;;
5621esac
5622fi
5623CAT=$ac_cv_path_CAT
5624if test -n "$CAT"; then
5625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5626$as_echo "$CAT" >&6; }
5627else
5628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5629$as_echo "no" >&6; }
5630fi
5631
5632
5633  test -n "$CAT" && break
5634done
5635
5636    else
5637      # If it succeeded, then it was overridden by the user. We will use it
5638      # for the tool.
5639
5640      # First remove it from the list of overridden variables, so we can test
5641      # for unknown variables in the end.
5642      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5643
5644      # Check if we try to supply an empty value
5645      if test "x$CAT" = x; then
5646        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5647$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5649$as_echo_n "checking for CAT... " >&6; }
5650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5651$as_echo "disabled" >&6; }
5652      else
5653        # Check if the provided tool contains a complete path.
5654        tool_specified="$CAT"
5655        tool_basename="${tool_specified##*/}"
5656        if test "x$tool_basename" = "x$tool_specified"; then
5657          # A command without a complete path is provided, search $PATH.
5658          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5659$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5660          # Extract the first word of "$tool_basename", so it can be a program name with args.
5661set dummy $tool_basename; ac_word=$2
5662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5663$as_echo_n "checking for $ac_word... " >&6; }
5664if ${ac_cv_path_CAT+:} false; then :
5665  $as_echo_n "(cached) " >&6
5666else
5667  case $CAT in
5668  [\\/]* | ?:[\\/]*)
5669  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5670  ;;
5671  *)
5672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5673for as_dir in $PATH
5674do
5675  IFS=$as_save_IFS
5676  test -z "$as_dir" && as_dir=.
5677    for ac_exec_ext in '' $ac_executable_extensions; do
5678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5679    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5681    break 2
5682  fi
5683done
5684  done
5685IFS=$as_save_IFS
5686
5687  ;;
5688esac
5689fi
5690CAT=$ac_cv_path_CAT
5691if test -n "$CAT"; then
5692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5693$as_echo "$CAT" >&6; }
5694else
5695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5696$as_echo "no" >&6; }
5697fi
5698
5699
5700          if test "x$CAT" = x; then
5701            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5702          fi
5703        else
5704          # Otherwise we believe it is a complete path. Use it as it is.
5705          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5706$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5707          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5708$as_echo_n "checking for CAT... " >&6; }
5709          if test ! -x "$tool_specified"; then
5710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5711$as_echo "not found" >&6; }
5712            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5713          fi
5714          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5715$as_echo "$tool_specified" >&6; }
5716        fi
5717      fi
5718    fi
5719
5720  fi
5721
5722
5723
5724  if test "x$CAT" = x; then
5725    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5726  fi
5727
5728
5729
5730
5731
5732  # Publish this variable in the help.
5733
5734
5735  if [ -z "${CHMOD+x}" ]; then
5736    # The variable is not set by user, try to locate tool using the code snippet
5737    for ac_prog in chmod
5738do
5739  # Extract the first word of "$ac_prog", so it can be a program name with args.
5740set dummy $ac_prog; ac_word=$2
5741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5742$as_echo_n "checking for $ac_word... " >&6; }
5743if ${ac_cv_path_CHMOD+:} false; then :
5744  $as_echo_n "(cached) " >&6
5745else
5746  case $CHMOD in
5747  [\\/]* | ?:[\\/]*)
5748  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5749  ;;
5750  *)
5751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5752for as_dir in $PATH
5753do
5754  IFS=$as_save_IFS
5755  test -z "$as_dir" && as_dir=.
5756    for ac_exec_ext in '' $ac_executable_extensions; do
5757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5758    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5760    break 2
5761  fi
5762done
5763  done
5764IFS=$as_save_IFS
5765
5766  ;;
5767esac
5768fi
5769CHMOD=$ac_cv_path_CHMOD
5770if test -n "$CHMOD"; then
5771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5772$as_echo "$CHMOD" >&6; }
5773else
5774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5775$as_echo "no" >&6; }
5776fi
5777
5778
5779  test -n "$CHMOD" && break
5780done
5781
5782  else
5783    # The variable is set, but is it from the command line or the environment?
5784
5785    # Try to remove the string !CHMOD! from our list.
5786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5788      # If it failed, the variable was not from the command line. Ignore it,
5789      # but warn the user (except for BASH, which is always set by the calling BASH).
5790      if test "xCHMOD" != xBASH; then
5791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5792$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5793      fi
5794      # Try to locate tool using the code snippet
5795      for ac_prog in chmod
5796do
5797  # Extract the first word of "$ac_prog", so it can be a program name with args.
5798set dummy $ac_prog; ac_word=$2
5799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5800$as_echo_n "checking for $ac_word... " >&6; }
5801if ${ac_cv_path_CHMOD+:} false; then :
5802  $as_echo_n "(cached) " >&6
5803else
5804  case $CHMOD in
5805  [\\/]* | ?:[\\/]*)
5806  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5807  ;;
5808  *)
5809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5810for as_dir in $PATH
5811do
5812  IFS=$as_save_IFS
5813  test -z "$as_dir" && as_dir=.
5814    for ac_exec_ext in '' $ac_executable_extensions; do
5815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5816    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5818    break 2
5819  fi
5820done
5821  done
5822IFS=$as_save_IFS
5823
5824  ;;
5825esac
5826fi
5827CHMOD=$ac_cv_path_CHMOD
5828if test -n "$CHMOD"; then
5829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5830$as_echo "$CHMOD" >&6; }
5831else
5832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5833$as_echo "no" >&6; }
5834fi
5835
5836
5837  test -n "$CHMOD" && break
5838done
5839
5840    else
5841      # If it succeeded, then it was overridden by the user. We will use it
5842      # for the tool.
5843
5844      # First remove it from the list of overridden variables, so we can test
5845      # for unknown variables in the end.
5846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5847
5848      # Check if we try to supply an empty value
5849      if test "x$CHMOD" = x; then
5850        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5851$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5852        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5853$as_echo_n "checking for CHMOD... " >&6; }
5854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5855$as_echo "disabled" >&6; }
5856      else
5857        # Check if the provided tool contains a complete path.
5858        tool_specified="$CHMOD"
5859        tool_basename="${tool_specified##*/}"
5860        if test "x$tool_basename" = "x$tool_specified"; then
5861          # A command without a complete path is provided, search $PATH.
5862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5863$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5864          # Extract the first word of "$tool_basename", so it can be a program name with args.
5865set dummy $tool_basename; ac_word=$2
5866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5867$as_echo_n "checking for $ac_word... " >&6; }
5868if ${ac_cv_path_CHMOD+:} false; then :
5869  $as_echo_n "(cached) " >&6
5870else
5871  case $CHMOD in
5872  [\\/]* | ?:[\\/]*)
5873  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5874  ;;
5875  *)
5876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5877for as_dir in $PATH
5878do
5879  IFS=$as_save_IFS
5880  test -z "$as_dir" && as_dir=.
5881    for ac_exec_ext in '' $ac_executable_extensions; do
5882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5883    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5885    break 2
5886  fi
5887done
5888  done
5889IFS=$as_save_IFS
5890
5891  ;;
5892esac
5893fi
5894CHMOD=$ac_cv_path_CHMOD
5895if test -n "$CHMOD"; then
5896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5897$as_echo "$CHMOD" >&6; }
5898else
5899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5900$as_echo "no" >&6; }
5901fi
5902
5903
5904          if test "x$CHMOD" = x; then
5905            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5906          fi
5907        else
5908          # Otherwise we believe it is a complete path. Use it as it is.
5909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5910$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5911          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5912$as_echo_n "checking for CHMOD... " >&6; }
5913          if test ! -x "$tool_specified"; then
5914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5915$as_echo "not found" >&6; }
5916            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5917          fi
5918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5919$as_echo "$tool_specified" >&6; }
5920        fi
5921      fi
5922    fi
5923
5924  fi
5925
5926
5927
5928  if test "x$CHMOD" = x; then
5929    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5930  fi
5931
5932
5933
5934
5935
5936  # Publish this variable in the help.
5937
5938
5939  if [ -z "${CMP+x}" ]; then
5940    # The variable is not set by user, try to locate tool using the code snippet
5941    for ac_prog in cmp
5942do
5943  # Extract the first word of "$ac_prog", so it can be a program name with args.
5944set dummy $ac_prog; ac_word=$2
5945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5946$as_echo_n "checking for $ac_word... " >&6; }
5947if ${ac_cv_path_CMP+:} false; then :
5948  $as_echo_n "(cached) " >&6
5949else
5950  case $CMP in
5951  [\\/]* | ?:[\\/]*)
5952  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5953  ;;
5954  *)
5955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5956for as_dir in $PATH
5957do
5958  IFS=$as_save_IFS
5959  test -z "$as_dir" && as_dir=.
5960    for ac_exec_ext in '' $ac_executable_extensions; do
5961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5962    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5964    break 2
5965  fi
5966done
5967  done
5968IFS=$as_save_IFS
5969
5970  ;;
5971esac
5972fi
5973CMP=$ac_cv_path_CMP
5974if test -n "$CMP"; then
5975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5976$as_echo "$CMP" >&6; }
5977else
5978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5979$as_echo "no" >&6; }
5980fi
5981
5982
5983  test -n "$CMP" && break
5984done
5985
5986  else
5987    # The variable is set, but is it from the command line or the environment?
5988
5989    # Try to remove the string !CMP! from our list.
5990    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5991    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5992      # If it failed, the variable was not from the command line. Ignore it,
5993      # but warn the user (except for BASH, which is always set by the calling BASH).
5994      if test "xCMP" != xBASH; then
5995        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5996$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5997      fi
5998      # Try to locate tool using the code snippet
5999      for ac_prog in cmp
6000do
6001  # Extract the first word of "$ac_prog", so it can be a program name with args.
6002set dummy $ac_prog; ac_word=$2
6003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6004$as_echo_n "checking for $ac_word... " >&6; }
6005if ${ac_cv_path_CMP+:} false; then :
6006  $as_echo_n "(cached) " >&6
6007else
6008  case $CMP in
6009  [\\/]* | ?:[\\/]*)
6010  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6011  ;;
6012  *)
6013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6014for as_dir in $PATH
6015do
6016  IFS=$as_save_IFS
6017  test -z "$as_dir" && as_dir=.
6018    for ac_exec_ext in '' $ac_executable_extensions; do
6019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6020    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6022    break 2
6023  fi
6024done
6025  done
6026IFS=$as_save_IFS
6027
6028  ;;
6029esac
6030fi
6031CMP=$ac_cv_path_CMP
6032if test -n "$CMP"; then
6033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6034$as_echo "$CMP" >&6; }
6035else
6036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6037$as_echo "no" >&6; }
6038fi
6039
6040
6041  test -n "$CMP" && break
6042done
6043
6044    else
6045      # If it succeeded, then it was overridden by the user. We will use it
6046      # for the tool.
6047
6048      # First remove it from the list of overridden variables, so we can test
6049      # for unknown variables in the end.
6050      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6051
6052      # Check if we try to supply an empty value
6053      if test "x$CMP" = x; then
6054        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6055$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6057$as_echo_n "checking for CMP... " >&6; }
6058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6059$as_echo "disabled" >&6; }
6060      else
6061        # Check if the provided tool contains a complete path.
6062        tool_specified="$CMP"
6063        tool_basename="${tool_specified##*/}"
6064        if test "x$tool_basename" = "x$tool_specified"; then
6065          # A command without a complete path is provided, search $PATH.
6066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6067$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6068          # Extract the first word of "$tool_basename", so it can be a program name with args.
6069set dummy $tool_basename; ac_word=$2
6070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6071$as_echo_n "checking for $ac_word... " >&6; }
6072if ${ac_cv_path_CMP+:} false; then :
6073  $as_echo_n "(cached) " >&6
6074else
6075  case $CMP in
6076  [\\/]* | ?:[\\/]*)
6077  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6078  ;;
6079  *)
6080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6081for as_dir in $PATH
6082do
6083  IFS=$as_save_IFS
6084  test -z "$as_dir" && as_dir=.
6085    for ac_exec_ext in '' $ac_executable_extensions; do
6086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6087    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6089    break 2
6090  fi
6091done
6092  done
6093IFS=$as_save_IFS
6094
6095  ;;
6096esac
6097fi
6098CMP=$ac_cv_path_CMP
6099if test -n "$CMP"; then
6100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6101$as_echo "$CMP" >&6; }
6102else
6103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6104$as_echo "no" >&6; }
6105fi
6106
6107
6108          if test "x$CMP" = x; then
6109            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6110          fi
6111        else
6112          # Otherwise we believe it is a complete path. Use it as it is.
6113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6114$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6115          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6116$as_echo_n "checking for CMP... " >&6; }
6117          if test ! -x "$tool_specified"; then
6118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6119$as_echo "not found" >&6; }
6120            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6121          fi
6122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6123$as_echo "$tool_specified" >&6; }
6124        fi
6125      fi
6126    fi
6127
6128  fi
6129
6130
6131
6132  if test "x$CMP" = x; then
6133    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6134  fi
6135
6136
6137
6138
6139
6140  # Publish this variable in the help.
6141
6142
6143  if [ -z "${COMM+x}" ]; then
6144    # The variable is not set by user, try to locate tool using the code snippet
6145    for ac_prog in comm
6146do
6147  # Extract the first word of "$ac_prog", so it can be a program name with args.
6148set dummy $ac_prog; ac_word=$2
6149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6150$as_echo_n "checking for $ac_word... " >&6; }
6151if ${ac_cv_path_COMM+:} false; then :
6152  $as_echo_n "(cached) " >&6
6153else
6154  case $COMM in
6155  [\\/]* | ?:[\\/]*)
6156  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6157  ;;
6158  *)
6159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6160for as_dir in $PATH
6161do
6162  IFS=$as_save_IFS
6163  test -z "$as_dir" && as_dir=.
6164    for ac_exec_ext in '' $ac_executable_extensions; do
6165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6166    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6168    break 2
6169  fi
6170done
6171  done
6172IFS=$as_save_IFS
6173
6174  ;;
6175esac
6176fi
6177COMM=$ac_cv_path_COMM
6178if test -n "$COMM"; then
6179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6180$as_echo "$COMM" >&6; }
6181else
6182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6183$as_echo "no" >&6; }
6184fi
6185
6186
6187  test -n "$COMM" && break
6188done
6189
6190  else
6191    # The variable is set, but is it from the command line or the environment?
6192
6193    # Try to remove the string !COMM! from our list.
6194    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6195    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6196      # If it failed, the variable was not from the command line. Ignore it,
6197      # but warn the user (except for BASH, which is always set by the calling BASH).
6198      if test "xCOMM" != xBASH; then
6199        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6200$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6201      fi
6202      # Try to locate tool using the code snippet
6203      for ac_prog in comm
6204do
6205  # Extract the first word of "$ac_prog", so it can be a program name with args.
6206set dummy $ac_prog; ac_word=$2
6207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6208$as_echo_n "checking for $ac_word... " >&6; }
6209if ${ac_cv_path_COMM+:} false; then :
6210  $as_echo_n "(cached) " >&6
6211else
6212  case $COMM in
6213  [\\/]* | ?:[\\/]*)
6214  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6215  ;;
6216  *)
6217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6218for as_dir in $PATH
6219do
6220  IFS=$as_save_IFS
6221  test -z "$as_dir" && as_dir=.
6222    for ac_exec_ext in '' $ac_executable_extensions; do
6223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6224    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6226    break 2
6227  fi
6228done
6229  done
6230IFS=$as_save_IFS
6231
6232  ;;
6233esac
6234fi
6235COMM=$ac_cv_path_COMM
6236if test -n "$COMM"; then
6237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6238$as_echo "$COMM" >&6; }
6239else
6240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6241$as_echo "no" >&6; }
6242fi
6243
6244
6245  test -n "$COMM" && break
6246done
6247
6248    else
6249      # If it succeeded, then it was overridden by the user. We will use it
6250      # for the tool.
6251
6252      # First remove it from the list of overridden variables, so we can test
6253      # for unknown variables in the end.
6254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6255
6256      # Check if we try to supply an empty value
6257      if test "x$COMM" = x; then
6258        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6259$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6261$as_echo_n "checking for COMM... " >&6; }
6262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6263$as_echo "disabled" >&6; }
6264      else
6265        # Check if the provided tool contains a complete path.
6266        tool_specified="$COMM"
6267        tool_basename="${tool_specified##*/}"
6268        if test "x$tool_basename" = "x$tool_specified"; then
6269          # A command without a complete path is provided, search $PATH.
6270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6271$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6272          # Extract the first word of "$tool_basename", so it can be a program name with args.
6273set dummy $tool_basename; ac_word=$2
6274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6275$as_echo_n "checking for $ac_word... " >&6; }
6276if ${ac_cv_path_COMM+:} false; then :
6277  $as_echo_n "(cached) " >&6
6278else
6279  case $COMM in
6280  [\\/]* | ?:[\\/]*)
6281  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6282  ;;
6283  *)
6284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6285for as_dir in $PATH
6286do
6287  IFS=$as_save_IFS
6288  test -z "$as_dir" && as_dir=.
6289    for ac_exec_ext in '' $ac_executable_extensions; do
6290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6291    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6293    break 2
6294  fi
6295done
6296  done
6297IFS=$as_save_IFS
6298
6299  ;;
6300esac
6301fi
6302COMM=$ac_cv_path_COMM
6303if test -n "$COMM"; then
6304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6305$as_echo "$COMM" >&6; }
6306else
6307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6308$as_echo "no" >&6; }
6309fi
6310
6311
6312          if test "x$COMM" = x; then
6313            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6314          fi
6315        else
6316          # Otherwise we believe it is a complete path. Use it as it is.
6317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6318$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6319          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6320$as_echo_n "checking for COMM... " >&6; }
6321          if test ! -x "$tool_specified"; then
6322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6323$as_echo "not found" >&6; }
6324            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6325          fi
6326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6327$as_echo "$tool_specified" >&6; }
6328        fi
6329      fi
6330    fi
6331
6332  fi
6333
6334
6335
6336  if test "x$COMM" = x; then
6337    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6338  fi
6339
6340
6341
6342
6343
6344  # Publish this variable in the help.
6345
6346
6347  if [ -z "${CP+x}" ]; then
6348    # The variable is not set by user, try to locate tool using the code snippet
6349    for ac_prog in cp
6350do
6351  # Extract the first word of "$ac_prog", so it can be a program name with args.
6352set dummy $ac_prog; ac_word=$2
6353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6354$as_echo_n "checking for $ac_word... " >&6; }
6355if ${ac_cv_path_CP+:} false; then :
6356  $as_echo_n "(cached) " >&6
6357else
6358  case $CP in
6359  [\\/]* | ?:[\\/]*)
6360  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6361  ;;
6362  *)
6363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6364for as_dir in $PATH
6365do
6366  IFS=$as_save_IFS
6367  test -z "$as_dir" && as_dir=.
6368    for ac_exec_ext in '' $ac_executable_extensions; do
6369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6370    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6372    break 2
6373  fi
6374done
6375  done
6376IFS=$as_save_IFS
6377
6378  ;;
6379esac
6380fi
6381CP=$ac_cv_path_CP
6382if test -n "$CP"; then
6383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6384$as_echo "$CP" >&6; }
6385else
6386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6387$as_echo "no" >&6; }
6388fi
6389
6390
6391  test -n "$CP" && break
6392done
6393
6394  else
6395    # The variable is set, but is it from the command line or the environment?
6396
6397    # Try to remove the string !CP! from our list.
6398    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6399    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6400      # If it failed, the variable was not from the command line. Ignore it,
6401      # but warn the user (except for BASH, which is always set by the calling BASH).
6402      if test "xCP" != xBASH; then
6403        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6404$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6405      fi
6406      # Try to locate tool using the code snippet
6407      for ac_prog in cp
6408do
6409  # Extract the first word of "$ac_prog", so it can be a program name with args.
6410set dummy $ac_prog; ac_word=$2
6411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6412$as_echo_n "checking for $ac_word... " >&6; }
6413if ${ac_cv_path_CP+:} false; then :
6414  $as_echo_n "(cached) " >&6
6415else
6416  case $CP in
6417  [\\/]* | ?:[\\/]*)
6418  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6419  ;;
6420  *)
6421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6422for as_dir in $PATH
6423do
6424  IFS=$as_save_IFS
6425  test -z "$as_dir" && as_dir=.
6426    for ac_exec_ext in '' $ac_executable_extensions; do
6427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6428    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6430    break 2
6431  fi
6432done
6433  done
6434IFS=$as_save_IFS
6435
6436  ;;
6437esac
6438fi
6439CP=$ac_cv_path_CP
6440if test -n "$CP"; then
6441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6442$as_echo "$CP" >&6; }
6443else
6444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6445$as_echo "no" >&6; }
6446fi
6447
6448
6449  test -n "$CP" && break
6450done
6451
6452    else
6453      # If it succeeded, then it was overridden by the user. We will use it
6454      # for the tool.
6455
6456      # First remove it from the list of overridden variables, so we can test
6457      # for unknown variables in the end.
6458      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6459
6460      # Check if we try to supply an empty value
6461      if test "x$CP" = x; then
6462        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6463$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6464        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6465$as_echo_n "checking for CP... " >&6; }
6466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6467$as_echo "disabled" >&6; }
6468      else
6469        # Check if the provided tool contains a complete path.
6470        tool_specified="$CP"
6471        tool_basename="${tool_specified##*/}"
6472        if test "x$tool_basename" = "x$tool_specified"; then
6473          # A command without a complete path is provided, search $PATH.
6474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6475$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6476          # Extract the first word of "$tool_basename", so it can be a program name with args.
6477set dummy $tool_basename; ac_word=$2
6478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6479$as_echo_n "checking for $ac_word... " >&6; }
6480if ${ac_cv_path_CP+:} false; then :
6481  $as_echo_n "(cached) " >&6
6482else
6483  case $CP in
6484  [\\/]* | ?:[\\/]*)
6485  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6486  ;;
6487  *)
6488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6489for as_dir in $PATH
6490do
6491  IFS=$as_save_IFS
6492  test -z "$as_dir" && as_dir=.
6493    for ac_exec_ext in '' $ac_executable_extensions; do
6494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6495    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6497    break 2
6498  fi
6499done
6500  done
6501IFS=$as_save_IFS
6502
6503  ;;
6504esac
6505fi
6506CP=$ac_cv_path_CP
6507if test -n "$CP"; then
6508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6509$as_echo "$CP" >&6; }
6510else
6511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6512$as_echo "no" >&6; }
6513fi
6514
6515
6516          if test "x$CP" = x; then
6517            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6518          fi
6519        else
6520          # Otherwise we believe it is a complete path. Use it as it is.
6521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6522$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6523          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6524$as_echo_n "checking for CP... " >&6; }
6525          if test ! -x "$tool_specified"; then
6526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6527$as_echo "not found" >&6; }
6528            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6529          fi
6530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6531$as_echo "$tool_specified" >&6; }
6532        fi
6533      fi
6534    fi
6535
6536  fi
6537
6538
6539
6540  if test "x$CP" = x; then
6541    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6542  fi
6543
6544
6545
6546
6547
6548  # Publish this variable in the help.
6549
6550
6551  if [ -z "${CUT+x}" ]; then
6552    # The variable is not set by user, try to locate tool using the code snippet
6553    for ac_prog in cut
6554do
6555  # Extract the first word of "$ac_prog", so it can be a program name with args.
6556set dummy $ac_prog; ac_word=$2
6557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6558$as_echo_n "checking for $ac_word... " >&6; }
6559if ${ac_cv_path_CUT+:} false; then :
6560  $as_echo_n "(cached) " >&6
6561else
6562  case $CUT in
6563  [\\/]* | ?:[\\/]*)
6564  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6565  ;;
6566  *)
6567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6568for as_dir in $PATH
6569do
6570  IFS=$as_save_IFS
6571  test -z "$as_dir" && as_dir=.
6572    for ac_exec_ext in '' $ac_executable_extensions; do
6573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6574    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6576    break 2
6577  fi
6578done
6579  done
6580IFS=$as_save_IFS
6581
6582  ;;
6583esac
6584fi
6585CUT=$ac_cv_path_CUT
6586if test -n "$CUT"; then
6587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6588$as_echo "$CUT" >&6; }
6589else
6590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6591$as_echo "no" >&6; }
6592fi
6593
6594
6595  test -n "$CUT" && break
6596done
6597
6598  else
6599    # The variable is set, but is it from the command line or the environment?
6600
6601    # Try to remove the string !CUT! from our list.
6602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6604      # If it failed, the variable was not from the command line. Ignore it,
6605      # but warn the user (except for BASH, which is always set by the calling BASH).
6606      if test "xCUT" != xBASH; then
6607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6608$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6609      fi
6610      # Try to locate tool using the code snippet
6611      for ac_prog in cut
6612do
6613  # Extract the first word of "$ac_prog", so it can be a program name with args.
6614set dummy $ac_prog; ac_word=$2
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6616$as_echo_n "checking for $ac_word... " >&6; }
6617if ${ac_cv_path_CUT+:} false; then :
6618  $as_echo_n "(cached) " >&6
6619else
6620  case $CUT in
6621  [\\/]* | ?:[\\/]*)
6622  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6623  ;;
6624  *)
6625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6626for as_dir in $PATH
6627do
6628  IFS=$as_save_IFS
6629  test -z "$as_dir" && as_dir=.
6630    for ac_exec_ext in '' $ac_executable_extensions; do
6631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6632    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6634    break 2
6635  fi
6636done
6637  done
6638IFS=$as_save_IFS
6639
6640  ;;
6641esac
6642fi
6643CUT=$ac_cv_path_CUT
6644if test -n "$CUT"; then
6645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6646$as_echo "$CUT" >&6; }
6647else
6648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6649$as_echo "no" >&6; }
6650fi
6651
6652
6653  test -n "$CUT" && break
6654done
6655
6656    else
6657      # If it succeeded, then it was overridden by the user. We will use it
6658      # for the tool.
6659
6660      # First remove it from the list of overridden variables, so we can test
6661      # for unknown variables in the end.
6662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6663
6664      # Check if we try to supply an empty value
6665      if test "x$CUT" = x; then
6666        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6667$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6669$as_echo_n "checking for CUT... " >&6; }
6670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6671$as_echo "disabled" >&6; }
6672      else
6673        # Check if the provided tool contains a complete path.
6674        tool_specified="$CUT"
6675        tool_basename="${tool_specified##*/}"
6676        if test "x$tool_basename" = "x$tool_specified"; then
6677          # A command without a complete path is provided, search $PATH.
6678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6679$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6680          # Extract the first word of "$tool_basename", so it can be a program name with args.
6681set dummy $tool_basename; ac_word=$2
6682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6683$as_echo_n "checking for $ac_word... " >&6; }
6684if ${ac_cv_path_CUT+:} false; then :
6685  $as_echo_n "(cached) " >&6
6686else
6687  case $CUT in
6688  [\\/]* | ?:[\\/]*)
6689  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6690  ;;
6691  *)
6692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6693for as_dir in $PATH
6694do
6695  IFS=$as_save_IFS
6696  test -z "$as_dir" && as_dir=.
6697    for ac_exec_ext in '' $ac_executable_extensions; do
6698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6699    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6701    break 2
6702  fi
6703done
6704  done
6705IFS=$as_save_IFS
6706
6707  ;;
6708esac
6709fi
6710CUT=$ac_cv_path_CUT
6711if test -n "$CUT"; then
6712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6713$as_echo "$CUT" >&6; }
6714else
6715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6716$as_echo "no" >&6; }
6717fi
6718
6719
6720          if test "x$CUT" = x; then
6721            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6722          fi
6723        else
6724          # Otherwise we believe it is a complete path. Use it as it is.
6725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6726$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6727          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6728$as_echo_n "checking for CUT... " >&6; }
6729          if test ! -x "$tool_specified"; then
6730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6731$as_echo "not found" >&6; }
6732            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6733          fi
6734          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6735$as_echo "$tool_specified" >&6; }
6736        fi
6737      fi
6738    fi
6739
6740  fi
6741
6742
6743
6744  if test "x$CUT" = x; then
6745    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6746  fi
6747
6748
6749
6750
6751
6752  # Publish this variable in the help.
6753
6754
6755  if [ -z "${DATE+x}" ]; then
6756    # The variable is not set by user, try to locate tool using the code snippet
6757    for ac_prog in date
6758do
6759  # Extract the first word of "$ac_prog", so it can be a program name with args.
6760set dummy $ac_prog; ac_word=$2
6761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6762$as_echo_n "checking for $ac_word... " >&6; }
6763if ${ac_cv_path_DATE+:} false; then :
6764  $as_echo_n "(cached) " >&6
6765else
6766  case $DATE in
6767  [\\/]* | ?:[\\/]*)
6768  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6769  ;;
6770  *)
6771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6772for as_dir in $PATH
6773do
6774  IFS=$as_save_IFS
6775  test -z "$as_dir" && as_dir=.
6776    for ac_exec_ext in '' $ac_executable_extensions; do
6777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6778    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6780    break 2
6781  fi
6782done
6783  done
6784IFS=$as_save_IFS
6785
6786  ;;
6787esac
6788fi
6789DATE=$ac_cv_path_DATE
6790if test -n "$DATE"; then
6791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6792$as_echo "$DATE" >&6; }
6793else
6794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6795$as_echo "no" >&6; }
6796fi
6797
6798
6799  test -n "$DATE" && break
6800done
6801
6802  else
6803    # The variable is set, but is it from the command line or the environment?
6804
6805    # Try to remove the string !DATE! from our list.
6806    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6807    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6808      # If it failed, the variable was not from the command line. Ignore it,
6809      # but warn the user (except for BASH, which is always set by the calling BASH).
6810      if test "xDATE" != xBASH; then
6811        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6812$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6813      fi
6814      # Try to locate tool using the code snippet
6815      for ac_prog in date
6816do
6817  # Extract the first word of "$ac_prog", so it can be a program name with args.
6818set dummy $ac_prog; ac_word=$2
6819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6820$as_echo_n "checking for $ac_word... " >&6; }
6821if ${ac_cv_path_DATE+:} false; then :
6822  $as_echo_n "(cached) " >&6
6823else
6824  case $DATE in
6825  [\\/]* | ?:[\\/]*)
6826  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6827  ;;
6828  *)
6829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6830for as_dir in $PATH
6831do
6832  IFS=$as_save_IFS
6833  test -z "$as_dir" && as_dir=.
6834    for ac_exec_ext in '' $ac_executable_extensions; do
6835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6836    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6838    break 2
6839  fi
6840done
6841  done
6842IFS=$as_save_IFS
6843
6844  ;;
6845esac
6846fi
6847DATE=$ac_cv_path_DATE
6848if test -n "$DATE"; then
6849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6850$as_echo "$DATE" >&6; }
6851else
6852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6853$as_echo "no" >&6; }
6854fi
6855
6856
6857  test -n "$DATE" && break
6858done
6859
6860    else
6861      # If it succeeded, then it was overridden by the user. We will use it
6862      # for the tool.
6863
6864      # First remove it from the list of overridden variables, so we can test
6865      # for unknown variables in the end.
6866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6867
6868      # Check if we try to supply an empty value
6869      if test "x$DATE" = x; then
6870        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6871$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6873$as_echo_n "checking for DATE... " >&6; }
6874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6875$as_echo "disabled" >&6; }
6876      else
6877        # Check if the provided tool contains a complete path.
6878        tool_specified="$DATE"
6879        tool_basename="${tool_specified##*/}"
6880        if test "x$tool_basename" = "x$tool_specified"; then
6881          # A command without a complete path is provided, search $PATH.
6882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6883$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6884          # Extract the first word of "$tool_basename", so it can be a program name with args.
6885set dummy $tool_basename; ac_word=$2
6886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6887$as_echo_n "checking for $ac_word... " >&6; }
6888if ${ac_cv_path_DATE+:} false; then :
6889  $as_echo_n "(cached) " >&6
6890else
6891  case $DATE in
6892  [\\/]* | ?:[\\/]*)
6893  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6894  ;;
6895  *)
6896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6897for as_dir in $PATH
6898do
6899  IFS=$as_save_IFS
6900  test -z "$as_dir" && as_dir=.
6901    for ac_exec_ext in '' $ac_executable_extensions; do
6902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6903    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6905    break 2
6906  fi
6907done
6908  done
6909IFS=$as_save_IFS
6910
6911  ;;
6912esac
6913fi
6914DATE=$ac_cv_path_DATE
6915if test -n "$DATE"; then
6916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6917$as_echo "$DATE" >&6; }
6918else
6919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6920$as_echo "no" >&6; }
6921fi
6922
6923
6924          if test "x$DATE" = x; then
6925            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6926          fi
6927        else
6928          # Otherwise we believe it is a complete path. Use it as it is.
6929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6930$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6931          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6932$as_echo_n "checking for DATE... " >&6; }
6933          if test ! -x "$tool_specified"; then
6934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6935$as_echo "not found" >&6; }
6936            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6937          fi
6938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6939$as_echo "$tool_specified" >&6; }
6940        fi
6941      fi
6942    fi
6943
6944  fi
6945
6946
6947
6948  if test "x$DATE" = x; then
6949    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6950  fi
6951
6952
6953
6954
6955
6956  # Publish this variable in the help.
6957
6958
6959  if [ -z "${DIFF+x}" ]; then
6960    # The variable is not set by user, try to locate tool using the code snippet
6961    for ac_prog in gdiff diff
6962do
6963  # Extract the first word of "$ac_prog", so it can be a program name with args.
6964set dummy $ac_prog; ac_word=$2
6965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6966$as_echo_n "checking for $ac_word... " >&6; }
6967if ${ac_cv_path_DIFF+:} false; then :
6968  $as_echo_n "(cached) " >&6
6969else
6970  case $DIFF in
6971  [\\/]* | ?:[\\/]*)
6972  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6973  ;;
6974  *)
6975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6976for as_dir in $PATH
6977do
6978  IFS=$as_save_IFS
6979  test -z "$as_dir" && as_dir=.
6980    for ac_exec_ext in '' $ac_executable_extensions; do
6981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6982    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6984    break 2
6985  fi
6986done
6987  done
6988IFS=$as_save_IFS
6989
6990  ;;
6991esac
6992fi
6993DIFF=$ac_cv_path_DIFF
6994if test -n "$DIFF"; then
6995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6996$as_echo "$DIFF" >&6; }
6997else
6998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6999$as_echo "no" >&6; }
7000fi
7001
7002
7003  test -n "$DIFF" && break
7004done
7005
7006  else
7007    # The variable is set, but is it from the command line or the environment?
7008
7009    # Try to remove the string !DIFF! from our list.
7010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7012      # If it failed, the variable was not from the command line. Ignore it,
7013      # but warn the user (except for BASH, which is always set by the calling BASH).
7014      if test "xDIFF" != xBASH; then
7015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7016$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7017      fi
7018      # Try to locate tool using the code snippet
7019      for ac_prog in gdiff diff
7020do
7021  # Extract the first word of "$ac_prog", so it can be a program name with args.
7022set dummy $ac_prog; ac_word=$2
7023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7024$as_echo_n "checking for $ac_word... " >&6; }
7025if ${ac_cv_path_DIFF+:} false; then :
7026  $as_echo_n "(cached) " >&6
7027else
7028  case $DIFF in
7029  [\\/]* | ?:[\\/]*)
7030  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7031  ;;
7032  *)
7033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7034for as_dir in $PATH
7035do
7036  IFS=$as_save_IFS
7037  test -z "$as_dir" && as_dir=.
7038    for ac_exec_ext in '' $ac_executable_extensions; do
7039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7040    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7042    break 2
7043  fi
7044done
7045  done
7046IFS=$as_save_IFS
7047
7048  ;;
7049esac
7050fi
7051DIFF=$ac_cv_path_DIFF
7052if test -n "$DIFF"; then
7053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7054$as_echo "$DIFF" >&6; }
7055else
7056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7057$as_echo "no" >&6; }
7058fi
7059
7060
7061  test -n "$DIFF" && break
7062done
7063
7064    else
7065      # If it succeeded, then it was overridden by the user. We will use it
7066      # for the tool.
7067
7068      # First remove it from the list of overridden variables, so we can test
7069      # for unknown variables in the end.
7070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7071
7072      # Check if we try to supply an empty value
7073      if test "x$DIFF" = x; then
7074        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7075$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7077$as_echo_n "checking for DIFF... " >&6; }
7078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7079$as_echo "disabled" >&6; }
7080      else
7081        # Check if the provided tool contains a complete path.
7082        tool_specified="$DIFF"
7083        tool_basename="${tool_specified##*/}"
7084        if test "x$tool_basename" = "x$tool_specified"; then
7085          # A command without a complete path is provided, search $PATH.
7086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7087$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7088          # Extract the first word of "$tool_basename", so it can be a program name with args.
7089set dummy $tool_basename; ac_word=$2
7090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7091$as_echo_n "checking for $ac_word... " >&6; }
7092if ${ac_cv_path_DIFF+:} false; then :
7093  $as_echo_n "(cached) " >&6
7094else
7095  case $DIFF in
7096  [\\/]* | ?:[\\/]*)
7097  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7098  ;;
7099  *)
7100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7101for as_dir in $PATH
7102do
7103  IFS=$as_save_IFS
7104  test -z "$as_dir" && as_dir=.
7105    for ac_exec_ext in '' $ac_executable_extensions; do
7106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7107    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7109    break 2
7110  fi
7111done
7112  done
7113IFS=$as_save_IFS
7114
7115  ;;
7116esac
7117fi
7118DIFF=$ac_cv_path_DIFF
7119if test -n "$DIFF"; then
7120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7121$as_echo "$DIFF" >&6; }
7122else
7123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7124$as_echo "no" >&6; }
7125fi
7126
7127
7128          if test "x$DIFF" = x; then
7129            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7130          fi
7131        else
7132          # Otherwise we believe it is a complete path. Use it as it is.
7133          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7134$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7135          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7136$as_echo_n "checking for DIFF... " >&6; }
7137          if test ! -x "$tool_specified"; then
7138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7139$as_echo "not found" >&6; }
7140            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7141          fi
7142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7143$as_echo "$tool_specified" >&6; }
7144        fi
7145      fi
7146    fi
7147
7148  fi
7149
7150
7151
7152  if test "x$DIFF" = x; then
7153    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7154  fi
7155
7156
7157
7158
7159
7160  # Publish this variable in the help.
7161
7162
7163  if [ -z "${DIRNAME+x}" ]; then
7164    # The variable is not set by user, try to locate tool using the code snippet
7165    for ac_prog in dirname
7166do
7167  # Extract the first word of "$ac_prog", so it can be a program name with args.
7168set dummy $ac_prog; ac_word=$2
7169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7170$as_echo_n "checking for $ac_word... " >&6; }
7171if ${ac_cv_path_DIRNAME+:} false; then :
7172  $as_echo_n "(cached) " >&6
7173else
7174  case $DIRNAME in
7175  [\\/]* | ?:[\\/]*)
7176  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7177  ;;
7178  *)
7179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7180for as_dir in $PATH
7181do
7182  IFS=$as_save_IFS
7183  test -z "$as_dir" && as_dir=.
7184    for ac_exec_ext in '' $ac_executable_extensions; do
7185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7186    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7188    break 2
7189  fi
7190done
7191  done
7192IFS=$as_save_IFS
7193
7194  ;;
7195esac
7196fi
7197DIRNAME=$ac_cv_path_DIRNAME
7198if test -n "$DIRNAME"; then
7199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7200$as_echo "$DIRNAME" >&6; }
7201else
7202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7203$as_echo "no" >&6; }
7204fi
7205
7206
7207  test -n "$DIRNAME" && break
7208done
7209
7210  else
7211    # The variable is set, but is it from the command line or the environment?
7212
7213    # Try to remove the string !DIRNAME! from our list.
7214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7216      # If it failed, the variable was not from the command line. Ignore it,
7217      # but warn the user (except for BASH, which is always set by the calling BASH).
7218      if test "xDIRNAME" != xBASH; then
7219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7220$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7221      fi
7222      # Try to locate tool using the code snippet
7223      for ac_prog in dirname
7224do
7225  # Extract the first word of "$ac_prog", so it can be a program name with args.
7226set dummy $ac_prog; ac_word=$2
7227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7228$as_echo_n "checking for $ac_word... " >&6; }
7229if ${ac_cv_path_DIRNAME+:} false; then :
7230  $as_echo_n "(cached) " >&6
7231else
7232  case $DIRNAME in
7233  [\\/]* | ?:[\\/]*)
7234  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7235  ;;
7236  *)
7237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7238for as_dir in $PATH
7239do
7240  IFS=$as_save_IFS
7241  test -z "$as_dir" && as_dir=.
7242    for ac_exec_ext in '' $ac_executable_extensions; do
7243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7244    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7246    break 2
7247  fi
7248done
7249  done
7250IFS=$as_save_IFS
7251
7252  ;;
7253esac
7254fi
7255DIRNAME=$ac_cv_path_DIRNAME
7256if test -n "$DIRNAME"; then
7257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7258$as_echo "$DIRNAME" >&6; }
7259else
7260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7261$as_echo "no" >&6; }
7262fi
7263
7264
7265  test -n "$DIRNAME" && break
7266done
7267
7268    else
7269      # If it succeeded, then it was overridden by the user. We will use it
7270      # for the tool.
7271
7272      # First remove it from the list of overridden variables, so we can test
7273      # for unknown variables in the end.
7274      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7275
7276      # Check if we try to supply an empty value
7277      if test "x$DIRNAME" = x; then
7278        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7279$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7281$as_echo_n "checking for DIRNAME... " >&6; }
7282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7283$as_echo "disabled" >&6; }
7284      else
7285        # Check if the provided tool contains a complete path.
7286        tool_specified="$DIRNAME"
7287        tool_basename="${tool_specified##*/}"
7288        if test "x$tool_basename" = "x$tool_specified"; then
7289          # A command without a complete path is provided, search $PATH.
7290          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7291$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7292          # Extract the first word of "$tool_basename", so it can be a program name with args.
7293set dummy $tool_basename; ac_word=$2
7294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7295$as_echo_n "checking for $ac_word... " >&6; }
7296if ${ac_cv_path_DIRNAME+:} false; then :
7297  $as_echo_n "(cached) " >&6
7298else
7299  case $DIRNAME in
7300  [\\/]* | ?:[\\/]*)
7301  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7302  ;;
7303  *)
7304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7305for as_dir in $PATH
7306do
7307  IFS=$as_save_IFS
7308  test -z "$as_dir" && as_dir=.
7309    for ac_exec_ext in '' $ac_executable_extensions; do
7310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7311    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7313    break 2
7314  fi
7315done
7316  done
7317IFS=$as_save_IFS
7318
7319  ;;
7320esac
7321fi
7322DIRNAME=$ac_cv_path_DIRNAME
7323if test -n "$DIRNAME"; then
7324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7325$as_echo "$DIRNAME" >&6; }
7326else
7327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7328$as_echo "no" >&6; }
7329fi
7330
7331
7332          if test "x$DIRNAME" = x; then
7333            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7334          fi
7335        else
7336          # Otherwise we believe it is a complete path. Use it as it is.
7337          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7338$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7339          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7340$as_echo_n "checking for DIRNAME... " >&6; }
7341          if test ! -x "$tool_specified"; then
7342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7343$as_echo "not found" >&6; }
7344            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7345          fi
7346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7347$as_echo "$tool_specified" >&6; }
7348        fi
7349      fi
7350    fi
7351
7352  fi
7353
7354
7355
7356  if test "x$DIRNAME" = x; then
7357    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7358  fi
7359
7360
7361
7362
7363
7364  # Publish this variable in the help.
7365
7366
7367  if [ -z "${ECHO+x}" ]; then
7368    # The variable is not set by user, try to locate tool using the code snippet
7369    for ac_prog in echo
7370do
7371  # Extract the first word of "$ac_prog", so it can be a program name with args.
7372set dummy $ac_prog; ac_word=$2
7373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7374$as_echo_n "checking for $ac_word... " >&6; }
7375if ${ac_cv_path_ECHO+:} false; then :
7376  $as_echo_n "(cached) " >&6
7377else
7378  case $ECHO in
7379  [\\/]* | ?:[\\/]*)
7380  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7381  ;;
7382  *)
7383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7384for as_dir in $PATH
7385do
7386  IFS=$as_save_IFS
7387  test -z "$as_dir" && as_dir=.
7388    for ac_exec_ext in '' $ac_executable_extensions; do
7389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7390    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7392    break 2
7393  fi
7394done
7395  done
7396IFS=$as_save_IFS
7397
7398  ;;
7399esac
7400fi
7401ECHO=$ac_cv_path_ECHO
7402if test -n "$ECHO"; then
7403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7404$as_echo "$ECHO" >&6; }
7405else
7406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7407$as_echo "no" >&6; }
7408fi
7409
7410
7411  test -n "$ECHO" && break
7412done
7413
7414  else
7415    # The variable is set, but is it from the command line or the environment?
7416
7417    # Try to remove the string !ECHO! from our list.
7418    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7419    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7420      # If it failed, the variable was not from the command line. Ignore it,
7421      # but warn the user (except for BASH, which is always set by the calling BASH).
7422      if test "xECHO" != xBASH; then
7423        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7424$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7425      fi
7426      # Try to locate tool using the code snippet
7427      for ac_prog in echo
7428do
7429  # Extract the first word of "$ac_prog", so it can be a program name with args.
7430set dummy $ac_prog; ac_word=$2
7431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7432$as_echo_n "checking for $ac_word... " >&6; }
7433if ${ac_cv_path_ECHO+:} false; then :
7434  $as_echo_n "(cached) " >&6
7435else
7436  case $ECHO in
7437  [\\/]* | ?:[\\/]*)
7438  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7439  ;;
7440  *)
7441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7442for as_dir in $PATH
7443do
7444  IFS=$as_save_IFS
7445  test -z "$as_dir" && as_dir=.
7446    for ac_exec_ext in '' $ac_executable_extensions; do
7447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7448    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7450    break 2
7451  fi
7452done
7453  done
7454IFS=$as_save_IFS
7455
7456  ;;
7457esac
7458fi
7459ECHO=$ac_cv_path_ECHO
7460if test -n "$ECHO"; then
7461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7462$as_echo "$ECHO" >&6; }
7463else
7464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7465$as_echo "no" >&6; }
7466fi
7467
7468
7469  test -n "$ECHO" && break
7470done
7471
7472    else
7473      # If it succeeded, then it was overridden by the user. We will use it
7474      # for the tool.
7475
7476      # First remove it from the list of overridden variables, so we can test
7477      # for unknown variables in the end.
7478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7479
7480      # Check if we try to supply an empty value
7481      if test "x$ECHO" = x; then
7482        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7483$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7485$as_echo_n "checking for ECHO... " >&6; }
7486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7487$as_echo "disabled" >&6; }
7488      else
7489        # Check if the provided tool contains a complete path.
7490        tool_specified="$ECHO"
7491        tool_basename="${tool_specified##*/}"
7492        if test "x$tool_basename" = "x$tool_specified"; then
7493          # A command without a complete path is provided, search $PATH.
7494          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7495$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7496          # Extract the first word of "$tool_basename", so it can be a program name with args.
7497set dummy $tool_basename; ac_word=$2
7498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7499$as_echo_n "checking for $ac_word... " >&6; }
7500if ${ac_cv_path_ECHO+:} false; then :
7501  $as_echo_n "(cached) " >&6
7502else
7503  case $ECHO in
7504  [\\/]* | ?:[\\/]*)
7505  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7506  ;;
7507  *)
7508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7509for as_dir in $PATH
7510do
7511  IFS=$as_save_IFS
7512  test -z "$as_dir" && as_dir=.
7513    for ac_exec_ext in '' $ac_executable_extensions; do
7514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7515    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7517    break 2
7518  fi
7519done
7520  done
7521IFS=$as_save_IFS
7522
7523  ;;
7524esac
7525fi
7526ECHO=$ac_cv_path_ECHO
7527if test -n "$ECHO"; then
7528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7529$as_echo "$ECHO" >&6; }
7530else
7531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7532$as_echo "no" >&6; }
7533fi
7534
7535
7536          if test "x$ECHO" = x; then
7537            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7538          fi
7539        else
7540          # Otherwise we believe it is a complete path. Use it as it is.
7541          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7542$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7543          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7544$as_echo_n "checking for ECHO... " >&6; }
7545          if test ! -x "$tool_specified"; then
7546            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7547$as_echo "not found" >&6; }
7548            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7549          fi
7550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7551$as_echo "$tool_specified" >&6; }
7552        fi
7553      fi
7554    fi
7555
7556  fi
7557
7558
7559
7560  if test "x$ECHO" = x; then
7561    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7562  fi
7563
7564
7565
7566
7567
7568  # Publish this variable in the help.
7569
7570
7571  if [ -z "${EXPR+x}" ]; then
7572    # The variable is not set by user, try to locate tool using the code snippet
7573    for ac_prog in expr
7574do
7575  # Extract the first word of "$ac_prog", so it can be a program name with args.
7576set dummy $ac_prog; ac_word=$2
7577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7578$as_echo_n "checking for $ac_word... " >&6; }
7579if ${ac_cv_path_EXPR+:} false; then :
7580  $as_echo_n "(cached) " >&6
7581else
7582  case $EXPR in
7583  [\\/]* | ?:[\\/]*)
7584  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7585  ;;
7586  *)
7587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7588for as_dir in $PATH
7589do
7590  IFS=$as_save_IFS
7591  test -z "$as_dir" && as_dir=.
7592    for ac_exec_ext in '' $ac_executable_extensions; do
7593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7594    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7596    break 2
7597  fi
7598done
7599  done
7600IFS=$as_save_IFS
7601
7602  ;;
7603esac
7604fi
7605EXPR=$ac_cv_path_EXPR
7606if test -n "$EXPR"; then
7607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7608$as_echo "$EXPR" >&6; }
7609else
7610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7611$as_echo "no" >&6; }
7612fi
7613
7614
7615  test -n "$EXPR" && break
7616done
7617
7618  else
7619    # The variable is set, but is it from the command line or the environment?
7620
7621    # Try to remove the string !EXPR! from our list.
7622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7624      # If it failed, the variable was not from the command line. Ignore it,
7625      # but warn the user (except for BASH, which is always set by the calling BASH).
7626      if test "xEXPR" != xBASH; then
7627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7628$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7629      fi
7630      # Try to locate tool using the code snippet
7631      for ac_prog in expr
7632do
7633  # Extract the first word of "$ac_prog", so it can be a program name with args.
7634set dummy $ac_prog; ac_word=$2
7635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7636$as_echo_n "checking for $ac_word... " >&6; }
7637if ${ac_cv_path_EXPR+:} false; then :
7638  $as_echo_n "(cached) " >&6
7639else
7640  case $EXPR in
7641  [\\/]* | ?:[\\/]*)
7642  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7643  ;;
7644  *)
7645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7646for as_dir in $PATH
7647do
7648  IFS=$as_save_IFS
7649  test -z "$as_dir" && as_dir=.
7650    for ac_exec_ext in '' $ac_executable_extensions; do
7651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7652    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7654    break 2
7655  fi
7656done
7657  done
7658IFS=$as_save_IFS
7659
7660  ;;
7661esac
7662fi
7663EXPR=$ac_cv_path_EXPR
7664if test -n "$EXPR"; then
7665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7666$as_echo "$EXPR" >&6; }
7667else
7668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7669$as_echo "no" >&6; }
7670fi
7671
7672
7673  test -n "$EXPR" && break
7674done
7675
7676    else
7677      # If it succeeded, then it was overridden by the user. We will use it
7678      # for the tool.
7679
7680      # First remove it from the list of overridden variables, so we can test
7681      # for unknown variables in the end.
7682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7683
7684      # Check if we try to supply an empty value
7685      if test "x$EXPR" = x; then
7686        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7687$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7689$as_echo_n "checking for EXPR... " >&6; }
7690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7691$as_echo "disabled" >&6; }
7692      else
7693        # Check if the provided tool contains a complete path.
7694        tool_specified="$EXPR"
7695        tool_basename="${tool_specified##*/}"
7696        if test "x$tool_basename" = "x$tool_specified"; then
7697          # A command without a complete path is provided, search $PATH.
7698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7699$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7700          # Extract the first word of "$tool_basename", so it can be a program name with args.
7701set dummy $tool_basename; ac_word=$2
7702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7703$as_echo_n "checking for $ac_word... " >&6; }
7704if ${ac_cv_path_EXPR+:} false; then :
7705  $as_echo_n "(cached) " >&6
7706else
7707  case $EXPR in
7708  [\\/]* | ?:[\\/]*)
7709  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7710  ;;
7711  *)
7712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7713for as_dir in $PATH
7714do
7715  IFS=$as_save_IFS
7716  test -z "$as_dir" && as_dir=.
7717    for ac_exec_ext in '' $ac_executable_extensions; do
7718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7719    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7721    break 2
7722  fi
7723done
7724  done
7725IFS=$as_save_IFS
7726
7727  ;;
7728esac
7729fi
7730EXPR=$ac_cv_path_EXPR
7731if test -n "$EXPR"; then
7732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7733$as_echo "$EXPR" >&6; }
7734else
7735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7736$as_echo "no" >&6; }
7737fi
7738
7739
7740          if test "x$EXPR" = x; then
7741            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7742          fi
7743        else
7744          # Otherwise we believe it is a complete path. Use it as it is.
7745          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7746$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7747          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7748$as_echo_n "checking for EXPR... " >&6; }
7749          if test ! -x "$tool_specified"; then
7750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7751$as_echo "not found" >&6; }
7752            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7753          fi
7754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7755$as_echo "$tool_specified" >&6; }
7756        fi
7757      fi
7758    fi
7759
7760  fi
7761
7762
7763
7764  if test "x$EXPR" = x; then
7765    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7766  fi
7767
7768
7769
7770
7771
7772  # Publish this variable in the help.
7773
7774
7775  if [ -z "${FILE+x}" ]; then
7776    # The variable is not set by user, try to locate tool using the code snippet
7777    for ac_prog in file
7778do
7779  # Extract the first word of "$ac_prog", so it can be a program name with args.
7780set dummy $ac_prog; ac_word=$2
7781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7782$as_echo_n "checking for $ac_word... " >&6; }
7783if ${ac_cv_path_FILE+:} false; then :
7784  $as_echo_n "(cached) " >&6
7785else
7786  case $FILE in
7787  [\\/]* | ?:[\\/]*)
7788  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7789  ;;
7790  *)
7791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7792for as_dir in $PATH
7793do
7794  IFS=$as_save_IFS
7795  test -z "$as_dir" && as_dir=.
7796    for ac_exec_ext in '' $ac_executable_extensions; do
7797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7798    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7800    break 2
7801  fi
7802done
7803  done
7804IFS=$as_save_IFS
7805
7806  ;;
7807esac
7808fi
7809FILE=$ac_cv_path_FILE
7810if test -n "$FILE"; then
7811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7812$as_echo "$FILE" >&6; }
7813else
7814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7815$as_echo "no" >&6; }
7816fi
7817
7818
7819  test -n "$FILE" && break
7820done
7821
7822  else
7823    # The variable is set, but is it from the command line or the environment?
7824
7825    # Try to remove the string !FILE! from our list.
7826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7828      # If it failed, the variable was not from the command line. Ignore it,
7829      # but warn the user (except for BASH, which is always set by the calling BASH).
7830      if test "xFILE" != xBASH; then
7831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7832$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7833      fi
7834      # Try to locate tool using the code snippet
7835      for ac_prog in file
7836do
7837  # Extract the first word of "$ac_prog", so it can be a program name with args.
7838set dummy $ac_prog; ac_word=$2
7839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7840$as_echo_n "checking for $ac_word... " >&6; }
7841if ${ac_cv_path_FILE+:} false; then :
7842  $as_echo_n "(cached) " >&6
7843else
7844  case $FILE in
7845  [\\/]* | ?:[\\/]*)
7846  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7847  ;;
7848  *)
7849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7850for as_dir in $PATH
7851do
7852  IFS=$as_save_IFS
7853  test -z "$as_dir" && as_dir=.
7854    for ac_exec_ext in '' $ac_executable_extensions; do
7855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7856    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7858    break 2
7859  fi
7860done
7861  done
7862IFS=$as_save_IFS
7863
7864  ;;
7865esac
7866fi
7867FILE=$ac_cv_path_FILE
7868if test -n "$FILE"; then
7869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7870$as_echo "$FILE" >&6; }
7871else
7872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7873$as_echo "no" >&6; }
7874fi
7875
7876
7877  test -n "$FILE" && break
7878done
7879
7880    else
7881      # If it succeeded, then it was overridden by the user. We will use it
7882      # for the tool.
7883
7884      # First remove it from the list of overridden variables, so we can test
7885      # for unknown variables in the end.
7886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7887
7888      # Check if we try to supply an empty value
7889      if test "x$FILE" = x; then
7890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7891$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7893$as_echo_n "checking for FILE... " >&6; }
7894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7895$as_echo "disabled" >&6; }
7896      else
7897        # Check if the provided tool contains a complete path.
7898        tool_specified="$FILE"
7899        tool_basename="${tool_specified##*/}"
7900        if test "x$tool_basename" = "x$tool_specified"; then
7901          # A command without a complete path is provided, search $PATH.
7902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7903$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7904          # Extract the first word of "$tool_basename", so it can be a program name with args.
7905set dummy $tool_basename; ac_word=$2
7906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7907$as_echo_n "checking for $ac_word... " >&6; }
7908if ${ac_cv_path_FILE+:} false; then :
7909  $as_echo_n "(cached) " >&6
7910else
7911  case $FILE in
7912  [\\/]* | ?:[\\/]*)
7913  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7914  ;;
7915  *)
7916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7917for as_dir in $PATH
7918do
7919  IFS=$as_save_IFS
7920  test -z "$as_dir" && as_dir=.
7921    for ac_exec_ext in '' $ac_executable_extensions; do
7922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7923    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7925    break 2
7926  fi
7927done
7928  done
7929IFS=$as_save_IFS
7930
7931  ;;
7932esac
7933fi
7934FILE=$ac_cv_path_FILE
7935if test -n "$FILE"; then
7936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7937$as_echo "$FILE" >&6; }
7938else
7939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7940$as_echo "no" >&6; }
7941fi
7942
7943
7944          if test "x$FILE" = x; then
7945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7946          fi
7947        else
7948          # Otherwise we believe it is a complete path. Use it as it is.
7949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7950$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7952$as_echo_n "checking for FILE... " >&6; }
7953          if test ! -x "$tool_specified"; then
7954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7955$as_echo "not found" >&6; }
7956            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7957          fi
7958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7959$as_echo "$tool_specified" >&6; }
7960        fi
7961      fi
7962    fi
7963
7964  fi
7965
7966
7967
7968  if test "x$FILE" = x; then
7969    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7970  fi
7971
7972
7973
7974
7975
7976  # Publish this variable in the help.
7977
7978
7979  if [ -z "${FIND+x}" ]; then
7980    # The variable is not set by user, try to locate tool using the code snippet
7981    for ac_prog in find
7982do
7983  # Extract the first word of "$ac_prog", so it can be a program name with args.
7984set dummy $ac_prog; ac_word=$2
7985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7986$as_echo_n "checking for $ac_word... " >&6; }
7987if ${ac_cv_path_FIND+:} false; then :
7988  $as_echo_n "(cached) " >&6
7989else
7990  case $FIND in
7991  [\\/]* | ?:[\\/]*)
7992  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7993  ;;
7994  *)
7995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7996for as_dir in $PATH
7997do
7998  IFS=$as_save_IFS
7999  test -z "$as_dir" && as_dir=.
8000    for ac_exec_ext in '' $ac_executable_extensions; do
8001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8002    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8004    break 2
8005  fi
8006done
8007  done
8008IFS=$as_save_IFS
8009
8010  ;;
8011esac
8012fi
8013FIND=$ac_cv_path_FIND
8014if test -n "$FIND"; then
8015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8016$as_echo "$FIND" >&6; }
8017else
8018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8019$as_echo "no" >&6; }
8020fi
8021
8022
8023  test -n "$FIND" && break
8024done
8025
8026  else
8027    # The variable is set, but is it from the command line or the environment?
8028
8029    # Try to remove the string !FIND! from our list.
8030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8032      # If it failed, the variable was not from the command line. Ignore it,
8033      # but warn the user (except for BASH, which is always set by the calling BASH).
8034      if test "xFIND" != xBASH; then
8035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8036$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8037      fi
8038      # Try to locate tool using the code snippet
8039      for ac_prog in find
8040do
8041  # Extract the first word of "$ac_prog", so it can be a program name with args.
8042set dummy $ac_prog; ac_word=$2
8043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8044$as_echo_n "checking for $ac_word... " >&6; }
8045if ${ac_cv_path_FIND+:} false; then :
8046  $as_echo_n "(cached) " >&6
8047else
8048  case $FIND in
8049  [\\/]* | ?:[\\/]*)
8050  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8051  ;;
8052  *)
8053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8054for as_dir in $PATH
8055do
8056  IFS=$as_save_IFS
8057  test -z "$as_dir" && as_dir=.
8058    for ac_exec_ext in '' $ac_executable_extensions; do
8059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8060    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8062    break 2
8063  fi
8064done
8065  done
8066IFS=$as_save_IFS
8067
8068  ;;
8069esac
8070fi
8071FIND=$ac_cv_path_FIND
8072if test -n "$FIND"; then
8073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8074$as_echo "$FIND" >&6; }
8075else
8076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8077$as_echo "no" >&6; }
8078fi
8079
8080
8081  test -n "$FIND" && break
8082done
8083
8084    else
8085      # If it succeeded, then it was overridden by the user. We will use it
8086      # for the tool.
8087
8088      # First remove it from the list of overridden variables, so we can test
8089      # for unknown variables in the end.
8090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8091
8092      # Check if we try to supply an empty value
8093      if test "x$FIND" = x; then
8094        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8095$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8097$as_echo_n "checking for FIND... " >&6; }
8098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8099$as_echo "disabled" >&6; }
8100      else
8101        # Check if the provided tool contains a complete path.
8102        tool_specified="$FIND"
8103        tool_basename="${tool_specified##*/}"
8104        if test "x$tool_basename" = "x$tool_specified"; then
8105          # A command without a complete path is provided, search $PATH.
8106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8107$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8108          # Extract the first word of "$tool_basename", so it can be a program name with args.
8109set dummy $tool_basename; ac_word=$2
8110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8111$as_echo_n "checking for $ac_word... " >&6; }
8112if ${ac_cv_path_FIND+:} false; then :
8113  $as_echo_n "(cached) " >&6
8114else
8115  case $FIND in
8116  [\\/]* | ?:[\\/]*)
8117  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8118  ;;
8119  *)
8120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8121for as_dir in $PATH
8122do
8123  IFS=$as_save_IFS
8124  test -z "$as_dir" && as_dir=.
8125    for ac_exec_ext in '' $ac_executable_extensions; do
8126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8127    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8129    break 2
8130  fi
8131done
8132  done
8133IFS=$as_save_IFS
8134
8135  ;;
8136esac
8137fi
8138FIND=$ac_cv_path_FIND
8139if test -n "$FIND"; then
8140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8141$as_echo "$FIND" >&6; }
8142else
8143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8144$as_echo "no" >&6; }
8145fi
8146
8147
8148          if test "x$FIND" = x; then
8149            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8150          fi
8151        else
8152          # Otherwise we believe it is a complete path. Use it as it is.
8153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8154$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8155          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8156$as_echo_n "checking for FIND... " >&6; }
8157          if test ! -x "$tool_specified"; then
8158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8159$as_echo "not found" >&6; }
8160            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8161          fi
8162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8163$as_echo "$tool_specified" >&6; }
8164        fi
8165      fi
8166    fi
8167
8168  fi
8169
8170
8171
8172  if test "x$FIND" = x; then
8173    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8174  fi
8175
8176
8177
8178
8179
8180  # Publish this variable in the help.
8181
8182
8183  if [ -z "${HEAD+x}" ]; then
8184    # The variable is not set by user, try to locate tool using the code snippet
8185    for ac_prog in head
8186do
8187  # Extract the first word of "$ac_prog", so it can be a program name with args.
8188set dummy $ac_prog; ac_word=$2
8189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8190$as_echo_n "checking for $ac_word... " >&6; }
8191if ${ac_cv_path_HEAD+:} false; then :
8192  $as_echo_n "(cached) " >&6
8193else
8194  case $HEAD in
8195  [\\/]* | ?:[\\/]*)
8196  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8197  ;;
8198  *)
8199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8200for as_dir in $PATH
8201do
8202  IFS=$as_save_IFS
8203  test -z "$as_dir" && as_dir=.
8204    for ac_exec_ext in '' $ac_executable_extensions; do
8205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8206    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8208    break 2
8209  fi
8210done
8211  done
8212IFS=$as_save_IFS
8213
8214  ;;
8215esac
8216fi
8217HEAD=$ac_cv_path_HEAD
8218if test -n "$HEAD"; then
8219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8220$as_echo "$HEAD" >&6; }
8221else
8222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8223$as_echo "no" >&6; }
8224fi
8225
8226
8227  test -n "$HEAD" && break
8228done
8229
8230  else
8231    # The variable is set, but is it from the command line or the environment?
8232
8233    # Try to remove the string !HEAD! from our list.
8234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8236      # If it failed, the variable was not from the command line. Ignore it,
8237      # but warn the user (except for BASH, which is always set by the calling BASH).
8238      if test "xHEAD" != xBASH; then
8239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8240$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8241      fi
8242      # Try to locate tool using the code snippet
8243      for ac_prog in head
8244do
8245  # Extract the first word of "$ac_prog", so it can be a program name with args.
8246set dummy $ac_prog; ac_word=$2
8247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8248$as_echo_n "checking for $ac_word... " >&6; }
8249if ${ac_cv_path_HEAD+:} false; then :
8250  $as_echo_n "(cached) " >&6
8251else
8252  case $HEAD in
8253  [\\/]* | ?:[\\/]*)
8254  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8255  ;;
8256  *)
8257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8258for as_dir in $PATH
8259do
8260  IFS=$as_save_IFS
8261  test -z "$as_dir" && as_dir=.
8262    for ac_exec_ext in '' $ac_executable_extensions; do
8263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8264    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8266    break 2
8267  fi
8268done
8269  done
8270IFS=$as_save_IFS
8271
8272  ;;
8273esac
8274fi
8275HEAD=$ac_cv_path_HEAD
8276if test -n "$HEAD"; then
8277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8278$as_echo "$HEAD" >&6; }
8279else
8280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8281$as_echo "no" >&6; }
8282fi
8283
8284
8285  test -n "$HEAD" && break
8286done
8287
8288    else
8289      # If it succeeded, then it was overridden by the user. We will use it
8290      # for the tool.
8291
8292      # First remove it from the list of overridden variables, so we can test
8293      # for unknown variables in the end.
8294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8295
8296      # Check if we try to supply an empty value
8297      if test "x$HEAD" = x; then
8298        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8299$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8301$as_echo_n "checking for HEAD... " >&6; }
8302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8303$as_echo "disabled" >&6; }
8304      else
8305        # Check if the provided tool contains a complete path.
8306        tool_specified="$HEAD"
8307        tool_basename="${tool_specified##*/}"
8308        if test "x$tool_basename" = "x$tool_specified"; then
8309          # A command without a complete path is provided, search $PATH.
8310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8311$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8312          # Extract the first word of "$tool_basename", so it can be a program name with args.
8313set dummy $tool_basename; ac_word=$2
8314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8315$as_echo_n "checking for $ac_word... " >&6; }
8316if ${ac_cv_path_HEAD+:} false; then :
8317  $as_echo_n "(cached) " >&6
8318else
8319  case $HEAD in
8320  [\\/]* | ?:[\\/]*)
8321  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8322  ;;
8323  *)
8324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8325for as_dir in $PATH
8326do
8327  IFS=$as_save_IFS
8328  test -z "$as_dir" && as_dir=.
8329    for ac_exec_ext in '' $ac_executable_extensions; do
8330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8331    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8333    break 2
8334  fi
8335done
8336  done
8337IFS=$as_save_IFS
8338
8339  ;;
8340esac
8341fi
8342HEAD=$ac_cv_path_HEAD
8343if test -n "$HEAD"; then
8344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8345$as_echo "$HEAD" >&6; }
8346else
8347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8348$as_echo "no" >&6; }
8349fi
8350
8351
8352          if test "x$HEAD" = x; then
8353            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8354          fi
8355        else
8356          # Otherwise we believe it is a complete path. Use it as it is.
8357          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8358$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8359          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8360$as_echo_n "checking for HEAD... " >&6; }
8361          if test ! -x "$tool_specified"; then
8362            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8363$as_echo "not found" >&6; }
8364            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8365          fi
8366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8367$as_echo "$tool_specified" >&6; }
8368        fi
8369      fi
8370    fi
8371
8372  fi
8373
8374
8375
8376  if test "x$HEAD" = x; then
8377    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8378  fi
8379
8380
8381
8382
8383
8384  # Publish this variable in the help.
8385
8386
8387  if [ -z "${LN+x}" ]; then
8388    # The variable is not set by user, try to locate tool using the code snippet
8389    for ac_prog in ln
8390do
8391  # Extract the first word of "$ac_prog", so it can be a program name with args.
8392set dummy $ac_prog; ac_word=$2
8393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8394$as_echo_n "checking for $ac_word... " >&6; }
8395if ${ac_cv_path_LN+:} false; then :
8396  $as_echo_n "(cached) " >&6
8397else
8398  case $LN in
8399  [\\/]* | ?:[\\/]*)
8400  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8401  ;;
8402  *)
8403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8404for as_dir in $PATH
8405do
8406  IFS=$as_save_IFS
8407  test -z "$as_dir" && as_dir=.
8408    for ac_exec_ext in '' $ac_executable_extensions; do
8409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8410    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8412    break 2
8413  fi
8414done
8415  done
8416IFS=$as_save_IFS
8417
8418  ;;
8419esac
8420fi
8421LN=$ac_cv_path_LN
8422if test -n "$LN"; then
8423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8424$as_echo "$LN" >&6; }
8425else
8426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8427$as_echo "no" >&6; }
8428fi
8429
8430
8431  test -n "$LN" && break
8432done
8433
8434  else
8435    # The variable is set, but is it from the command line or the environment?
8436
8437    # Try to remove the string !LN! from our list.
8438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8440      # If it failed, the variable was not from the command line. Ignore it,
8441      # but warn the user (except for BASH, which is always set by the calling BASH).
8442      if test "xLN" != xBASH; then
8443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8444$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8445      fi
8446      # Try to locate tool using the code snippet
8447      for ac_prog in ln
8448do
8449  # Extract the first word of "$ac_prog", so it can be a program name with args.
8450set dummy $ac_prog; ac_word=$2
8451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8452$as_echo_n "checking for $ac_word... " >&6; }
8453if ${ac_cv_path_LN+:} false; then :
8454  $as_echo_n "(cached) " >&6
8455else
8456  case $LN in
8457  [\\/]* | ?:[\\/]*)
8458  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8459  ;;
8460  *)
8461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8462for as_dir in $PATH
8463do
8464  IFS=$as_save_IFS
8465  test -z "$as_dir" && as_dir=.
8466    for ac_exec_ext in '' $ac_executable_extensions; do
8467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8468    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8470    break 2
8471  fi
8472done
8473  done
8474IFS=$as_save_IFS
8475
8476  ;;
8477esac
8478fi
8479LN=$ac_cv_path_LN
8480if test -n "$LN"; then
8481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8482$as_echo "$LN" >&6; }
8483else
8484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8485$as_echo "no" >&6; }
8486fi
8487
8488
8489  test -n "$LN" && break
8490done
8491
8492    else
8493      # If it succeeded, then it was overridden by the user. We will use it
8494      # for the tool.
8495
8496      # First remove it from the list of overridden variables, so we can test
8497      # for unknown variables in the end.
8498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8499
8500      # Check if we try to supply an empty value
8501      if test "x$LN" = x; then
8502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8503$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8505$as_echo_n "checking for LN... " >&6; }
8506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8507$as_echo "disabled" >&6; }
8508      else
8509        # Check if the provided tool contains a complete path.
8510        tool_specified="$LN"
8511        tool_basename="${tool_specified##*/}"
8512        if test "x$tool_basename" = "x$tool_specified"; then
8513          # A command without a complete path is provided, search $PATH.
8514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8515$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8516          # Extract the first word of "$tool_basename", so it can be a program name with args.
8517set dummy $tool_basename; ac_word=$2
8518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8519$as_echo_n "checking for $ac_word... " >&6; }
8520if ${ac_cv_path_LN+:} false; then :
8521  $as_echo_n "(cached) " >&6
8522else
8523  case $LN in
8524  [\\/]* | ?:[\\/]*)
8525  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8526  ;;
8527  *)
8528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8529for as_dir in $PATH
8530do
8531  IFS=$as_save_IFS
8532  test -z "$as_dir" && as_dir=.
8533    for ac_exec_ext in '' $ac_executable_extensions; do
8534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8535    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8537    break 2
8538  fi
8539done
8540  done
8541IFS=$as_save_IFS
8542
8543  ;;
8544esac
8545fi
8546LN=$ac_cv_path_LN
8547if test -n "$LN"; then
8548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8549$as_echo "$LN" >&6; }
8550else
8551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8552$as_echo "no" >&6; }
8553fi
8554
8555
8556          if test "x$LN" = x; then
8557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8558          fi
8559        else
8560          # Otherwise we believe it is a complete path. Use it as it is.
8561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8562$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8564$as_echo_n "checking for LN... " >&6; }
8565          if test ! -x "$tool_specified"; then
8566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8567$as_echo "not found" >&6; }
8568            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8569          fi
8570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8571$as_echo "$tool_specified" >&6; }
8572        fi
8573      fi
8574    fi
8575
8576  fi
8577
8578
8579
8580  if test "x$LN" = x; then
8581    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8582  fi
8583
8584
8585
8586
8587
8588  # Publish this variable in the help.
8589
8590
8591  if [ -z "${LS+x}" ]; then
8592    # The variable is not set by user, try to locate tool using the code snippet
8593    for ac_prog in ls
8594do
8595  # Extract the first word of "$ac_prog", so it can be a program name with args.
8596set dummy $ac_prog; ac_word=$2
8597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8598$as_echo_n "checking for $ac_word... " >&6; }
8599if ${ac_cv_path_LS+:} false; then :
8600  $as_echo_n "(cached) " >&6
8601else
8602  case $LS in
8603  [\\/]* | ?:[\\/]*)
8604  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8605  ;;
8606  *)
8607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8608for as_dir in $PATH
8609do
8610  IFS=$as_save_IFS
8611  test -z "$as_dir" && as_dir=.
8612    for ac_exec_ext in '' $ac_executable_extensions; do
8613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8614    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8616    break 2
8617  fi
8618done
8619  done
8620IFS=$as_save_IFS
8621
8622  ;;
8623esac
8624fi
8625LS=$ac_cv_path_LS
8626if test -n "$LS"; then
8627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8628$as_echo "$LS" >&6; }
8629else
8630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8631$as_echo "no" >&6; }
8632fi
8633
8634
8635  test -n "$LS" && break
8636done
8637
8638  else
8639    # The variable is set, but is it from the command line or the environment?
8640
8641    # Try to remove the string !LS! from our list.
8642    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8643    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8644      # If it failed, the variable was not from the command line. Ignore it,
8645      # but warn the user (except for BASH, which is always set by the calling BASH).
8646      if test "xLS" != xBASH; then
8647        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8648$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8649      fi
8650      # Try to locate tool using the code snippet
8651      for ac_prog in ls
8652do
8653  # Extract the first word of "$ac_prog", so it can be a program name with args.
8654set dummy $ac_prog; ac_word=$2
8655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8656$as_echo_n "checking for $ac_word... " >&6; }
8657if ${ac_cv_path_LS+:} false; then :
8658  $as_echo_n "(cached) " >&6
8659else
8660  case $LS in
8661  [\\/]* | ?:[\\/]*)
8662  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8663  ;;
8664  *)
8665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8666for as_dir in $PATH
8667do
8668  IFS=$as_save_IFS
8669  test -z "$as_dir" && as_dir=.
8670    for ac_exec_ext in '' $ac_executable_extensions; do
8671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8672    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8674    break 2
8675  fi
8676done
8677  done
8678IFS=$as_save_IFS
8679
8680  ;;
8681esac
8682fi
8683LS=$ac_cv_path_LS
8684if test -n "$LS"; then
8685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8686$as_echo "$LS" >&6; }
8687else
8688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8689$as_echo "no" >&6; }
8690fi
8691
8692
8693  test -n "$LS" && break
8694done
8695
8696    else
8697      # If it succeeded, then it was overridden by the user. We will use it
8698      # for the tool.
8699
8700      # First remove it from the list of overridden variables, so we can test
8701      # for unknown variables in the end.
8702      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8703
8704      # Check if we try to supply an empty value
8705      if test "x$LS" = x; then
8706        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8707$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8709$as_echo_n "checking for LS... " >&6; }
8710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8711$as_echo "disabled" >&6; }
8712      else
8713        # Check if the provided tool contains a complete path.
8714        tool_specified="$LS"
8715        tool_basename="${tool_specified##*/}"
8716        if test "x$tool_basename" = "x$tool_specified"; then
8717          # A command without a complete path is provided, search $PATH.
8718          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8719$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8720          # Extract the first word of "$tool_basename", so it can be a program name with args.
8721set dummy $tool_basename; ac_word=$2
8722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8723$as_echo_n "checking for $ac_word... " >&6; }
8724if ${ac_cv_path_LS+:} false; then :
8725  $as_echo_n "(cached) " >&6
8726else
8727  case $LS in
8728  [\\/]* | ?:[\\/]*)
8729  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8730  ;;
8731  *)
8732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8733for as_dir in $PATH
8734do
8735  IFS=$as_save_IFS
8736  test -z "$as_dir" && as_dir=.
8737    for ac_exec_ext in '' $ac_executable_extensions; do
8738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8739    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8741    break 2
8742  fi
8743done
8744  done
8745IFS=$as_save_IFS
8746
8747  ;;
8748esac
8749fi
8750LS=$ac_cv_path_LS
8751if test -n "$LS"; then
8752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8753$as_echo "$LS" >&6; }
8754else
8755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8756$as_echo "no" >&6; }
8757fi
8758
8759
8760          if test "x$LS" = x; then
8761            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8762          fi
8763        else
8764          # Otherwise we believe it is a complete path. Use it as it is.
8765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8766$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8767          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8768$as_echo_n "checking for LS... " >&6; }
8769          if test ! -x "$tool_specified"; then
8770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8771$as_echo "not found" >&6; }
8772            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8773          fi
8774          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8775$as_echo "$tool_specified" >&6; }
8776        fi
8777      fi
8778    fi
8779
8780  fi
8781
8782
8783
8784  if test "x$LS" = x; then
8785    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8786  fi
8787
8788
8789
8790
8791
8792  # Publish this variable in the help.
8793
8794
8795  if [ -z "${MKDIR+x}" ]; then
8796    # The variable is not set by user, try to locate tool using the code snippet
8797    for ac_prog in mkdir
8798do
8799  # Extract the first word of "$ac_prog", so it can be a program name with args.
8800set dummy $ac_prog; ac_word=$2
8801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8802$as_echo_n "checking for $ac_word... " >&6; }
8803if ${ac_cv_path_MKDIR+:} false; then :
8804  $as_echo_n "(cached) " >&6
8805else
8806  case $MKDIR in
8807  [\\/]* | ?:[\\/]*)
8808  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8809  ;;
8810  *)
8811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8812for as_dir in $PATH
8813do
8814  IFS=$as_save_IFS
8815  test -z "$as_dir" && as_dir=.
8816    for ac_exec_ext in '' $ac_executable_extensions; do
8817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8818    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8820    break 2
8821  fi
8822done
8823  done
8824IFS=$as_save_IFS
8825
8826  ;;
8827esac
8828fi
8829MKDIR=$ac_cv_path_MKDIR
8830if test -n "$MKDIR"; then
8831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8832$as_echo "$MKDIR" >&6; }
8833else
8834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8835$as_echo "no" >&6; }
8836fi
8837
8838
8839  test -n "$MKDIR" && break
8840done
8841
8842  else
8843    # The variable is set, but is it from the command line or the environment?
8844
8845    # Try to remove the string !MKDIR! from our list.
8846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8848      # If it failed, the variable was not from the command line. Ignore it,
8849      # but warn the user (except for BASH, which is always set by the calling BASH).
8850      if test "xMKDIR" != xBASH; then
8851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8852$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8853      fi
8854      # Try to locate tool using the code snippet
8855      for ac_prog in mkdir
8856do
8857  # Extract the first word of "$ac_prog", so it can be a program name with args.
8858set dummy $ac_prog; ac_word=$2
8859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8860$as_echo_n "checking for $ac_word... " >&6; }
8861if ${ac_cv_path_MKDIR+:} false; then :
8862  $as_echo_n "(cached) " >&6
8863else
8864  case $MKDIR in
8865  [\\/]* | ?:[\\/]*)
8866  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8867  ;;
8868  *)
8869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8870for as_dir in $PATH
8871do
8872  IFS=$as_save_IFS
8873  test -z "$as_dir" && as_dir=.
8874    for ac_exec_ext in '' $ac_executable_extensions; do
8875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8876    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8878    break 2
8879  fi
8880done
8881  done
8882IFS=$as_save_IFS
8883
8884  ;;
8885esac
8886fi
8887MKDIR=$ac_cv_path_MKDIR
8888if test -n "$MKDIR"; then
8889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8890$as_echo "$MKDIR" >&6; }
8891else
8892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8893$as_echo "no" >&6; }
8894fi
8895
8896
8897  test -n "$MKDIR" && break
8898done
8899
8900    else
8901      # If it succeeded, then it was overridden by the user. We will use it
8902      # for the tool.
8903
8904      # First remove it from the list of overridden variables, so we can test
8905      # for unknown variables in the end.
8906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8907
8908      # Check if we try to supply an empty value
8909      if test "x$MKDIR" = x; then
8910        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8911$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8913$as_echo_n "checking for MKDIR... " >&6; }
8914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8915$as_echo "disabled" >&6; }
8916      else
8917        # Check if the provided tool contains a complete path.
8918        tool_specified="$MKDIR"
8919        tool_basename="${tool_specified##*/}"
8920        if test "x$tool_basename" = "x$tool_specified"; then
8921          # A command without a complete path is provided, search $PATH.
8922          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8923$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8924          # Extract the first word of "$tool_basename", so it can be a program name with args.
8925set dummy $tool_basename; ac_word=$2
8926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8927$as_echo_n "checking for $ac_word... " >&6; }
8928if ${ac_cv_path_MKDIR+:} false; then :
8929  $as_echo_n "(cached) " >&6
8930else
8931  case $MKDIR in
8932  [\\/]* | ?:[\\/]*)
8933  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8934  ;;
8935  *)
8936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8937for as_dir in $PATH
8938do
8939  IFS=$as_save_IFS
8940  test -z "$as_dir" && as_dir=.
8941    for ac_exec_ext in '' $ac_executable_extensions; do
8942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8943    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8945    break 2
8946  fi
8947done
8948  done
8949IFS=$as_save_IFS
8950
8951  ;;
8952esac
8953fi
8954MKDIR=$ac_cv_path_MKDIR
8955if test -n "$MKDIR"; then
8956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8957$as_echo "$MKDIR" >&6; }
8958else
8959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8960$as_echo "no" >&6; }
8961fi
8962
8963
8964          if test "x$MKDIR" = x; then
8965            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8966          fi
8967        else
8968          # Otherwise we believe it is a complete path. Use it as it is.
8969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8970$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8971          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8972$as_echo_n "checking for MKDIR... " >&6; }
8973          if test ! -x "$tool_specified"; then
8974            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8975$as_echo "not found" >&6; }
8976            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8977          fi
8978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8979$as_echo "$tool_specified" >&6; }
8980        fi
8981      fi
8982    fi
8983
8984  fi
8985
8986
8987
8988  if test "x$MKDIR" = x; then
8989    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8990  fi
8991
8992
8993
8994
8995
8996  # Publish this variable in the help.
8997
8998
8999  if [ -z "${MKTEMP+x}" ]; then
9000    # The variable is not set by user, try to locate tool using the code snippet
9001    for ac_prog in mktemp
9002do
9003  # Extract the first word of "$ac_prog", so it can be a program name with args.
9004set dummy $ac_prog; ac_word=$2
9005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9006$as_echo_n "checking for $ac_word... " >&6; }
9007if ${ac_cv_path_MKTEMP+:} false; then :
9008  $as_echo_n "(cached) " >&6
9009else
9010  case $MKTEMP in
9011  [\\/]* | ?:[\\/]*)
9012  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9013  ;;
9014  *)
9015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9016for as_dir in $PATH
9017do
9018  IFS=$as_save_IFS
9019  test -z "$as_dir" && as_dir=.
9020    for ac_exec_ext in '' $ac_executable_extensions; do
9021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9022    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9024    break 2
9025  fi
9026done
9027  done
9028IFS=$as_save_IFS
9029
9030  ;;
9031esac
9032fi
9033MKTEMP=$ac_cv_path_MKTEMP
9034if test -n "$MKTEMP"; then
9035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9036$as_echo "$MKTEMP" >&6; }
9037else
9038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9039$as_echo "no" >&6; }
9040fi
9041
9042
9043  test -n "$MKTEMP" && break
9044done
9045
9046  else
9047    # The variable is set, but is it from the command line or the environment?
9048
9049    # Try to remove the string !MKTEMP! from our list.
9050    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9051    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9052      # If it failed, the variable was not from the command line. Ignore it,
9053      # but warn the user (except for BASH, which is always set by the calling BASH).
9054      if test "xMKTEMP" != xBASH; then
9055        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9056$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9057      fi
9058      # Try to locate tool using the code snippet
9059      for ac_prog in mktemp
9060do
9061  # Extract the first word of "$ac_prog", so it can be a program name with args.
9062set dummy $ac_prog; ac_word=$2
9063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9064$as_echo_n "checking for $ac_word... " >&6; }
9065if ${ac_cv_path_MKTEMP+:} false; then :
9066  $as_echo_n "(cached) " >&6
9067else
9068  case $MKTEMP in
9069  [\\/]* | ?:[\\/]*)
9070  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9071  ;;
9072  *)
9073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9074for as_dir in $PATH
9075do
9076  IFS=$as_save_IFS
9077  test -z "$as_dir" && as_dir=.
9078    for ac_exec_ext in '' $ac_executable_extensions; do
9079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9080    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9082    break 2
9083  fi
9084done
9085  done
9086IFS=$as_save_IFS
9087
9088  ;;
9089esac
9090fi
9091MKTEMP=$ac_cv_path_MKTEMP
9092if test -n "$MKTEMP"; then
9093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9094$as_echo "$MKTEMP" >&6; }
9095else
9096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9097$as_echo "no" >&6; }
9098fi
9099
9100
9101  test -n "$MKTEMP" && break
9102done
9103
9104    else
9105      # If it succeeded, then it was overridden by the user. We will use it
9106      # for the tool.
9107
9108      # First remove it from the list of overridden variables, so we can test
9109      # for unknown variables in the end.
9110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9111
9112      # Check if we try to supply an empty value
9113      if test "x$MKTEMP" = x; then
9114        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9115$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9117$as_echo_n "checking for MKTEMP... " >&6; }
9118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9119$as_echo "disabled" >&6; }
9120      else
9121        # Check if the provided tool contains a complete path.
9122        tool_specified="$MKTEMP"
9123        tool_basename="${tool_specified##*/}"
9124        if test "x$tool_basename" = "x$tool_specified"; then
9125          # A command without a complete path is provided, search $PATH.
9126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9127$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9128          # Extract the first word of "$tool_basename", so it can be a program name with args.
9129set dummy $tool_basename; ac_word=$2
9130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9131$as_echo_n "checking for $ac_word... " >&6; }
9132if ${ac_cv_path_MKTEMP+:} false; then :
9133  $as_echo_n "(cached) " >&6
9134else
9135  case $MKTEMP in
9136  [\\/]* | ?:[\\/]*)
9137  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9138  ;;
9139  *)
9140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9141for as_dir in $PATH
9142do
9143  IFS=$as_save_IFS
9144  test -z "$as_dir" && as_dir=.
9145    for ac_exec_ext in '' $ac_executable_extensions; do
9146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9147    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9149    break 2
9150  fi
9151done
9152  done
9153IFS=$as_save_IFS
9154
9155  ;;
9156esac
9157fi
9158MKTEMP=$ac_cv_path_MKTEMP
9159if test -n "$MKTEMP"; then
9160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9161$as_echo "$MKTEMP" >&6; }
9162else
9163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9164$as_echo "no" >&6; }
9165fi
9166
9167
9168          if test "x$MKTEMP" = x; then
9169            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9170          fi
9171        else
9172          # Otherwise we believe it is a complete path. Use it as it is.
9173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9174$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9175          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9176$as_echo_n "checking for MKTEMP... " >&6; }
9177          if test ! -x "$tool_specified"; then
9178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9179$as_echo "not found" >&6; }
9180            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9181          fi
9182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9183$as_echo "$tool_specified" >&6; }
9184        fi
9185      fi
9186    fi
9187
9188  fi
9189
9190
9191
9192  if test "x$MKTEMP" = x; then
9193    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9194  fi
9195
9196
9197
9198
9199
9200  # Publish this variable in the help.
9201
9202
9203  if [ -z "${MV+x}" ]; then
9204    # The variable is not set by user, try to locate tool using the code snippet
9205    for ac_prog in mv
9206do
9207  # Extract the first word of "$ac_prog", so it can be a program name with args.
9208set dummy $ac_prog; ac_word=$2
9209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9210$as_echo_n "checking for $ac_word... " >&6; }
9211if ${ac_cv_path_MV+:} false; then :
9212  $as_echo_n "(cached) " >&6
9213else
9214  case $MV in
9215  [\\/]* | ?:[\\/]*)
9216  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9217  ;;
9218  *)
9219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9220for as_dir in $PATH
9221do
9222  IFS=$as_save_IFS
9223  test -z "$as_dir" && as_dir=.
9224    for ac_exec_ext in '' $ac_executable_extensions; do
9225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9226    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9228    break 2
9229  fi
9230done
9231  done
9232IFS=$as_save_IFS
9233
9234  ;;
9235esac
9236fi
9237MV=$ac_cv_path_MV
9238if test -n "$MV"; then
9239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9240$as_echo "$MV" >&6; }
9241else
9242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9243$as_echo "no" >&6; }
9244fi
9245
9246
9247  test -n "$MV" && break
9248done
9249
9250  else
9251    # The variable is set, but is it from the command line or the environment?
9252
9253    # Try to remove the string !MV! from our list.
9254    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9255    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9256      # If it failed, the variable was not from the command line. Ignore it,
9257      # but warn the user (except for BASH, which is always set by the calling BASH).
9258      if test "xMV" != xBASH; then
9259        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9260$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9261      fi
9262      # Try to locate tool using the code snippet
9263      for ac_prog in mv
9264do
9265  # Extract the first word of "$ac_prog", so it can be a program name with args.
9266set dummy $ac_prog; ac_word=$2
9267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9268$as_echo_n "checking for $ac_word... " >&6; }
9269if ${ac_cv_path_MV+:} false; then :
9270  $as_echo_n "(cached) " >&6
9271else
9272  case $MV in
9273  [\\/]* | ?:[\\/]*)
9274  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9275  ;;
9276  *)
9277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9278for as_dir in $PATH
9279do
9280  IFS=$as_save_IFS
9281  test -z "$as_dir" && as_dir=.
9282    for ac_exec_ext in '' $ac_executable_extensions; do
9283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9284    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9286    break 2
9287  fi
9288done
9289  done
9290IFS=$as_save_IFS
9291
9292  ;;
9293esac
9294fi
9295MV=$ac_cv_path_MV
9296if test -n "$MV"; then
9297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9298$as_echo "$MV" >&6; }
9299else
9300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9301$as_echo "no" >&6; }
9302fi
9303
9304
9305  test -n "$MV" && break
9306done
9307
9308    else
9309      # If it succeeded, then it was overridden by the user. We will use it
9310      # for the tool.
9311
9312      # First remove it from the list of overridden variables, so we can test
9313      # for unknown variables in the end.
9314      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9315
9316      # Check if we try to supply an empty value
9317      if test "x$MV" = x; then
9318        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9319$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9320        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9321$as_echo_n "checking for MV... " >&6; }
9322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9323$as_echo "disabled" >&6; }
9324      else
9325        # Check if the provided tool contains a complete path.
9326        tool_specified="$MV"
9327        tool_basename="${tool_specified##*/}"
9328        if test "x$tool_basename" = "x$tool_specified"; then
9329          # A command without a complete path is provided, search $PATH.
9330          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9331$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9332          # Extract the first word of "$tool_basename", so it can be a program name with args.
9333set dummy $tool_basename; ac_word=$2
9334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9335$as_echo_n "checking for $ac_word... " >&6; }
9336if ${ac_cv_path_MV+:} false; then :
9337  $as_echo_n "(cached) " >&6
9338else
9339  case $MV in
9340  [\\/]* | ?:[\\/]*)
9341  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9342  ;;
9343  *)
9344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9345for as_dir in $PATH
9346do
9347  IFS=$as_save_IFS
9348  test -z "$as_dir" && as_dir=.
9349    for ac_exec_ext in '' $ac_executable_extensions; do
9350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9351    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9353    break 2
9354  fi
9355done
9356  done
9357IFS=$as_save_IFS
9358
9359  ;;
9360esac
9361fi
9362MV=$ac_cv_path_MV
9363if test -n "$MV"; then
9364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9365$as_echo "$MV" >&6; }
9366else
9367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9368$as_echo "no" >&6; }
9369fi
9370
9371
9372          if test "x$MV" = x; then
9373            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9374          fi
9375        else
9376          # Otherwise we believe it is a complete path. Use it as it is.
9377          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9378$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9379          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9380$as_echo_n "checking for MV... " >&6; }
9381          if test ! -x "$tool_specified"; then
9382            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9383$as_echo "not found" >&6; }
9384            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9385          fi
9386          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9387$as_echo "$tool_specified" >&6; }
9388        fi
9389      fi
9390    fi
9391
9392  fi
9393
9394
9395
9396  if test "x$MV" = x; then
9397    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9398  fi
9399
9400
9401
9402
9403
9404  # Publish this variable in the help.
9405
9406
9407  if [ -z "${NAWK+x}" ]; then
9408    # The variable is not set by user, try to locate tool using the code snippet
9409    for ac_prog in nawk gawk awk
9410do
9411  # Extract the first word of "$ac_prog", so it can be a program name with args.
9412set dummy $ac_prog; ac_word=$2
9413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9414$as_echo_n "checking for $ac_word... " >&6; }
9415if ${ac_cv_path_NAWK+:} false; then :
9416  $as_echo_n "(cached) " >&6
9417else
9418  case $NAWK in
9419  [\\/]* | ?:[\\/]*)
9420  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9421  ;;
9422  *)
9423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9424for as_dir in $PATH
9425do
9426  IFS=$as_save_IFS
9427  test -z "$as_dir" && as_dir=.
9428    for ac_exec_ext in '' $ac_executable_extensions; do
9429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9430    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9432    break 2
9433  fi
9434done
9435  done
9436IFS=$as_save_IFS
9437
9438  ;;
9439esac
9440fi
9441NAWK=$ac_cv_path_NAWK
9442if test -n "$NAWK"; then
9443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9444$as_echo "$NAWK" >&6; }
9445else
9446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9447$as_echo "no" >&6; }
9448fi
9449
9450
9451  test -n "$NAWK" && break
9452done
9453
9454  else
9455    # The variable is set, but is it from the command line or the environment?
9456
9457    # Try to remove the string !NAWK! from our list.
9458    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9459    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9460      # If it failed, the variable was not from the command line. Ignore it,
9461      # but warn the user (except for BASH, which is always set by the calling BASH).
9462      if test "xNAWK" != xBASH; then
9463        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9464$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9465      fi
9466      # Try to locate tool using the code snippet
9467      for ac_prog in nawk gawk awk
9468do
9469  # Extract the first word of "$ac_prog", so it can be a program name with args.
9470set dummy $ac_prog; ac_word=$2
9471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9472$as_echo_n "checking for $ac_word... " >&6; }
9473if ${ac_cv_path_NAWK+:} false; then :
9474  $as_echo_n "(cached) " >&6
9475else
9476  case $NAWK in
9477  [\\/]* | ?:[\\/]*)
9478  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9479  ;;
9480  *)
9481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9482for as_dir in $PATH
9483do
9484  IFS=$as_save_IFS
9485  test -z "$as_dir" && as_dir=.
9486    for ac_exec_ext in '' $ac_executable_extensions; do
9487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9488    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9490    break 2
9491  fi
9492done
9493  done
9494IFS=$as_save_IFS
9495
9496  ;;
9497esac
9498fi
9499NAWK=$ac_cv_path_NAWK
9500if test -n "$NAWK"; then
9501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9502$as_echo "$NAWK" >&6; }
9503else
9504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9505$as_echo "no" >&6; }
9506fi
9507
9508
9509  test -n "$NAWK" && break
9510done
9511
9512    else
9513      # If it succeeded, then it was overridden by the user. We will use it
9514      # for the tool.
9515
9516      # First remove it from the list of overridden variables, so we can test
9517      # for unknown variables in the end.
9518      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9519
9520      # Check if we try to supply an empty value
9521      if test "x$NAWK" = x; then
9522        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9523$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9524        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9525$as_echo_n "checking for NAWK... " >&6; }
9526        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9527$as_echo "disabled" >&6; }
9528      else
9529        # Check if the provided tool contains a complete path.
9530        tool_specified="$NAWK"
9531        tool_basename="${tool_specified##*/}"
9532        if test "x$tool_basename" = "x$tool_specified"; then
9533          # A command without a complete path is provided, search $PATH.
9534          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9535$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9536          # Extract the first word of "$tool_basename", so it can be a program name with args.
9537set dummy $tool_basename; ac_word=$2
9538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9539$as_echo_n "checking for $ac_word... " >&6; }
9540if ${ac_cv_path_NAWK+:} false; then :
9541  $as_echo_n "(cached) " >&6
9542else
9543  case $NAWK in
9544  [\\/]* | ?:[\\/]*)
9545  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9546  ;;
9547  *)
9548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9549for as_dir in $PATH
9550do
9551  IFS=$as_save_IFS
9552  test -z "$as_dir" && as_dir=.
9553    for ac_exec_ext in '' $ac_executable_extensions; do
9554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9555    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9557    break 2
9558  fi
9559done
9560  done
9561IFS=$as_save_IFS
9562
9563  ;;
9564esac
9565fi
9566NAWK=$ac_cv_path_NAWK
9567if test -n "$NAWK"; then
9568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9569$as_echo "$NAWK" >&6; }
9570else
9571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9572$as_echo "no" >&6; }
9573fi
9574
9575
9576          if test "x$NAWK" = x; then
9577            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9578          fi
9579        else
9580          # Otherwise we believe it is a complete path. Use it as it is.
9581          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9582$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9583          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9584$as_echo_n "checking for NAWK... " >&6; }
9585          if test ! -x "$tool_specified"; then
9586            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9587$as_echo "not found" >&6; }
9588            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9589          fi
9590          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9591$as_echo "$tool_specified" >&6; }
9592        fi
9593      fi
9594    fi
9595
9596  fi
9597
9598
9599
9600  if test "x$NAWK" = x; then
9601    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9602  fi
9603
9604
9605
9606
9607
9608  # Publish this variable in the help.
9609
9610
9611  if [ -z "${PRINTF+x}" ]; then
9612    # The variable is not set by user, try to locate tool using the code snippet
9613    for ac_prog in printf
9614do
9615  # Extract the first word of "$ac_prog", so it can be a program name with args.
9616set dummy $ac_prog; ac_word=$2
9617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9618$as_echo_n "checking for $ac_word... " >&6; }
9619if ${ac_cv_path_PRINTF+:} false; then :
9620  $as_echo_n "(cached) " >&6
9621else
9622  case $PRINTF in
9623  [\\/]* | ?:[\\/]*)
9624  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9625  ;;
9626  *)
9627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9628for as_dir in $PATH
9629do
9630  IFS=$as_save_IFS
9631  test -z "$as_dir" && as_dir=.
9632    for ac_exec_ext in '' $ac_executable_extensions; do
9633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9634    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9636    break 2
9637  fi
9638done
9639  done
9640IFS=$as_save_IFS
9641
9642  ;;
9643esac
9644fi
9645PRINTF=$ac_cv_path_PRINTF
9646if test -n "$PRINTF"; then
9647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9648$as_echo "$PRINTF" >&6; }
9649else
9650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9651$as_echo "no" >&6; }
9652fi
9653
9654
9655  test -n "$PRINTF" && break
9656done
9657
9658  else
9659    # The variable is set, but is it from the command line or the environment?
9660
9661    # Try to remove the string !PRINTF! from our list.
9662    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9663    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9664      # If it failed, the variable was not from the command line. Ignore it,
9665      # but warn the user (except for BASH, which is always set by the calling BASH).
9666      if test "xPRINTF" != xBASH; then
9667        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9668$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9669      fi
9670      # Try to locate tool using the code snippet
9671      for ac_prog in printf
9672do
9673  # Extract the first word of "$ac_prog", so it can be a program name with args.
9674set dummy $ac_prog; ac_word=$2
9675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9676$as_echo_n "checking for $ac_word... " >&6; }
9677if ${ac_cv_path_PRINTF+:} false; then :
9678  $as_echo_n "(cached) " >&6
9679else
9680  case $PRINTF in
9681  [\\/]* | ?:[\\/]*)
9682  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9683  ;;
9684  *)
9685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9686for as_dir in $PATH
9687do
9688  IFS=$as_save_IFS
9689  test -z "$as_dir" && as_dir=.
9690    for ac_exec_ext in '' $ac_executable_extensions; do
9691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9692    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9694    break 2
9695  fi
9696done
9697  done
9698IFS=$as_save_IFS
9699
9700  ;;
9701esac
9702fi
9703PRINTF=$ac_cv_path_PRINTF
9704if test -n "$PRINTF"; then
9705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9706$as_echo "$PRINTF" >&6; }
9707else
9708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9709$as_echo "no" >&6; }
9710fi
9711
9712
9713  test -n "$PRINTF" && break
9714done
9715
9716    else
9717      # If it succeeded, then it was overridden by the user. We will use it
9718      # for the tool.
9719
9720      # First remove it from the list of overridden variables, so we can test
9721      # for unknown variables in the end.
9722      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9723
9724      # Check if we try to supply an empty value
9725      if test "x$PRINTF" = x; then
9726        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9727$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9728        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9729$as_echo_n "checking for PRINTF... " >&6; }
9730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9731$as_echo "disabled" >&6; }
9732      else
9733        # Check if the provided tool contains a complete path.
9734        tool_specified="$PRINTF"
9735        tool_basename="${tool_specified##*/}"
9736        if test "x$tool_basename" = "x$tool_specified"; then
9737          # A command without a complete path is provided, search $PATH.
9738          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9739$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9740          # Extract the first word of "$tool_basename", so it can be a program name with args.
9741set dummy $tool_basename; ac_word=$2
9742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9743$as_echo_n "checking for $ac_word... " >&6; }
9744if ${ac_cv_path_PRINTF+:} false; then :
9745  $as_echo_n "(cached) " >&6
9746else
9747  case $PRINTF in
9748  [\\/]* | ?:[\\/]*)
9749  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9750  ;;
9751  *)
9752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9753for as_dir in $PATH
9754do
9755  IFS=$as_save_IFS
9756  test -z "$as_dir" && as_dir=.
9757    for ac_exec_ext in '' $ac_executable_extensions; do
9758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9759    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9761    break 2
9762  fi
9763done
9764  done
9765IFS=$as_save_IFS
9766
9767  ;;
9768esac
9769fi
9770PRINTF=$ac_cv_path_PRINTF
9771if test -n "$PRINTF"; then
9772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9773$as_echo "$PRINTF" >&6; }
9774else
9775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9776$as_echo "no" >&6; }
9777fi
9778
9779
9780          if test "x$PRINTF" = x; then
9781            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9782          fi
9783        else
9784          # Otherwise we believe it is a complete path. Use it as it is.
9785          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9786$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9787          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9788$as_echo_n "checking for PRINTF... " >&6; }
9789          if test ! -x "$tool_specified"; then
9790            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9791$as_echo "not found" >&6; }
9792            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9793          fi
9794          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9795$as_echo "$tool_specified" >&6; }
9796        fi
9797      fi
9798    fi
9799
9800  fi
9801
9802
9803
9804  if test "x$PRINTF" = x; then
9805    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9806  fi
9807
9808
9809
9810
9811
9812  # Publish this variable in the help.
9813
9814
9815  if [ -z "${RM+x}" ]; then
9816    # The variable is not set by user, try to locate tool using the code snippet
9817    for ac_prog in rm
9818do
9819  # Extract the first word of "$ac_prog", so it can be a program name with args.
9820set dummy $ac_prog; ac_word=$2
9821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9822$as_echo_n "checking for $ac_word... " >&6; }
9823if ${ac_cv_path_RM+:} false; then :
9824  $as_echo_n "(cached) " >&6
9825else
9826  case $RM in
9827  [\\/]* | ?:[\\/]*)
9828  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9829  ;;
9830  *)
9831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9832for as_dir in $PATH
9833do
9834  IFS=$as_save_IFS
9835  test -z "$as_dir" && as_dir=.
9836    for ac_exec_ext in '' $ac_executable_extensions; do
9837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9838    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9840    break 2
9841  fi
9842done
9843  done
9844IFS=$as_save_IFS
9845
9846  ;;
9847esac
9848fi
9849RM=$ac_cv_path_RM
9850if test -n "$RM"; then
9851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9852$as_echo "$RM" >&6; }
9853else
9854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9855$as_echo "no" >&6; }
9856fi
9857
9858
9859  test -n "$RM" && break
9860done
9861
9862  else
9863    # The variable is set, but is it from the command line or the environment?
9864
9865    # Try to remove the string !RM! from our list.
9866    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9867    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9868      # If it failed, the variable was not from the command line. Ignore it,
9869      # but warn the user (except for BASH, which is always set by the calling BASH).
9870      if test "xRM" != xBASH; then
9871        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9872$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9873      fi
9874      # Try to locate tool using the code snippet
9875      for ac_prog in rm
9876do
9877  # Extract the first word of "$ac_prog", so it can be a program name with args.
9878set dummy $ac_prog; ac_word=$2
9879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9880$as_echo_n "checking for $ac_word... " >&6; }
9881if ${ac_cv_path_RM+:} false; then :
9882  $as_echo_n "(cached) " >&6
9883else
9884  case $RM in
9885  [\\/]* | ?:[\\/]*)
9886  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9887  ;;
9888  *)
9889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9890for as_dir in $PATH
9891do
9892  IFS=$as_save_IFS
9893  test -z "$as_dir" && as_dir=.
9894    for ac_exec_ext in '' $ac_executable_extensions; do
9895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9896    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9898    break 2
9899  fi
9900done
9901  done
9902IFS=$as_save_IFS
9903
9904  ;;
9905esac
9906fi
9907RM=$ac_cv_path_RM
9908if test -n "$RM"; then
9909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9910$as_echo "$RM" >&6; }
9911else
9912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9913$as_echo "no" >&6; }
9914fi
9915
9916
9917  test -n "$RM" && break
9918done
9919
9920    else
9921      # If it succeeded, then it was overridden by the user. We will use it
9922      # for the tool.
9923
9924      # First remove it from the list of overridden variables, so we can test
9925      # for unknown variables in the end.
9926      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9927
9928      # Check if we try to supply an empty value
9929      if test "x$RM" = x; then
9930        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9931$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9932        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9933$as_echo_n "checking for RM... " >&6; }
9934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9935$as_echo "disabled" >&6; }
9936      else
9937        # Check if the provided tool contains a complete path.
9938        tool_specified="$RM"
9939        tool_basename="${tool_specified##*/}"
9940        if test "x$tool_basename" = "x$tool_specified"; then
9941          # A command without a complete path is provided, search $PATH.
9942          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9943$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9944          # Extract the first word of "$tool_basename", so it can be a program name with args.
9945set dummy $tool_basename; ac_word=$2
9946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9947$as_echo_n "checking for $ac_word... " >&6; }
9948if ${ac_cv_path_RM+:} false; then :
9949  $as_echo_n "(cached) " >&6
9950else
9951  case $RM in
9952  [\\/]* | ?:[\\/]*)
9953  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9954  ;;
9955  *)
9956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9957for as_dir in $PATH
9958do
9959  IFS=$as_save_IFS
9960  test -z "$as_dir" && as_dir=.
9961    for ac_exec_ext in '' $ac_executable_extensions; do
9962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9963    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9965    break 2
9966  fi
9967done
9968  done
9969IFS=$as_save_IFS
9970
9971  ;;
9972esac
9973fi
9974RM=$ac_cv_path_RM
9975if test -n "$RM"; then
9976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9977$as_echo "$RM" >&6; }
9978else
9979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9980$as_echo "no" >&6; }
9981fi
9982
9983
9984          if test "x$RM" = x; then
9985            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9986          fi
9987        else
9988          # Otherwise we believe it is a complete path. Use it as it is.
9989          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9990$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9991          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9992$as_echo_n "checking for RM... " >&6; }
9993          if test ! -x "$tool_specified"; then
9994            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9995$as_echo "not found" >&6; }
9996            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9997          fi
9998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9999$as_echo "$tool_specified" >&6; }
10000        fi
10001      fi
10002    fi
10003
10004  fi
10005
10006
10007
10008  if test "x$RM" = x; then
10009    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10010  fi
10011
10012
10013
10014
10015
10016  # Publish this variable in the help.
10017
10018
10019  if [ -z "${RMDIR+x}" ]; then
10020    # The variable is not set by user, try to locate tool using the code snippet
10021    for ac_prog in rmdir
10022do
10023  # Extract the first word of "$ac_prog", so it can be a program name with args.
10024set dummy $ac_prog; ac_word=$2
10025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10026$as_echo_n "checking for $ac_word... " >&6; }
10027if ${ac_cv_path_RMDIR+:} false; then :
10028  $as_echo_n "(cached) " >&6
10029else
10030  case $RMDIR in
10031  [\\/]* | ?:[\\/]*)
10032  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10033  ;;
10034  *)
10035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10036for as_dir in $PATH
10037do
10038  IFS=$as_save_IFS
10039  test -z "$as_dir" && as_dir=.
10040    for ac_exec_ext in '' $ac_executable_extensions; do
10041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10042    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10044    break 2
10045  fi
10046done
10047  done
10048IFS=$as_save_IFS
10049
10050  ;;
10051esac
10052fi
10053RMDIR=$ac_cv_path_RMDIR
10054if test -n "$RMDIR"; then
10055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10056$as_echo "$RMDIR" >&6; }
10057else
10058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10059$as_echo "no" >&6; }
10060fi
10061
10062
10063  test -n "$RMDIR" && break
10064done
10065
10066  else
10067    # The variable is set, but is it from the command line or the environment?
10068
10069    # Try to remove the string !RMDIR! from our list.
10070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10072      # If it failed, the variable was not from the command line. Ignore it,
10073      # but warn the user (except for BASH, which is always set by the calling BASH).
10074      if test "xRMDIR" != xBASH; then
10075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10076$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10077      fi
10078      # Try to locate tool using the code snippet
10079      for ac_prog in rmdir
10080do
10081  # Extract the first word of "$ac_prog", so it can be a program name with args.
10082set dummy $ac_prog; ac_word=$2
10083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10084$as_echo_n "checking for $ac_word... " >&6; }
10085if ${ac_cv_path_RMDIR+:} false; then :
10086  $as_echo_n "(cached) " >&6
10087else
10088  case $RMDIR in
10089  [\\/]* | ?:[\\/]*)
10090  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10091  ;;
10092  *)
10093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10094for as_dir in $PATH
10095do
10096  IFS=$as_save_IFS
10097  test -z "$as_dir" && as_dir=.
10098    for ac_exec_ext in '' $ac_executable_extensions; do
10099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10100    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10102    break 2
10103  fi
10104done
10105  done
10106IFS=$as_save_IFS
10107
10108  ;;
10109esac
10110fi
10111RMDIR=$ac_cv_path_RMDIR
10112if test -n "$RMDIR"; then
10113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10114$as_echo "$RMDIR" >&6; }
10115else
10116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10117$as_echo "no" >&6; }
10118fi
10119
10120
10121  test -n "$RMDIR" && break
10122done
10123
10124    else
10125      # If it succeeded, then it was overridden by the user. We will use it
10126      # for the tool.
10127
10128      # First remove it from the list of overridden variables, so we can test
10129      # for unknown variables in the end.
10130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10131
10132      # Check if we try to supply an empty value
10133      if test "x$RMDIR" = x; then
10134        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10135$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10136        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10137$as_echo_n "checking for RMDIR... " >&6; }
10138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10139$as_echo "disabled" >&6; }
10140      else
10141        # Check if the provided tool contains a complete path.
10142        tool_specified="$RMDIR"
10143        tool_basename="${tool_specified##*/}"
10144        if test "x$tool_basename" = "x$tool_specified"; then
10145          # A command without a complete path is provided, search $PATH.
10146          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10147$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10148          # Extract the first word of "$tool_basename", so it can be a program name with args.
10149set dummy $tool_basename; ac_word=$2
10150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10151$as_echo_n "checking for $ac_word... " >&6; }
10152if ${ac_cv_path_RMDIR+:} false; then :
10153  $as_echo_n "(cached) " >&6
10154else
10155  case $RMDIR in
10156  [\\/]* | ?:[\\/]*)
10157  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10158  ;;
10159  *)
10160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10161for as_dir in $PATH
10162do
10163  IFS=$as_save_IFS
10164  test -z "$as_dir" && as_dir=.
10165    for ac_exec_ext in '' $ac_executable_extensions; do
10166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10167    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10169    break 2
10170  fi
10171done
10172  done
10173IFS=$as_save_IFS
10174
10175  ;;
10176esac
10177fi
10178RMDIR=$ac_cv_path_RMDIR
10179if test -n "$RMDIR"; then
10180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10181$as_echo "$RMDIR" >&6; }
10182else
10183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10184$as_echo "no" >&6; }
10185fi
10186
10187
10188          if test "x$RMDIR" = x; then
10189            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10190          fi
10191        else
10192          # Otherwise we believe it is a complete path. Use it as it is.
10193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10194$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10195          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10196$as_echo_n "checking for RMDIR... " >&6; }
10197          if test ! -x "$tool_specified"; then
10198            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10199$as_echo "not found" >&6; }
10200            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10201          fi
10202          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10203$as_echo "$tool_specified" >&6; }
10204        fi
10205      fi
10206    fi
10207
10208  fi
10209
10210
10211
10212  if test "x$RMDIR" = x; then
10213    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10214  fi
10215
10216
10217
10218
10219
10220  # Publish this variable in the help.
10221
10222
10223  if [ -z "${SH+x}" ]; then
10224    # The variable is not set by user, try to locate tool using the code snippet
10225    for ac_prog in sh
10226do
10227  # Extract the first word of "$ac_prog", so it can be a program name with args.
10228set dummy $ac_prog; ac_word=$2
10229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10230$as_echo_n "checking for $ac_word... " >&6; }
10231if ${ac_cv_path_SH+:} false; then :
10232  $as_echo_n "(cached) " >&6
10233else
10234  case $SH in
10235  [\\/]* | ?:[\\/]*)
10236  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10237  ;;
10238  *)
10239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10240for as_dir in $PATH
10241do
10242  IFS=$as_save_IFS
10243  test -z "$as_dir" && as_dir=.
10244    for ac_exec_ext in '' $ac_executable_extensions; do
10245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10246    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10248    break 2
10249  fi
10250done
10251  done
10252IFS=$as_save_IFS
10253
10254  ;;
10255esac
10256fi
10257SH=$ac_cv_path_SH
10258if test -n "$SH"; then
10259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10260$as_echo "$SH" >&6; }
10261else
10262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10263$as_echo "no" >&6; }
10264fi
10265
10266
10267  test -n "$SH" && break
10268done
10269
10270  else
10271    # The variable is set, but is it from the command line or the environment?
10272
10273    # Try to remove the string !SH! from our list.
10274    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10275    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10276      # If it failed, the variable was not from the command line. Ignore it,
10277      # but warn the user (except for BASH, which is always set by the calling BASH).
10278      if test "xSH" != xBASH; then
10279        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10280$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10281      fi
10282      # Try to locate tool using the code snippet
10283      for ac_prog in sh
10284do
10285  # Extract the first word of "$ac_prog", so it can be a program name with args.
10286set dummy $ac_prog; ac_word=$2
10287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10288$as_echo_n "checking for $ac_word... " >&6; }
10289if ${ac_cv_path_SH+:} false; then :
10290  $as_echo_n "(cached) " >&6
10291else
10292  case $SH in
10293  [\\/]* | ?:[\\/]*)
10294  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10295  ;;
10296  *)
10297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10298for as_dir in $PATH
10299do
10300  IFS=$as_save_IFS
10301  test -z "$as_dir" && as_dir=.
10302    for ac_exec_ext in '' $ac_executable_extensions; do
10303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10304    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10306    break 2
10307  fi
10308done
10309  done
10310IFS=$as_save_IFS
10311
10312  ;;
10313esac
10314fi
10315SH=$ac_cv_path_SH
10316if test -n "$SH"; then
10317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10318$as_echo "$SH" >&6; }
10319else
10320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10321$as_echo "no" >&6; }
10322fi
10323
10324
10325  test -n "$SH" && break
10326done
10327
10328    else
10329      # If it succeeded, then it was overridden by the user. We will use it
10330      # for the tool.
10331
10332      # First remove it from the list of overridden variables, so we can test
10333      # for unknown variables in the end.
10334      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10335
10336      # Check if we try to supply an empty value
10337      if test "x$SH" = x; then
10338        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10339$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10340        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10341$as_echo_n "checking for SH... " >&6; }
10342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10343$as_echo "disabled" >&6; }
10344      else
10345        # Check if the provided tool contains a complete path.
10346        tool_specified="$SH"
10347        tool_basename="${tool_specified##*/}"
10348        if test "x$tool_basename" = "x$tool_specified"; then
10349          # A command without a complete path is provided, search $PATH.
10350          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10351$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10352          # Extract the first word of "$tool_basename", so it can be a program name with args.
10353set dummy $tool_basename; ac_word=$2
10354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10355$as_echo_n "checking for $ac_word... " >&6; }
10356if ${ac_cv_path_SH+:} false; then :
10357  $as_echo_n "(cached) " >&6
10358else
10359  case $SH in
10360  [\\/]* | ?:[\\/]*)
10361  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10362  ;;
10363  *)
10364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10365for as_dir in $PATH
10366do
10367  IFS=$as_save_IFS
10368  test -z "$as_dir" && as_dir=.
10369    for ac_exec_ext in '' $ac_executable_extensions; do
10370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10371    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10373    break 2
10374  fi
10375done
10376  done
10377IFS=$as_save_IFS
10378
10379  ;;
10380esac
10381fi
10382SH=$ac_cv_path_SH
10383if test -n "$SH"; then
10384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10385$as_echo "$SH" >&6; }
10386else
10387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10388$as_echo "no" >&6; }
10389fi
10390
10391
10392          if test "x$SH" = x; then
10393            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10394          fi
10395        else
10396          # Otherwise we believe it is a complete path. Use it as it is.
10397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10398$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10399          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10400$as_echo_n "checking for SH... " >&6; }
10401          if test ! -x "$tool_specified"; then
10402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10403$as_echo "not found" >&6; }
10404            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10405          fi
10406          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10407$as_echo "$tool_specified" >&6; }
10408        fi
10409      fi
10410    fi
10411
10412  fi
10413
10414
10415
10416  if test "x$SH" = x; then
10417    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10418  fi
10419
10420
10421
10422
10423
10424  # Publish this variable in the help.
10425
10426
10427  if [ -z "${SORT+x}" ]; then
10428    # The variable is not set by user, try to locate tool using the code snippet
10429    for ac_prog in sort
10430do
10431  # Extract the first word of "$ac_prog", so it can be a program name with args.
10432set dummy $ac_prog; ac_word=$2
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10434$as_echo_n "checking for $ac_word... " >&6; }
10435if ${ac_cv_path_SORT+:} false; then :
10436  $as_echo_n "(cached) " >&6
10437else
10438  case $SORT in
10439  [\\/]* | ?:[\\/]*)
10440  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10441  ;;
10442  *)
10443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10444for as_dir in $PATH
10445do
10446  IFS=$as_save_IFS
10447  test -z "$as_dir" && as_dir=.
10448    for ac_exec_ext in '' $ac_executable_extensions; do
10449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10450    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10452    break 2
10453  fi
10454done
10455  done
10456IFS=$as_save_IFS
10457
10458  ;;
10459esac
10460fi
10461SORT=$ac_cv_path_SORT
10462if test -n "$SORT"; then
10463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10464$as_echo "$SORT" >&6; }
10465else
10466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10467$as_echo "no" >&6; }
10468fi
10469
10470
10471  test -n "$SORT" && break
10472done
10473
10474  else
10475    # The variable is set, but is it from the command line or the environment?
10476
10477    # Try to remove the string !SORT! from our list.
10478    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10479    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10480      # If it failed, the variable was not from the command line. Ignore it,
10481      # but warn the user (except for BASH, which is always set by the calling BASH).
10482      if test "xSORT" != xBASH; then
10483        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10484$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10485      fi
10486      # Try to locate tool using the code snippet
10487      for ac_prog in sort
10488do
10489  # Extract the first word of "$ac_prog", so it can be a program name with args.
10490set dummy $ac_prog; ac_word=$2
10491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10492$as_echo_n "checking for $ac_word... " >&6; }
10493if ${ac_cv_path_SORT+:} false; then :
10494  $as_echo_n "(cached) " >&6
10495else
10496  case $SORT in
10497  [\\/]* | ?:[\\/]*)
10498  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10499  ;;
10500  *)
10501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10502for as_dir in $PATH
10503do
10504  IFS=$as_save_IFS
10505  test -z "$as_dir" && as_dir=.
10506    for ac_exec_ext in '' $ac_executable_extensions; do
10507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10508    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10510    break 2
10511  fi
10512done
10513  done
10514IFS=$as_save_IFS
10515
10516  ;;
10517esac
10518fi
10519SORT=$ac_cv_path_SORT
10520if test -n "$SORT"; then
10521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10522$as_echo "$SORT" >&6; }
10523else
10524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525$as_echo "no" >&6; }
10526fi
10527
10528
10529  test -n "$SORT" && break
10530done
10531
10532    else
10533      # If it succeeded, then it was overridden by the user. We will use it
10534      # for the tool.
10535
10536      # First remove it from the list of overridden variables, so we can test
10537      # for unknown variables in the end.
10538      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10539
10540      # Check if we try to supply an empty value
10541      if test "x$SORT" = x; then
10542        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10543$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10544        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10545$as_echo_n "checking for SORT... " >&6; }
10546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10547$as_echo "disabled" >&6; }
10548      else
10549        # Check if the provided tool contains a complete path.
10550        tool_specified="$SORT"
10551        tool_basename="${tool_specified##*/}"
10552        if test "x$tool_basename" = "x$tool_specified"; then
10553          # A command without a complete path is provided, search $PATH.
10554          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10555$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10556          # Extract the first word of "$tool_basename", so it can be a program name with args.
10557set dummy $tool_basename; ac_word=$2
10558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10559$as_echo_n "checking for $ac_word... " >&6; }
10560if ${ac_cv_path_SORT+:} false; then :
10561  $as_echo_n "(cached) " >&6
10562else
10563  case $SORT in
10564  [\\/]* | ?:[\\/]*)
10565  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10566  ;;
10567  *)
10568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10569for as_dir in $PATH
10570do
10571  IFS=$as_save_IFS
10572  test -z "$as_dir" && as_dir=.
10573    for ac_exec_ext in '' $ac_executable_extensions; do
10574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10575    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10577    break 2
10578  fi
10579done
10580  done
10581IFS=$as_save_IFS
10582
10583  ;;
10584esac
10585fi
10586SORT=$ac_cv_path_SORT
10587if test -n "$SORT"; then
10588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10589$as_echo "$SORT" >&6; }
10590else
10591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10592$as_echo "no" >&6; }
10593fi
10594
10595
10596          if test "x$SORT" = x; then
10597            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10598          fi
10599        else
10600          # Otherwise we believe it is a complete path. Use it as it is.
10601          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10602$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10603          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10604$as_echo_n "checking for SORT... " >&6; }
10605          if test ! -x "$tool_specified"; then
10606            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10607$as_echo "not found" >&6; }
10608            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10609          fi
10610          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10611$as_echo "$tool_specified" >&6; }
10612        fi
10613      fi
10614    fi
10615
10616  fi
10617
10618
10619
10620  if test "x$SORT" = x; then
10621    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10622  fi
10623
10624
10625
10626
10627
10628  # Publish this variable in the help.
10629
10630
10631  if [ -z "${TAIL+x}" ]; then
10632    # The variable is not set by user, try to locate tool using the code snippet
10633    for ac_prog in tail
10634do
10635  # Extract the first word of "$ac_prog", so it can be a program name with args.
10636set dummy $ac_prog; ac_word=$2
10637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10638$as_echo_n "checking for $ac_word... " >&6; }
10639if ${ac_cv_path_TAIL+:} false; then :
10640  $as_echo_n "(cached) " >&6
10641else
10642  case $TAIL in
10643  [\\/]* | ?:[\\/]*)
10644  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10645  ;;
10646  *)
10647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10648for as_dir in $PATH
10649do
10650  IFS=$as_save_IFS
10651  test -z "$as_dir" && as_dir=.
10652    for ac_exec_ext in '' $ac_executable_extensions; do
10653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10654    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10656    break 2
10657  fi
10658done
10659  done
10660IFS=$as_save_IFS
10661
10662  ;;
10663esac
10664fi
10665TAIL=$ac_cv_path_TAIL
10666if test -n "$TAIL"; then
10667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10668$as_echo "$TAIL" >&6; }
10669else
10670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10671$as_echo "no" >&6; }
10672fi
10673
10674
10675  test -n "$TAIL" && break
10676done
10677
10678  else
10679    # The variable is set, but is it from the command line or the environment?
10680
10681    # Try to remove the string !TAIL! from our list.
10682    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10683    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10684      # If it failed, the variable was not from the command line. Ignore it,
10685      # but warn the user (except for BASH, which is always set by the calling BASH).
10686      if test "xTAIL" != xBASH; then
10687        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10688$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10689      fi
10690      # Try to locate tool using the code snippet
10691      for ac_prog in tail
10692do
10693  # Extract the first word of "$ac_prog", so it can be a program name with args.
10694set dummy $ac_prog; ac_word=$2
10695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10696$as_echo_n "checking for $ac_word... " >&6; }
10697if ${ac_cv_path_TAIL+:} false; then :
10698  $as_echo_n "(cached) " >&6
10699else
10700  case $TAIL in
10701  [\\/]* | ?:[\\/]*)
10702  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10703  ;;
10704  *)
10705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10706for as_dir in $PATH
10707do
10708  IFS=$as_save_IFS
10709  test -z "$as_dir" && as_dir=.
10710    for ac_exec_ext in '' $ac_executable_extensions; do
10711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10712    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10714    break 2
10715  fi
10716done
10717  done
10718IFS=$as_save_IFS
10719
10720  ;;
10721esac
10722fi
10723TAIL=$ac_cv_path_TAIL
10724if test -n "$TAIL"; then
10725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10726$as_echo "$TAIL" >&6; }
10727else
10728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10729$as_echo "no" >&6; }
10730fi
10731
10732
10733  test -n "$TAIL" && break
10734done
10735
10736    else
10737      # If it succeeded, then it was overridden by the user. We will use it
10738      # for the tool.
10739
10740      # First remove it from the list of overridden variables, so we can test
10741      # for unknown variables in the end.
10742      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10743
10744      # Check if we try to supply an empty value
10745      if test "x$TAIL" = x; then
10746        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10747$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10749$as_echo_n "checking for TAIL... " >&6; }
10750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10751$as_echo "disabled" >&6; }
10752      else
10753        # Check if the provided tool contains a complete path.
10754        tool_specified="$TAIL"
10755        tool_basename="${tool_specified##*/}"
10756        if test "x$tool_basename" = "x$tool_specified"; then
10757          # A command without a complete path is provided, search $PATH.
10758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10759$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10760          # Extract the first word of "$tool_basename", so it can be a program name with args.
10761set dummy $tool_basename; ac_word=$2
10762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10763$as_echo_n "checking for $ac_word... " >&6; }
10764if ${ac_cv_path_TAIL+:} false; then :
10765  $as_echo_n "(cached) " >&6
10766else
10767  case $TAIL in
10768  [\\/]* | ?:[\\/]*)
10769  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10770  ;;
10771  *)
10772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10773for as_dir in $PATH
10774do
10775  IFS=$as_save_IFS
10776  test -z "$as_dir" && as_dir=.
10777    for ac_exec_ext in '' $ac_executable_extensions; do
10778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10779    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10781    break 2
10782  fi
10783done
10784  done
10785IFS=$as_save_IFS
10786
10787  ;;
10788esac
10789fi
10790TAIL=$ac_cv_path_TAIL
10791if test -n "$TAIL"; then
10792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10793$as_echo "$TAIL" >&6; }
10794else
10795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10796$as_echo "no" >&6; }
10797fi
10798
10799
10800          if test "x$TAIL" = x; then
10801            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10802          fi
10803        else
10804          # Otherwise we believe it is a complete path. Use it as it is.
10805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10806$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10807          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10808$as_echo_n "checking for TAIL... " >&6; }
10809          if test ! -x "$tool_specified"; then
10810            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10811$as_echo "not found" >&6; }
10812            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10813          fi
10814          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10815$as_echo "$tool_specified" >&6; }
10816        fi
10817      fi
10818    fi
10819
10820  fi
10821
10822
10823
10824  if test "x$TAIL" = x; then
10825    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10826  fi
10827
10828
10829
10830
10831
10832  # Publish this variable in the help.
10833
10834
10835  if [ -z "${TAR+x}" ]; then
10836    # The variable is not set by user, try to locate tool using the code snippet
10837    for ac_prog in tar
10838do
10839  # Extract the first word of "$ac_prog", so it can be a program name with args.
10840set dummy $ac_prog; ac_word=$2
10841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10842$as_echo_n "checking for $ac_word... " >&6; }
10843if ${ac_cv_path_TAR+:} false; then :
10844  $as_echo_n "(cached) " >&6
10845else
10846  case $TAR in
10847  [\\/]* | ?:[\\/]*)
10848  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10849  ;;
10850  *)
10851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10852for as_dir in $PATH
10853do
10854  IFS=$as_save_IFS
10855  test -z "$as_dir" && as_dir=.
10856    for ac_exec_ext in '' $ac_executable_extensions; do
10857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10858    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10860    break 2
10861  fi
10862done
10863  done
10864IFS=$as_save_IFS
10865
10866  ;;
10867esac
10868fi
10869TAR=$ac_cv_path_TAR
10870if test -n "$TAR"; then
10871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10872$as_echo "$TAR" >&6; }
10873else
10874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10875$as_echo "no" >&6; }
10876fi
10877
10878
10879  test -n "$TAR" && break
10880done
10881
10882  else
10883    # The variable is set, but is it from the command line or the environment?
10884
10885    # Try to remove the string !TAR! from our list.
10886    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10887    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10888      # If it failed, the variable was not from the command line. Ignore it,
10889      # but warn the user (except for BASH, which is always set by the calling BASH).
10890      if test "xTAR" != xBASH; then
10891        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10892$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10893      fi
10894      # Try to locate tool using the code snippet
10895      for ac_prog in tar
10896do
10897  # Extract the first word of "$ac_prog", so it can be a program name with args.
10898set dummy $ac_prog; ac_word=$2
10899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10900$as_echo_n "checking for $ac_word... " >&6; }
10901if ${ac_cv_path_TAR+:} false; then :
10902  $as_echo_n "(cached) " >&6
10903else
10904  case $TAR in
10905  [\\/]* | ?:[\\/]*)
10906  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10907  ;;
10908  *)
10909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10910for as_dir in $PATH
10911do
10912  IFS=$as_save_IFS
10913  test -z "$as_dir" && as_dir=.
10914    for ac_exec_ext in '' $ac_executable_extensions; do
10915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10916    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10918    break 2
10919  fi
10920done
10921  done
10922IFS=$as_save_IFS
10923
10924  ;;
10925esac
10926fi
10927TAR=$ac_cv_path_TAR
10928if test -n "$TAR"; then
10929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10930$as_echo "$TAR" >&6; }
10931else
10932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10933$as_echo "no" >&6; }
10934fi
10935
10936
10937  test -n "$TAR" && break
10938done
10939
10940    else
10941      # If it succeeded, then it was overridden by the user. We will use it
10942      # for the tool.
10943
10944      # First remove it from the list of overridden variables, so we can test
10945      # for unknown variables in the end.
10946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10947
10948      # Check if we try to supply an empty value
10949      if test "x$TAR" = x; then
10950        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10951$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10952        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10953$as_echo_n "checking for TAR... " >&6; }
10954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10955$as_echo "disabled" >&6; }
10956      else
10957        # Check if the provided tool contains a complete path.
10958        tool_specified="$TAR"
10959        tool_basename="${tool_specified##*/}"
10960        if test "x$tool_basename" = "x$tool_specified"; then
10961          # A command without a complete path is provided, search $PATH.
10962          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10963$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10964          # Extract the first word of "$tool_basename", so it can be a program name with args.
10965set dummy $tool_basename; ac_word=$2
10966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10967$as_echo_n "checking for $ac_word... " >&6; }
10968if ${ac_cv_path_TAR+:} false; then :
10969  $as_echo_n "(cached) " >&6
10970else
10971  case $TAR in
10972  [\\/]* | ?:[\\/]*)
10973  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10974  ;;
10975  *)
10976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10977for as_dir in $PATH
10978do
10979  IFS=$as_save_IFS
10980  test -z "$as_dir" && as_dir=.
10981    for ac_exec_ext in '' $ac_executable_extensions; do
10982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10983    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10985    break 2
10986  fi
10987done
10988  done
10989IFS=$as_save_IFS
10990
10991  ;;
10992esac
10993fi
10994TAR=$ac_cv_path_TAR
10995if test -n "$TAR"; then
10996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10997$as_echo "$TAR" >&6; }
10998else
10999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11000$as_echo "no" >&6; }
11001fi
11002
11003
11004          if test "x$TAR" = x; then
11005            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11006          fi
11007        else
11008          # Otherwise we believe it is a complete path. Use it as it is.
11009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11010$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11011          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11012$as_echo_n "checking for TAR... " >&6; }
11013          if test ! -x "$tool_specified"; then
11014            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11015$as_echo "not found" >&6; }
11016            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11017          fi
11018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11019$as_echo "$tool_specified" >&6; }
11020        fi
11021      fi
11022    fi
11023
11024  fi
11025
11026
11027
11028  if test "x$TAR" = x; then
11029    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11030  fi
11031
11032
11033
11034
11035
11036  # Publish this variable in the help.
11037
11038
11039  if [ -z "${TEE+x}" ]; then
11040    # The variable is not set by user, try to locate tool using the code snippet
11041    for ac_prog in tee
11042do
11043  # Extract the first word of "$ac_prog", so it can be a program name with args.
11044set dummy $ac_prog; ac_word=$2
11045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11046$as_echo_n "checking for $ac_word... " >&6; }
11047if ${ac_cv_path_TEE+:} false; then :
11048  $as_echo_n "(cached) " >&6
11049else
11050  case $TEE in
11051  [\\/]* | ?:[\\/]*)
11052  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11053  ;;
11054  *)
11055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11056for as_dir in $PATH
11057do
11058  IFS=$as_save_IFS
11059  test -z "$as_dir" && as_dir=.
11060    for ac_exec_ext in '' $ac_executable_extensions; do
11061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11062    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11064    break 2
11065  fi
11066done
11067  done
11068IFS=$as_save_IFS
11069
11070  ;;
11071esac
11072fi
11073TEE=$ac_cv_path_TEE
11074if test -n "$TEE"; then
11075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11076$as_echo "$TEE" >&6; }
11077else
11078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11079$as_echo "no" >&6; }
11080fi
11081
11082
11083  test -n "$TEE" && break
11084done
11085
11086  else
11087    # The variable is set, but is it from the command line or the environment?
11088
11089    # Try to remove the string !TEE! from our list.
11090    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11091    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11092      # If it failed, the variable was not from the command line. Ignore it,
11093      # but warn the user (except for BASH, which is always set by the calling BASH).
11094      if test "xTEE" != xBASH; then
11095        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11096$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11097      fi
11098      # Try to locate tool using the code snippet
11099      for ac_prog in tee
11100do
11101  # Extract the first word of "$ac_prog", so it can be a program name with args.
11102set dummy $ac_prog; ac_word=$2
11103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11104$as_echo_n "checking for $ac_word... " >&6; }
11105if ${ac_cv_path_TEE+:} false; then :
11106  $as_echo_n "(cached) " >&6
11107else
11108  case $TEE in
11109  [\\/]* | ?:[\\/]*)
11110  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11111  ;;
11112  *)
11113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11114for as_dir in $PATH
11115do
11116  IFS=$as_save_IFS
11117  test -z "$as_dir" && as_dir=.
11118    for ac_exec_ext in '' $ac_executable_extensions; do
11119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11120    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11122    break 2
11123  fi
11124done
11125  done
11126IFS=$as_save_IFS
11127
11128  ;;
11129esac
11130fi
11131TEE=$ac_cv_path_TEE
11132if test -n "$TEE"; then
11133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11134$as_echo "$TEE" >&6; }
11135else
11136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11137$as_echo "no" >&6; }
11138fi
11139
11140
11141  test -n "$TEE" && break
11142done
11143
11144    else
11145      # If it succeeded, then it was overridden by the user. We will use it
11146      # for the tool.
11147
11148      # First remove it from the list of overridden variables, so we can test
11149      # for unknown variables in the end.
11150      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11151
11152      # Check if we try to supply an empty value
11153      if test "x$TEE" = x; then
11154        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11155$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11157$as_echo_n "checking for TEE... " >&6; }
11158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11159$as_echo "disabled" >&6; }
11160      else
11161        # Check if the provided tool contains a complete path.
11162        tool_specified="$TEE"
11163        tool_basename="${tool_specified##*/}"
11164        if test "x$tool_basename" = "x$tool_specified"; then
11165          # A command without a complete path is provided, search $PATH.
11166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11167$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11168          # Extract the first word of "$tool_basename", so it can be a program name with args.
11169set dummy $tool_basename; ac_word=$2
11170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11171$as_echo_n "checking for $ac_word... " >&6; }
11172if ${ac_cv_path_TEE+:} false; then :
11173  $as_echo_n "(cached) " >&6
11174else
11175  case $TEE in
11176  [\\/]* | ?:[\\/]*)
11177  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11178  ;;
11179  *)
11180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11181for as_dir in $PATH
11182do
11183  IFS=$as_save_IFS
11184  test -z "$as_dir" && as_dir=.
11185    for ac_exec_ext in '' $ac_executable_extensions; do
11186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11187    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11189    break 2
11190  fi
11191done
11192  done
11193IFS=$as_save_IFS
11194
11195  ;;
11196esac
11197fi
11198TEE=$ac_cv_path_TEE
11199if test -n "$TEE"; then
11200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11201$as_echo "$TEE" >&6; }
11202else
11203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11204$as_echo "no" >&6; }
11205fi
11206
11207
11208          if test "x$TEE" = x; then
11209            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11210          fi
11211        else
11212          # Otherwise we believe it is a complete path. Use it as it is.
11213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11214$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11215          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11216$as_echo_n "checking for TEE... " >&6; }
11217          if test ! -x "$tool_specified"; then
11218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11219$as_echo "not found" >&6; }
11220            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11221          fi
11222          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11223$as_echo "$tool_specified" >&6; }
11224        fi
11225      fi
11226    fi
11227
11228  fi
11229
11230
11231
11232  if test "x$TEE" = x; then
11233    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11234  fi
11235
11236
11237
11238
11239
11240  # Publish this variable in the help.
11241
11242
11243  if [ -z "${TOUCH+x}" ]; then
11244    # The variable is not set by user, try to locate tool using the code snippet
11245    for ac_prog in touch
11246do
11247  # Extract the first word of "$ac_prog", so it can be a program name with args.
11248set dummy $ac_prog; ac_word=$2
11249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11250$as_echo_n "checking for $ac_word... " >&6; }
11251if ${ac_cv_path_TOUCH+:} false; then :
11252  $as_echo_n "(cached) " >&6
11253else
11254  case $TOUCH in
11255  [\\/]* | ?:[\\/]*)
11256  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11257  ;;
11258  *)
11259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11260for as_dir in $PATH
11261do
11262  IFS=$as_save_IFS
11263  test -z "$as_dir" && as_dir=.
11264    for ac_exec_ext in '' $ac_executable_extensions; do
11265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11266    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11268    break 2
11269  fi
11270done
11271  done
11272IFS=$as_save_IFS
11273
11274  ;;
11275esac
11276fi
11277TOUCH=$ac_cv_path_TOUCH
11278if test -n "$TOUCH"; then
11279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11280$as_echo "$TOUCH" >&6; }
11281else
11282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11283$as_echo "no" >&6; }
11284fi
11285
11286
11287  test -n "$TOUCH" && break
11288done
11289
11290  else
11291    # The variable is set, but is it from the command line or the environment?
11292
11293    # Try to remove the string !TOUCH! from our list.
11294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11296      # If it failed, the variable was not from the command line. Ignore it,
11297      # but warn the user (except for BASH, which is always set by the calling BASH).
11298      if test "xTOUCH" != xBASH; then
11299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11300$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11301      fi
11302      # Try to locate tool using the code snippet
11303      for ac_prog in touch
11304do
11305  # Extract the first word of "$ac_prog", so it can be a program name with args.
11306set dummy $ac_prog; ac_word=$2
11307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11308$as_echo_n "checking for $ac_word... " >&6; }
11309if ${ac_cv_path_TOUCH+:} false; then :
11310  $as_echo_n "(cached) " >&6
11311else
11312  case $TOUCH in
11313  [\\/]* | ?:[\\/]*)
11314  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11315  ;;
11316  *)
11317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11318for as_dir in $PATH
11319do
11320  IFS=$as_save_IFS
11321  test -z "$as_dir" && as_dir=.
11322    for ac_exec_ext in '' $ac_executable_extensions; do
11323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11324    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11326    break 2
11327  fi
11328done
11329  done
11330IFS=$as_save_IFS
11331
11332  ;;
11333esac
11334fi
11335TOUCH=$ac_cv_path_TOUCH
11336if test -n "$TOUCH"; then
11337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11338$as_echo "$TOUCH" >&6; }
11339else
11340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11341$as_echo "no" >&6; }
11342fi
11343
11344
11345  test -n "$TOUCH" && break
11346done
11347
11348    else
11349      # If it succeeded, then it was overridden by the user. We will use it
11350      # for the tool.
11351
11352      # First remove it from the list of overridden variables, so we can test
11353      # for unknown variables in the end.
11354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11355
11356      # Check if we try to supply an empty value
11357      if test "x$TOUCH" = x; then
11358        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11359$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11361$as_echo_n "checking for TOUCH... " >&6; }
11362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11363$as_echo "disabled" >&6; }
11364      else
11365        # Check if the provided tool contains a complete path.
11366        tool_specified="$TOUCH"
11367        tool_basename="${tool_specified##*/}"
11368        if test "x$tool_basename" = "x$tool_specified"; then
11369          # A command without a complete path is provided, search $PATH.
11370          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11371$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11372          # Extract the first word of "$tool_basename", so it can be a program name with args.
11373set dummy $tool_basename; ac_word=$2
11374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11375$as_echo_n "checking for $ac_word... " >&6; }
11376if ${ac_cv_path_TOUCH+:} false; then :
11377  $as_echo_n "(cached) " >&6
11378else
11379  case $TOUCH in
11380  [\\/]* | ?:[\\/]*)
11381  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11382  ;;
11383  *)
11384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11385for as_dir in $PATH
11386do
11387  IFS=$as_save_IFS
11388  test -z "$as_dir" && as_dir=.
11389    for ac_exec_ext in '' $ac_executable_extensions; do
11390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11391    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11393    break 2
11394  fi
11395done
11396  done
11397IFS=$as_save_IFS
11398
11399  ;;
11400esac
11401fi
11402TOUCH=$ac_cv_path_TOUCH
11403if test -n "$TOUCH"; then
11404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11405$as_echo "$TOUCH" >&6; }
11406else
11407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11408$as_echo "no" >&6; }
11409fi
11410
11411
11412          if test "x$TOUCH" = x; then
11413            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11414          fi
11415        else
11416          # Otherwise we believe it is a complete path. Use it as it is.
11417          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11418$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11419          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11420$as_echo_n "checking for TOUCH... " >&6; }
11421          if test ! -x "$tool_specified"; then
11422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11423$as_echo "not found" >&6; }
11424            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11425          fi
11426          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11427$as_echo "$tool_specified" >&6; }
11428        fi
11429      fi
11430    fi
11431
11432  fi
11433
11434
11435
11436  if test "x$TOUCH" = x; then
11437    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11438  fi
11439
11440
11441
11442
11443
11444  # Publish this variable in the help.
11445
11446
11447  if [ -z "${TR+x}" ]; then
11448    # The variable is not set by user, try to locate tool using the code snippet
11449    for ac_prog in tr
11450do
11451  # Extract the first word of "$ac_prog", so it can be a program name with args.
11452set dummy $ac_prog; ac_word=$2
11453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11454$as_echo_n "checking for $ac_word... " >&6; }
11455if ${ac_cv_path_TR+:} false; then :
11456  $as_echo_n "(cached) " >&6
11457else
11458  case $TR in
11459  [\\/]* | ?:[\\/]*)
11460  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11461  ;;
11462  *)
11463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11464for as_dir in $PATH
11465do
11466  IFS=$as_save_IFS
11467  test -z "$as_dir" && as_dir=.
11468    for ac_exec_ext in '' $ac_executable_extensions; do
11469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11470    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11472    break 2
11473  fi
11474done
11475  done
11476IFS=$as_save_IFS
11477
11478  ;;
11479esac
11480fi
11481TR=$ac_cv_path_TR
11482if test -n "$TR"; then
11483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11484$as_echo "$TR" >&6; }
11485else
11486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11487$as_echo "no" >&6; }
11488fi
11489
11490
11491  test -n "$TR" && break
11492done
11493
11494  else
11495    # The variable is set, but is it from the command line or the environment?
11496
11497    # Try to remove the string !TR! from our list.
11498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11500      # If it failed, the variable was not from the command line. Ignore it,
11501      # but warn the user (except for BASH, which is always set by the calling BASH).
11502      if test "xTR" != xBASH; then
11503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11504$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11505      fi
11506      # Try to locate tool using the code snippet
11507      for ac_prog in tr
11508do
11509  # Extract the first word of "$ac_prog", so it can be a program name with args.
11510set dummy $ac_prog; ac_word=$2
11511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11512$as_echo_n "checking for $ac_word... " >&6; }
11513if ${ac_cv_path_TR+:} false; then :
11514  $as_echo_n "(cached) " >&6
11515else
11516  case $TR in
11517  [\\/]* | ?:[\\/]*)
11518  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11519  ;;
11520  *)
11521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11522for as_dir in $PATH
11523do
11524  IFS=$as_save_IFS
11525  test -z "$as_dir" && as_dir=.
11526    for ac_exec_ext in '' $ac_executable_extensions; do
11527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11528    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11530    break 2
11531  fi
11532done
11533  done
11534IFS=$as_save_IFS
11535
11536  ;;
11537esac
11538fi
11539TR=$ac_cv_path_TR
11540if test -n "$TR"; then
11541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11542$as_echo "$TR" >&6; }
11543else
11544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11545$as_echo "no" >&6; }
11546fi
11547
11548
11549  test -n "$TR" && break
11550done
11551
11552    else
11553      # If it succeeded, then it was overridden by the user. We will use it
11554      # for the tool.
11555
11556      # First remove it from the list of overridden variables, so we can test
11557      # for unknown variables in the end.
11558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11559
11560      # Check if we try to supply an empty value
11561      if test "x$TR" = x; then
11562        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11563$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11564        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11565$as_echo_n "checking for TR... " >&6; }
11566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11567$as_echo "disabled" >&6; }
11568      else
11569        # Check if the provided tool contains a complete path.
11570        tool_specified="$TR"
11571        tool_basename="${tool_specified##*/}"
11572        if test "x$tool_basename" = "x$tool_specified"; then
11573          # A command without a complete path is provided, search $PATH.
11574          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11575$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11576          # Extract the first word of "$tool_basename", so it can be a program name with args.
11577set dummy $tool_basename; ac_word=$2
11578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11579$as_echo_n "checking for $ac_word... " >&6; }
11580if ${ac_cv_path_TR+:} false; then :
11581  $as_echo_n "(cached) " >&6
11582else
11583  case $TR in
11584  [\\/]* | ?:[\\/]*)
11585  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11586  ;;
11587  *)
11588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11589for as_dir in $PATH
11590do
11591  IFS=$as_save_IFS
11592  test -z "$as_dir" && as_dir=.
11593    for ac_exec_ext in '' $ac_executable_extensions; do
11594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11595    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11597    break 2
11598  fi
11599done
11600  done
11601IFS=$as_save_IFS
11602
11603  ;;
11604esac
11605fi
11606TR=$ac_cv_path_TR
11607if test -n "$TR"; then
11608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11609$as_echo "$TR" >&6; }
11610else
11611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11612$as_echo "no" >&6; }
11613fi
11614
11615
11616          if test "x$TR" = x; then
11617            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11618          fi
11619        else
11620          # Otherwise we believe it is a complete path. Use it as it is.
11621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11622$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11623          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11624$as_echo_n "checking for TR... " >&6; }
11625          if test ! -x "$tool_specified"; then
11626            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11627$as_echo "not found" >&6; }
11628            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11629          fi
11630          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11631$as_echo "$tool_specified" >&6; }
11632        fi
11633      fi
11634    fi
11635
11636  fi
11637
11638
11639
11640  if test "x$TR" = x; then
11641    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11642  fi
11643
11644
11645
11646
11647
11648  # Publish this variable in the help.
11649
11650
11651  if [ -z "${UNAME+x}" ]; then
11652    # The variable is not set by user, try to locate tool using the code snippet
11653    for ac_prog in uname
11654do
11655  # Extract the first word of "$ac_prog", so it can be a program name with args.
11656set dummy $ac_prog; ac_word=$2
11657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11658$as_echo_n "checking for $ac_word... " >&6; }
11659if ${ac_cv_path_UNAME+:} false; then :
11660  $as_echo_n "(cached) " >&6
11661else
11662  case $UNAME in
11663  [\\/]* | ?:[\\/]*)
11664  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11665  ;;
11666  *)
11667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11668for as_dir in $PATH
11669do
11670  IFS=$as_save_IFS
11671  test -z "$as_dir" && as_dir=.
11672    for ac_exec_ext in '' $ac_executable_extensions; do
11673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11674    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11676    break 2
11677  fi
11678done
11679  done
11680IFS=$as_save_IFS
11681
11682  ;;
11683esac
11684fi
11685UNAME=$ac_cv_path_UNAME
11686if test -n "$UNAME"; then
11687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11688$as_echo "$UNAME" >&6; }
11689else
11690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11691$as_echo "no" >&6; }
11692fi
11693
11694
11695  test -n "$UNAME" && break
11696done
11697
11698  else
11699    # The variable is set, but is it from the command line or the environment?
11700
11701    # Try to remove the string !UNAME! from our list.
11702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11704      # If it failed, the variable was not from the command line. Ignore it,
11705      # but warn the user (except for BASH, which is always set by the calling BASH).
11706      if test "xUNAME" != xBASH; then
11707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11708$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11709      fi
11710      # Try to locate tool using the code snippet
11711      for ac_prog in uname
11712do
11713  # Extract the first word of "$ac_prog", so it can be a program name with args.
11714set dummy $ac_prog; ac_word=$2
11715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11716$as_echo_n "checking for $ac_word... " >&6; }
11717if ${ac_cv_path_UNAME+:} false; then :
11718  $as_echo_n "(cached) " >&6
11719else
11720  case $UNAME in
11721  [\\/]* | ?:[\\/]*)
11722  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11723  ;;
11724  *)
11725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11726for as_dir in $PATH
11727do
11728  IFS=$as_save_IFS
11729  test -z "$as_dir" && as_dir=.
11730    for ac_exec_ext in '' $ac_executable_extensions; do
11731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11732    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11734    break 2
11735  fi
11736done
11737  done
11738IFS=$as_save_IFS
11739
11740  ;;
11741esac
11742fi
11743UNAME=$ac_cv_path_UNAME
11744if test -n "$UNAME"; then
11745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11746$as_echo "$UNAME" >&6; }
11747else
11748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11749$as_echo "no" >&6; }
11750fi
11751
11752
11753  test -n "$UNAME" && break
11754done
11755
11756    else
11757      # If it succeeded, then it was overridden by the user. We will use it
11758      # for the tool.
11759
11760      # First remove it from the list of overridden variables, so we can test
11761      # for unknown variables in the end.
11762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11763
11764      # Check if we try to supply an empty value
11765      if test "x$UNAME" = x; then
11766        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11767$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11769$as_echo_n "checking for UNAME... " >&6; }
11770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11771$as_echo "disabled" >&6; }
11772      else
11773        # Check if the provided tool contains a complete path.
11774        tool_specified="$UNAME"
11775        tool_basename="${tool_specified##*/}"
11776        if test "x$tool_basename" = "x$tool_specified"; then
11777          # A command without a complete path is provided, search $PATH.
11778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11779$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11780          # Extract the first word of "$tool_basename", so it can be a program name with args.
11781set dummy $tool_basename; ac_word=$2
11782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11783$as_echo_n "checking for $ac_word... " >&6; }
11784if ${ac_cv_path_UNAME+:} false; then :
11785  $as_echo_n "(cached) " >&6
11786else
11787  case $UNAME in
11788  [\\/]* | ?:[\\/]*)
11789  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11790  ;;
11791  *)
11792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11793for as_dir in $PATH
11794do
11795  IFS=$as_save_IFS
11796  test -z "$as_dir" && as_dir=.
11797    for ac_exec_ext in '' $ac_executable_extensions; do
11798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11799    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11801    break 2
11802  fi
11803done
11804  done
11805IFS=$as_save_IFS
11806
11807  ;;
11808esac
11809fi
11810UNAME=$ac_cv_path_UNAME
11811if test -n "$UNAME"; then
11812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11813$as_echo "$UNAME" >&6; }
11814else
11815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11816$as_echo "no" >&6; }
11817fi
11818
11819
11820          if test "x$UNAME" = x; then
11821            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11822          fi
11823        else
11824          # Otherwise we believe it is a complete path. Use it as it is.
11825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11826$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11827          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11828$as_echo_n "checking for UNAME... " >&6; }
11829          if test ! -x "$tool_specified"; then
11830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11831$as_echo "not found" >&6; }
11832            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11833          fi
11834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11835$as_echo "$tool_specified" >&6; }
11836        fi
11837      fi
11838    fi
11839
11840  fi
11841
11842
11843
11844  if test "x$UNAME" = x; then
11845    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11846  fi
11847
11848
11849
11850
11851
11852  # Publish this variable in the help.
11853
11854
11855  if [ -z "${UNIQ+x}" ]; then
11856    # The variable is not set by user, try to locate tool using the code snippet
11857    for ac_prog in uniq
11858do
11859  # Extract the first word of "$ac_prog", so it can be a program name with args.
11860set dummy $ac_prog; ac_word=$2
11861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11862$as_echo_n "checking for $ac_word... " >&6; }
11863if ${ac_cv_path_UNIQ+:} false; then :
11864  $as_echo_n "(cached) " >&6
11865else
11866  case $UNIQ in
11867  [\\/]* | ?:[\\/]*)
11868  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11869  ;;
11870  *)
11871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11872for as_dir in $PATH
11873do
11874  IFS=$as_save_IFS
11875  test -z "$as_dir" && as_dir=.
11876    for ac_exec_ext in '' $ac_executable_extensions; do
11877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11878    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11880    break 2
11881  fi
11882done
11883  done
11884IFS=$as_save_IFS
11885
11886  ;;
11887esac
11888fi
11889UNIQ=$ac_cv_path_UNIQ
11890if test -n "$UNIQ"; then
11891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11892$as_echo "$UNIQ" >&6; }
11893else
11894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11895$as_echo "no" >&6; }
11896fi
11897
11898
11899  test -n "$UNIQ" && break
11900done
11901
11902  else
11903    # The variable is set, but is it from the command line or the environment?
11904
11905    # Try to remove the string !UNIQ! from our list.
11906    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11907    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11908      # If it failed, the variable was not from the command line. Ignore it,
11909      # but warn the user (except for BASH, which is always set by the calling BASH).
11910      if test "xUNIQ" != xBASH; then
11911        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11912$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11913      fi
11914      # Try to locate tool using the code snippet
11915      for ac_prog in uniq
11916do
11917  # Extract the first word of "$ac_prog", so it can be a program name with args.
11918set dummy $ac_prog; ac_word=$2
11919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11920$as_echo_n "checking for $ac_word... " >&6; }
11921if ${ac_cv_path_UNIQ+:} false; then :
11922  $as_echo_n "(cached) " >&6
11923else
11924  case $UNIQ in
11925  [\\/]* | ?:[\\/]*)
11926  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11927  ;;
11928  *)
11929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11930for as_dir in $PATH
11931do
11932  IFS=$as_save_IFS
11933  test -z "$as_dir" && as_dir=.
11934    for ac_exec_ext in '' $ac_executable_extensions; do
11935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11936    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11938    break 2
11939  fi
11940done
11941  done
11942IFS=$as_save_IFS
11943
11944  ;;
11945esac
11946fi
11947UNIQ=$ac_cv_path_UNIQ
11948if test -n "$UNIQ"; then
11949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11950$as_echo "$UNIQ" >&6; }
11951else
11952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11953$as_echo "no" >&6; }
11954fi
11955
11956
11957  test -n "$UNIQ" && break
11958done
11959
11960    else
11961      # If it succeeded, then it was overridden by the user. We will use it
11962      # for the tool.
11963
11964      # First remove it from the list of overridden variables, so we can test
11965      # for unknown variables in the end.
11966      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11967
11968      # Check if we try to supply an empty value
11969      if test "x$UNIQ" = x; then
11970        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11971$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11972        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11973$as_echo_n "checking for UNIQ... " >&6; }
11974        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11975$as_echo "disabled" >&6; }
11976      else
11977        # Check if the provided tool contains a complete path.
11978        tool_specified="$UNIQ"
11979        tool_basename="${tool_specified##*/}"
11980        if test "x$tool_basename" = "x$tool_specified"; then
11981          # A command without a complete path is provided, search $PATH.
11982          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11983$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11984          # Extract the first word of "$tool_basename", so it can be a program name with args.
11985set dummy $tool_basename; ac_word=$2
11986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11987$as_echo_n "checking for $ac_word... " >&6; }
11988if ${ac_cv_path_UNIQ+:} false; then :
11989  $as_echo_n "(cached) " >&6
11990else
11991  case $UNIQ in
11992  [\\/]* | ?:[\\/]*)
11993  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11994  ;;
11995  *)
11996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11997for as_dir in $PATH
11998do
11999  IFS=$as_save_IFS
12000  test -z "$as_dir" && as_dir=.
12001    for ac_exec_ext in '' $ac_executable_extensions; do
12002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12003    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12005    break 2
12006  fi
12007done
12008  done
12009IFS=$as_save_IFS
12010
12011  ;;
12012esac
12013fi
12014UNIQ=$ac_cv_path_UNIQ
12015if test -n "$UNIQ"; then
12016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12017$as_echo "$UNIQ" >&6; }
12018else
12019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12020$as_echo "no" >&6; }
12021fi
12022
12023
12024          if test "x$UNIQ" = x; then
12025            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12026          fi
12027        else
12028          # Otherwise we believe it is a complete path. Use it as it is.
12029          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12030$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12031          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12032$as_echo_n "checking for UNIQ... " >&6; }
12033          if test ! -x "$tool_specified"; then
12034            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12035$as_echo "not found" >&6; }
12036            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12037          fi
12038          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12039$as_echo "$tool_specified" >&6; }
12040        fi
12041      fi
12042    fi
12043
12044  fi
12045
12046
12047
12048  if test "x$UNIQ" = x; then
12049    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12050  fi
12051
12052
12053
12054
12055
12056  # Publish this variable in the help.
12057
12058
12059  if [ -z "${WC+x}" ]; then
12060    # The variable is not set by user, try to locate tool using the code snippet
12061    for ac_prog in wc
12062do
12063  # Extract the first word of "$ac_prog", so it can be a program name with args.
12064set dummy $ac_prog; ac_word=$2
12065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12066$as_echo_n "checking for $ac_word... " >&6; }
12067if ${ac_cv_path_WC+:} false; then :
12068  $as_echo_n "(cached) " >&6
12069else
12070  case $WC in
12071  [\\/]* | ?:[\\/]*)
12072  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12073  ;;
12074  *)
12075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12076for as_dir in $PATH
12077do
12078  IFS=$as_save_IFS
12079  test -z "$as_dir" && as_dir=.
12080    for ac_exec_ext in '' $ac_executable_extensions; do
12081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12082    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12084    break 2
12085  fi
12086done
12087  done
12088IFS=$as_save_IFS
12089
12090  ;;
12091esac
12092fi
12093WC=$ac_cv_path_WC
12094if test -n "$WC"; then
12095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12096$as_echo "$WC" >&6; }
12097else
12098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12099$as_echo "no" >&6; }
12100fi
12101
12102
12103  test -n "$WC" && break
12104done
12105
12106  else
12107    # The variable is set, but is it from the command line or the environment?
12108
12109    # Try to remove the string !WC! from our list.
12110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12112      # If it failed, the variable was not from the command line. Ignore it,
12113      # but warn the user (except for BASH, which is always set by the calling BASH).
12114      if test "xWC" != xBASH; then
12115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12116$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12117      fi
12118      # Try to locate tool using the code snippet
12119      for ac_prog in wc
12120do
12121  # Extract the first word of "$ac_prog", so it can be a program name with args.
12122set dummy $ac_prog; ac_word=$2
12123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12124$as_echo_n "checking for $ac_word... " >&6; }
12125if ${ac_cv_path_WC+:} false; then :
12126  $as_echo_n "(cached) " >&6
12127else
12128  case $WC in
12129  [\\/]* | ?:[\\/]*)
12130  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12131  ;;
12132  *)
12133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12134for as_dir in $PATH
12135do
12136  IFS=$as_save_IFS
12137  test -z "$as_dir" && as_dir=.
12138    for ac_exec_ext in '' $ac_executable_extensions; do
12139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12140    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12142    break 2
12143  fi
12144done
12145  done
12146IFS=$as_save_IFS
12147
12148  ;;
12149esac
12150fi
12151WC=$ac_cv_path_WC
12152if test -n "$WC"; then
12153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12154$as_echo "$WC" >&6; }
12155else
12156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12157$as_echo "no" >&6; }
12158fi
12159
12160
12161  test -n "$WC" && break
12162done
12163
12164    else
12165      # If it succeeded, then it was overridden by the user. We will use it
12166      # for the tool.
12167
12168      # First remove it from the list of overridden variables, so we can test
12169      # for unknown variables in the end.
12170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12171
12172      # Check if we try to supply an empty value
12173      if test "x$WC" = x; then
12174        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12175$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12177$as_echo_n "checking for WC... " >&6; }
12178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12179$as_echo "disabled" >&6; }
12180      else
12181        # Check if the provided tool contains a complete path.
12182        tool_specified="$WC"
12183        tool_basename="${tool_specified##*/}"
12184        if test "x$tool_basename" = "x$tool_specified"; then
12185          # A command without a complete path is provided, search $PATH.
12186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12187$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12188          # Extract the first word of "$tool_basename", so it can be a program name with args.
12189set dummy $tool_basename; ac_word=$2
12190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12191$as_echo_n "checking for $ac_word... " >&6; }
12192if ${ac_cv_path_WC+:} false; then :
12193  $as_echo_n "(cached) " >&6
12194else
12195  case $WC in
12196  [\\/]* | ?:[\\/]*)
12197  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12198  ;;
12199  *)
12200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12201for as_dir in $PATH
12202do
12203  IFS=$as_save_IFS
12204  test -z "$as_dir" && as_dir=.
12205    for ac_exec_ext in '' $ac_executable_extensions; do
12206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12207    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12209    break 2
12210  fi
12211done
12212  done
12213IFS=$as_save_IFS
12214
12215  ;;
12216esac
12217fi
12218WC=$ac_cv_path_WC
12219if test -n "$WC"; then
12220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12221$as_echo "$WC" >&6; }
12222else
12223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12224$as_echo "no" >&6; }
12225fi
12226
12227
12228          if test "x$WC" = x; then
12229            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12230          fi
12231        else
12232          # Otherwise we believe it is a complete path. Use it as it is.
12233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12234$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12235          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12236$as_echo_n "checking for WC... " >&6; }
12237          if test ! -x "$tool_specified"; then
12238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12239$as_echo "not found" >&6; }
12240            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12241          fi
12242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12243$as_echo "$tool_specified" >&6; }
12244        fi
12245      fi
12246    fi
12247
12248  fi
12249
12250
12251
12252  if test "x$WC" = x; then
12253    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12254  fi
12255
12256
12257
12258
12259
12260  # Publish this variable in the help.
12261
12262
12263  if [ -z "${WHICH+x}" ]; then
12264    # The variable is not set by user, try to locate tool using the code snippet
12265    for ac_prog in which
12266do
12267  # Extract the first word of "$ac_prog", so it can be a program name with args.
12268set dummy $ac_prog; ac_word=$2
12269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12270$as_echo_n "checking for $ac_word... " >&6; }
12271if ${ac_cv_path_WHICH+:} false; then :
12272  $as_echo_n "(cached) " >&6
12273else
12274  case $WHICH in
12275  [\\/]* | ?:[\\/]*)
12276  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12277  ;;
12278  *)
12279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12280for as_dir in $PATH
12281do
12282  IFS=$as_save_IFS
12283  test -z "$as_dir" && as_dir=.
12284    for ac_exec_ext in '' $ac_executable_extensions; do
12285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12286    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12288    break 2
12289  fi
12290done
12291  done
12292IFS=$as_save_IFS
12293
12294  ;;
12295esac
12296fi
12297WHICH=$ac_cv_path_WHICH
12298if test -n "$WHICH"; then
12299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12300$as_echo "$WHICH" >&6; }
12301else
12302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12303$as_echo "no" >&6; }
12304fi
12305
12306
12307  test -n "$WHICH" && break
12308done
12309
12310  else
12311    # The variable is set, but is it from the command line or the environment?
12312
12313    # Try to remove the string !WHICH! from our list.
12314    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12315    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12316      # If it failed, the variable was not from the command line. Ignore it,
12317      # but warn the user (except for BASH, which is always set by the calling BASH).
12318      if test "xWHICH" != xBASH; then
12319        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12320$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12321      fi
12322      # Try to locate tool using the code snippet
12323      for ac_prog in which
12324do
12325  # Extract the first word of "$ac_prog", so it can be a program name with args.
12326set dummy $ac_prog; ac_word=$2
12327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12328$as_echo_n "checking for $ac_word... " >&6; }
12329if ${ac_cv_path_WHICH+:} false; then :
12330  $as_echo_n "(cached) " >&6
12331else
12332  case $WHICH in
12333  [\\/]* | ?:[\\/]*)
12334  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12335  ;;
12336  *)
12337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12338for as_dir in $PATH
12339do
12340  IFS=$as_save_IFS
12341  test -z "$as_dir" && as_dir=.
12342    for ac_exec_ext in '' $ac_executable_extensions; do
12343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12344    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12346    break 2
12347  fi
12348done
12349  done
12350IFS=$as_save_IFS
12351
12352  ;;
12353esac
12354fi
12355WHICH=$ac_cv_path_WHICH
12356if test -n "$WHICH"; then
12357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12358$as_echo "$WHICH" >&6; }
12359else
12360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12361$as_echo "no" >&6; }
12362fi
12363
12364
12365  test -n "$WHICH" && break
12366done
12367
12368    else
12369      # If it succeeded, then it was overridden by the user. We will use it
12370      # for the tool.
12371
12372      # First remove it from the list of overridden variables, so we can test
12373      # for unknown variables in the end.
12374      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12375
12376      # Check if we try to supply an empty value
12377      if test "x$WHICH" = x; then
12378        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12379$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12380        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12381$as_echo_n "checking for WHICH... " >&6; }
12382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12383$as_echo "disabled" >&6; }
12384      else
12385        # Check if the provided tool contains a complete path.
12386        tool_specified="$WHICH"
12387        tool_basename="${tool_specified##*/}"
12388        if test "x$tool_basename" = "x$tool_specified"; then
12389          # A command without a complete path is provided, search $PATH.
12390          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12391$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12392          # Extract the first word of "$tool_basename", so it can be a program name with args.
12393set dummy $tool_basename; ac_word=$2
12394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12395$as_echo_n "checking for $ac_word... " >&6; }
12396if ${ac_cv_path_WHICH+:} false; then :
12397  $as_echo_n "(cached) " >&6
12398else
12399  case $WHICH in
12400  [\\/]* | ?:[\\/]*)
12401  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12402  ;;
12403  *)
12404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12405for as_dir in $PATH
12406do
12407  IFS=$as_save_IFS
12408  test -z "$as_dir" && as_dir=.
12409    for ac_exec_ext in '' $ac_executable_extensions; do
12410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12411    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12413    break 2
12414  fi
12415done
12416  done
12417IFS=$as_save_IFS
12418
12419  ;;
12420esac
12421fi
12422WHICH=$ac_cv_path_WHICH
12423if test -n "$WHICH"; then
12424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12425$as_echo "$WHICH" >&6; }
12426else
12427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12428$as_echo "no" >&6; }
12429fi
12430
12431
12432          if test "x$WHICH" = x; then
12433            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12434          fi
12435        else
12436          # Otherwise we believe it is a complete path. Use it as it is.
12437          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12438$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12439          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12440$as_echo_n "checking for WHICH... " >&6; }
12441          if test ! -x "$tool_specified"; then
12442            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12443$as_echo "not found" >&6; }
12444            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12445          fi
12446          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12447$as_echo "$tool_specified" >&6; }
12448        fi
12449      fi
12450    fi
12451
12452  fi
12453
12454
12455
12456  if test "x$WHICH" = x; then
12457    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12458  fi
12459
12460
12461
12462
12463
12464  # Publish this variable in the help.
12465
12466
12467  if [ -z "${XARGS+x}" ]; then
12468    # The variable is not set by user, try to locate tool using the code snippet
12469    for ac_prog in xargs
12470do
12471  # Extract the first word of "$ac_prog", so it can be a program name with args.
12472set dummy $ac_prog; ac_word=$2
12473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12474$as_echo_n "checking for $ac_word... " >&6; }
12475if ${ac_cv_path_XARGS+:} false; then :
12476  $as_echo_n "(cached) " >&6
12477else
12478  case $XARGS in
12479  [\\/]* | ?:[\\/]*)
12480  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12481  ;;
12482  *)
12483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12484for as_dir in $PATH
12485do
12486  IFS=$as_save_IFS
12487  test -z "$as_dir" && as_dir=.
12488    for ac_exec_ext in '' $ac_executable_extensions; do
12489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12490    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12492    break 2
12493  fi
12494done
12495  done
12496IFS=$as_save_IFS
12497
12498  ;;
12499esac
12500fi
12501XARGS=$ac_cv_path_XARGS
12502if test -n "$XARGS"; then
12503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12504$as_echo "$XARGS" >&6; }
12505else
12506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12507$as_echo "no" >&6; }
12508fi
12509
12510
12511  test -n "$XARGS" && break
12512done
12513
12514  else
12515    # The variable is set, but is it from the command line or the environment?
12516
12517    # Try to remove the string !XARGS! from our list.
12518    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12519    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12520      # If it failed, the variable was not from the command line. Ignore it,
12521      # but warn the user (except for BASH, which is always set by the calling BASH).
12522      if test "xXARGS" != xBASH; then
12523        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12524$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12525      fi
12526      # Try to locate tool using the code snippet
12527      for ac_prog in xargs
12528do
12529  # Extract the first word of "$ac_prog", so it can be a program name with args.
12530set dummy $ac_prog; ac_word=$2
12531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12532$as_echo_n "checking for $ac_word... " >&6; }
12533if ${ac_cv_path_XARGS+:} false; then :
12534  $as_echo_n "(cached) " >&6
12535else
12536  case $XARGS in
12537  [\\/]* | ?:[\\/]*)
12538  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12539  ;;
12540  *)
12541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12542for as_dir in $PATH
12543do
12544  IFS=$as_save_IFS
12545  test -z "$as_dir" && as_dir=.
12546    for ac_exec_ext in '' $ac_executable_extensions; do
12547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12548    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12550    break 2
12551  fi
12552done
12553  done
12554IFS=$as_save_IFS
12555
12556  ;;
12557esac
12558fi
12559XARGS=$ac_cv_path_XARGS
12560if test -n "$XARGS"; then
12561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12562$as_echo "$XARGS" >&6; }
12563else
12564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12565$as_echo "no" >&6; }
12566fi
12567
12568
12569  test -n "$XARGS" && break
12570done
12571
12572    else
12573      # If it succeeded, then it was overridden by the user. We will use it
12574      # for the tool.
12575
12576      # First remove it from the list of overridden variables, so we can test
12577      # for unknown variables in the end.
12578      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12579
12580      # Check if we try to supply an empty value
12581      if test "x$XARGS" = x; then
12582        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12583$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12584        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12585$as_echo_n "checking for XARGS... " >&6; }
12586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12587$as_echo "disabled" >&6; }
12588      else
12589        # Check if the provided tool contains a complete path.
12590        tool_specified="$XARGS"
12591        tool_basename="${tool_specified##*/}"
12592        if test "x$tool_basename" = "x$tool_specified"; then
12593          # A command without a complete path is provided, search $PATH.
12594          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12595$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12596          # Extract the first word of "$tool_basename", so it can be a program name with args.
12597set dummy $tool_basename; ac_word=$2
12598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12599$as_echo_n "checking for $ac_word... " >&6; }
12600if ${ac_cv_path_XARGS+:} false; then :
12601  $as_echo_n "(cached) " >&6
12602else
12603  case $XARGS in
12604  [\\/]* | ?:[\\/]*)
12605  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12606  ;;
12607  *)
12608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12609for as_dir in $PATH
12610do
12611  IFS=$as_save_IFS
12612  test -z "$as_dir" && as_dir=.
12613    for ac_exec_ext in '' $ac_executable_extensions; do
12614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12615    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12617    break 2
12618  fi
12619done
12620  done
12621IFS=$as_save_IFS
12622
12623  ;;
12624esac
12625fi
12626XARGS=$ac_cv_path_XARGS
12627if test -n "$XARGS"; then
12628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12629$as_echo "$XARGS" >&6; }
12630else
12631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12632$as_echo "no" >&6; }
12633fi
12634
12635
12636          if test "x$XARGS" = x; then
12637            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12638          fi
12639        else
12640          # Otherwise we believe it is a complete path. Use it as it is.
12641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12642$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12643          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12644$as_echo_n "checking for XARGS... " >&6; }
12645          if test ! -x "$tool_specified"; then
12646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12647$as_echo "not found" >&6; }
12648            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12649          fi
12650          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12651$as_echo "$tool_specified" >&6; }
12652        fi
12653      fi
12654    fi
12655
12656  fi
12657
12658
12659
12660  if test "x$XARGS" = x; then
12661    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12662  fi
12663
12664
12665
12666  # Then required tools that require some special treatment.
12667
12668
12669  # Publish this variable in the help.
12670
12671
12672  if [ -z "${AWK+x}" ]; then
12673    # The variable is not set by user, try to locate tool using the code snippet
12674    for ac_prog in gawk mawk nawk awk
12675do
12676  # Extract the first word of "$ac_prog", so it can be a program name with args.
12677set dummy $ac_prog; ac_word=$2
12678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12679$as_echo_n "checking for $ac_word... " >&6; }
12680if ${ac_cv_prog_AWK+:} false; then :
12681  $as_echo_n "(cached) " >&6
12682else
12683  if test -n "$AWK"; then
12684  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12685else
12686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12687for as_dir in $PATH
12688do
12689  IFS=$as_save_IFS
12690  test -z "$as_dir" && as_dir=.
12691    for ac_exec_ext in '' $ac_executable_extensions; do
12692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12693    ac_cv_prog_AWK="$ac_prog"
12694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12695    break 2
12696  fi
12697done
12698  done
12699IFS=$as_save_IFS
12700
12701fi
12702fi
12703AWK=$ac_cv_prog_AWK
12704if test -n "$AWK"; then
12705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12706$as_echo "$AWK" >&6; }
12707else
12708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12709$as_echo "no" >&6; }
12710fi
12711
12712
12713  test -n "$AWK" && break
12714done
12715
12716  else
12717    # The variable is set, but is it from the command line or the environment?
12718
12719    # Try to remove the string !AWK! from our list.
12720    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12721    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12722      # If it failed, the variable was not from the command line. Ignore it,
12723      # but warn the user (except for BASH, which is always set by the calling BASH).
12724      if test "xAWK" != xBASH; then
12725        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12726$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12727      fi
12728      # Try to locate tool using the code snippet
12729      for ac_prog in gawk mawk nawk awk
12730do
12731  # Extract the first word of "$ac_prog", so it can be a program name with args.
12732set dummy $ac_prog; ac_word=$2
12733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12734$as_echo_n "checking for $ac_word... " >&6; }
12735if ${ac_cv_prog_AWK+:} false; then :
12736  $as_echo_n "(cached) " >&6
12737else
12738  if test -n "$AWK"; then
12739  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12740else
12741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12742for as_dir in $PATH
12743do
12744  IFS=$as_save_IFS
12745  test -z "$as_dir" && as_dir=.
12746    for ac_exec_ext in '' $ac_executable_extensions; do
12747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12748    ac_cv_prog_AWK="$ac_prog"
12749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12750    break 2
12751  fi
12752done
12753  done
12754IFS=$as_save_IFS
12755
12756fi
12757fi
12758AWK=$ac_cv_prog_AWK
12759if test -n "$AWK"; then
12760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12761$as_echo "$AWK" >&6; }
12762else
12763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12764$as_echo "no" >&6; }
12765fi
12766
12767
12768  test -n "$AWK" && break
12769done
12770
12771    else
12772      # If it succeeded, then it was overridden by the user. We will use it
12773      # for the tool.
12774
12775      # First remove it from the list of overridden variables, so we can test
12776      # for unknown variables in the end.
12777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12778
12779      # Check if we try to supply an empty value
12780      if test "x$AWK" = x; then
12781        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12782$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12784$as_echo_n "checking for AWK... " >&6; }
12785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12786$as_echo "disabled" >&6; }
12787      else
12788        # Check if the provided tool contains a complete path.
12789        tool_specified="$AWK"
12790        tool_basename="${tool_specified##*/}"
12791        if test "x$tool_basename" = "x$tool_specified"; then
12792          # A command without a complete path is provided, search $PATH.
12793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12794$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12795          # Extract the first word of "$tool_basename", so it can be a program name with args.
12796set dummy $tool_basename; ac_word=$2
12797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12798$as_echo_n "checking for $ac_word... " >&6; }
12799if ${ac_cv_path_AWK+:} false; then :
12800  $as_echo_n "(cached) " >&6
12801else
12802  case $AWK in
12803  [\\/]* | ?:[\\/]*)
12804  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12805  ;;
12806  *)
12807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12808for as_dir in $PATH
12809do
12810  IFS=$as_save_IFS
12811  test -z "$as_dir" && as_dir=.
12812    for ac_exec_ext in '' $ac_executable_extensions; do
12813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12814    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12816    break 2
12817  fi
12818done
12819  done
12820IFS=$as_save_IFS
12821
12822  ;;
12823esac
12824fi
12825AWK=$ac_cv_path_AWK
12826if test -n "$AWK"; then
12827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12828$as_echo "$AWK" >&6; }
12829else
12830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12831$as_echo "no" >&6; }
12832fi
12833
12834
12835          if test "x$AWK" = x; then
12836            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12837          fi
12838        else
12839          # Otherwise we believe it is a complete path. Use it as it is.
12840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12841$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12842          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12843$as_echo_n "checking for AWK... " >&6; }
12844          if test ! -x "$tool_specified"; then
12845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12846$as_echo "not found" >&6; }
12847            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12848          fi
12849          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12850$as_echo "$tool_specified" >&6; }
12851        fi
12852      fi
12853    fi
12854
12855  fi
12856
12857
12858  if test "x$AWK" = x; then
12859    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12860  fi
12861
12862
12863
12864
12865  # Publish this variable in the help.
12866
12867
12868  if [ -z "${GREP+x}" ]; then
12869    # The variable is not set by user, try to locate tool using the code snippet
12870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12871$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12872if ${ac_cv_path_GREP+:} false; then :
12873  $as_echo_n "(cached) " >&6
12874else
12875  if test -z "$GREP"; then
12876  ac_path_GREP_found=false
12877  # Loop through the user's path and test for each of PROGNAME-LIST
12878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12879for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12880do
12881  IFS=$as_save_IFS
12882  test -z "$as_dir" && as_dir=.
12883    for ac_prog in grep ggrep; do
12884    for ac_exec_ext in '' $ac_executable_extensions; do
12885      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12886      as_fn_executable_p "$ac_path_GREP" || continue
12887# Check for GNU ac_path_GREP and select it if it is found.
12888  # Check for GNU $ac_path_GREP
12889case `"$ac_path_GREP" --version 2>&1` in
12890*GNU*)
12891  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12892*)
12893  ac_count=0
12894  $as_echo_n 0123456789 >"conftest.in"
12895  while :
12896  do
12897    cat "conftest.in" "conftest.in" >"conftest.tmp"
12898    mv "conftest.tmp" "conftest.in"
12899    cp "conftest.in" "conftest.nl"
12900    $as_echo 'GREP' >> "conftest.nl"
12901    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12902    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12903    as_fn_arith $ac_count + 1 && ac_count=$as_val
12904    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12905      # Best one so far, save it but keep looking for a better one
12906      ac_cv_path_GREP="$ac_path_GREP"
12907      ac_path_GREP_max=$ac_count
12908    fi
12909    # 10*(2^10) chars as input seems more than enough
12910    test $ac_count -gt 10 && break
12911  done
12912  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12913esac
12914
12915      $ac_path_GREP_found && break 3
12916    done
12917  done
12918  done
12919IFS=$as_save_IFS
12920  if test -z "$ac_cv_path_GREP"; then
12921    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12922  fi
12923else
12924  ac_cv_path_GREP=$GREP
12925fi
12926
12927fi
12928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12929$as_echo "$ac_cv_path_GREP" >&6; }
12930 GREP="$ac_cv_path_GREP"
12931
12932
12933  else
12934    # The variable is set, but is it from the command line or the environment?
12935
12936    # Try to remove the string !GREP! from our list.
12937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12939      # If it failed, the variable was not from the command line. Ignore it,
12940      # but warn the user (except for BASH, which is always set by the calling BASH).
12941      if test "xGREP" != xBASH; then
12942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12943$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12944      fi
12945      # Try to locate tool using the code snippet
12946      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12947$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12948if ${ac_cv_path_GREP+:} false; then :
12949  $as_echo_n "(cached) " >&6
12950else
12951  if test -z "$GREP"; then
12952  ac_path_GREP_found=false
12953  # Loop through the user's path and test for each of PROGNAME-LIST
12954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12955for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12956do
12957  IFS=$as_save_IFS
12958  test -z "$as_dir" && as_dir=.
12959    for ac_prog in grep ggrep; do
12960    for ac_exec_ext in '' $ac_executable_extensions; do
12961      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12962      as_fn_executable_p "$ac_path_GREP" || continue
12963# Check for GNU ac_path_GREP and select it if it is found.
12964  # Check for GNU $ac_path_GREP
12965case `"$ac_path_GREP" --version 2>&1` in
12966*GNU*)
12967  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12968*)
12969  ac_count=0
12970  $as_echo_n 0123456789 >"conftest.in"
12971  while :
12972  do
12973    cat "conftest.in" "conftest.in" >"conftest.tmp"
12974    mv "conftest.tmp" "conftest.in"
12975    cp "conftest.in" "conftest.nl"
12976    $as_echo 'GREP' >> "conftest.nl"
12977    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12978    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12979    as_fn_arith $ac_count + 1 && ac_count=$as_val
12980    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12981      # Best one so far, save it but keep looking for a better one
12982      ac_cv_path_GREP="$ac_path_GREP"
12983      ac_path_GREP_max=$ac_count
12984    fi
12985    # 10*(2^10) chars as input seems more than enough
12986    test $ac_count -gt 10 && break
12987  done
12988  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12989esac
12990
12991      $ac_path_GREP_found && break 3
12992    done
12993  done
12994  done
12995IFS=$as_save_IFS
12996  if test -z "$ac_cv_path_GREP"; then
12997    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12998  fi
12999else
13000  ac_cv_path_GREP=$GREP
13001fi
13002
13003fi
13004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13005$as_echo "$ac_cv_path_GREP" >&6; }
13006 GREP="$ac_cv_path_GREP"
13007
13008
13009    else
13010      # If it succeeded, then it was overridden by the user. We will use it
13011      # for the tool.
13012
13013      # First remove it from the list of overridden variables, so we can test
13014      # for unknown variables in the end.
13015      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13016
13017      # Check if we try to supply an empty value
13018      if test "x$GREP" = x; then
13019        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13020$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13021        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13022$as_echo_n "checking for GREP... " >&6; }
13023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13024$as_echo "disabled" >&6; }
13025      else
13026        # Check if the provided tool contains a complete path.
13027        tool_specified="$GREP"
13028        tool_basename="${tool_specified##*/}"
13029        if test "x$tool_basename" = "x$tool_specified"; then
13030          # A command without a complete path is provided, search $PATH.
13031          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13032$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13033          # Extract the first word of "$tool_basename", so it can be a program name with args.
13034set dummy $tool_basename; ac_word=$2
13035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13036$as_echo_n "checking for $ac_word... " >&6; }
13037if ${ac_cv_path_GREP+:} false; then :
13038  $as_echo_n "(cached) " >&6
13039else
13040  case $GREP in
13041  [\\/]* | ?:[\\/]*)
13042  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13043  ;;
13044  *)
13045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13046for as_dir in $PATH
13047do
13048  IFS=$as_save_IFS
13049  test -z "$as_dir" && as_dir=.
13050    for ac_exec_ext in '' $ac_executable_extensions; do
13051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13052    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13054    break 2
13055  fi
13056done
13057  done
13058IFS=$as_save_IFS
13059
13060  ;;
13061esac
13062fi
13063GREP=$ac_cv_path_GREP
13064if test -n "$GREP"; then
13065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13066$as_echo "$GREP" >&6; }
13067else
13068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13069$as_echo "no" >&6; }
13070fi
13071
13072
13073          if test "x$GREP" = x; then
13074            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13075          fi
13076        else
13077          # Otherwise we believe it is a complete path. Use it as it is.
13078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13079$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13080          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13081$as_echo_n "checking for GREP... " >&6; }
13082          if test ! -x "$tool_specified"; then
13083            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13084$as_echo "not found" >&6; }
13085            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13086          fi
13087          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13088$as_echo "$tool_specified" >&6; }
13089        fi
13090      fi
13091    fi
13092
13093  fi
13094
13095
13096  if test "x$GREP" = x; then
13097    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13098  fi
13099
13100
13101
13102
13103  # Publish this variable in the help.
13104
13105
13106  if [ -z "${EGREP+x}" ]; then
13107    # The variable is not set by user, try to locate tool using the code snippet
13108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13109$as_echo_n "checking for egrep... " >&6; }
13110if ${ac_cv_path_EGREP+:} false; then :
13111  $as_echo_n "(cached) " >&6
13112else
13113  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13114   then ac_cv_path_EGREP="$GREP -E"
13115   else
13116     if test -z "$EGREP"; then
13117  ac_path_EGREP_found=false
13118  # Loop through the user's path and test for each of PROGNAME-LIST
13119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13120for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13121do
13122  IFS=$as_save_IFS
13123  test -z "$as_dir" && as_dir=.
13124    for ac_prog in egrep; do
13125    for ac_exec_ext in '' $ac_executable_extensions; do
13126      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13127      as_fn_executable_p "$ac_path_EGREP" || continue
13128# Check for GNU ac_path_EGREP and select it if it is found.
13129  # Check for GNU $ac_path_EGREP
13130case `"$ac_path_EGREP" --version 2>&1` in
13131*GNU*)
13132  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13133*)
13134  ac_count=0
13135  $as_echo_n 0123456789 >"conftest.in"
13136  while :
13137  do
13138    cat "conftest.in" "conftest.in" >"conftest.tmp"
13139    mv "conftest.tmp" "conftest.in"
13140    cp "conftest.in" "conftest.nl"
13141    $as_echo 'EGREP' >> "conftest.nl"
13142    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13143    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13144    as_fn_arith $ac_count + 1 && ac_count=$as_val
13145    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13146      # Best one so far, save it but keep looking for a better one
13147      ac_cv_path_EGREP="$ac_path_EGREP"
13148      ac_path_EGREP_max=$ac_count
13149    fi
13150    # 10*(2^10) chars as input seems more than enough
13151    test $ac_count -gt 10 && break
13152  done
13153  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13154esac
13155
13156      $ac_path_EGREP_found && break 3
13157    done
13158  done
13159  done
13160IFS=$as_save_IFS
13161  if test -z "$ac_cv_path_EGREP"; then
13162    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13163  fi
13164else
13165  ac_cv_path_EGREP=$EGREP
13166fi
13167
13168   fi
13169fi
13170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13171$as_echo "$ac_cv_path_EGREP" >&6; }
13172 EGREP="$ac_cv_path_EGREP"
13173
13174
13175  else
13176    # The variable is set, but is it from the command line or the environment?
13177
13178    # Try to remove the string !EGREP! from our list.
13179    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13180    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13181      # If it failed, the variable was not from the command line. Ignore it,
13182      # but warn the user (except for BASH, which is always set by the calling BASH).
13183      if test "xEGREP" != xBASH; then
13184        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13185$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13186      fi
13187      # Try to locate tool using the code snippet
13188      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13189$as_echo_n "checking for egrep... " >&6; }
13190if ${ac_cv_path_EGREP+:} false; then :
13191  $as_echo_n "(cached) " >&6
13192else
13193  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13194   then ac_cv_path_EGREP="$GREP -E"
13195   else
13196     if test -z "$EGREP"; then
13197  ac_path_EGREP_found=false
13198  # Loop through the user's path and test for each of PROGNAME-LIST
13199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13200for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13201do
13202  IFS=$as_save_IFS
13203  test -z "$as_dir" && as_dir=.
13204    for ac_prog in egrep; do
13205    for ac_exec_ext in '' $ac_executable_extensions; do
13206      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13207      as_fn_executable_p "$ac_path_EGREP" || continue
13208# Check for GNU ac_path_EGREP and select it if it is found.
13209  # Check for GNU $ac_path_EGREP
13210case `"$ac_path_EGREP" --version 2>&1` in
13211*GNU*)
13212  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13213*)
13214  ac_count=0
13215  $as_echo_n 0123456789 >"conftest.in"
13216  while :
13217  do
13218    cat "conftest.in" "conftest.in" >"conftest.tmp"
13219    mv "conftest.tmp" "conftest.in"
13220    cp "conftest.in" "conftest.nl"
13221    $as_echo 'EGREP' >> "conftest.nl"
13222    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13223    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13224    as_fn_arith $ac_count + 1 && ac_count=$as_val
13225    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13226      # Best one so far, save it but keep looking for a better one
13227      ac_cv_path_EGREP="$ac_path_EGREP"
13228      ac_path_EGREP_max=$ac_count
13229    fi
13230    # 10*(2^10) chars as input seems more than enough
13231    test $ac_count -gt 10 && break
13232  done
13233  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13234esac
13235
13236      $ac_path_EGREP_found && break 3
13237    done
13238  done
13239  done
13240IFS=$as_save_IFS
13241  if test -z "$ac_cv_path_EGREP"; then
13242    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13243  fi
13244else
13245  ac_cv_path_EGREP=$EGREP
13246fi
13247
13248   fi
13249fi
13250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13251$as_echo "$ac_cv_path_EGREP" >&6; }
13252 EGREP="$ac_cv_path_EGREP"
13253
13254
13255    else
13256      # If it succeeded, then it was overridden by the user. We will use it
13257      # for the tool.
13258
13259      # First remove it from the list of overridden variables, so we can test
13260      # for unknown variables in the end.
13261      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13262
13263      # Check if we try to supply an empty value
13264      if test "x$EGREP" = x; then
13265        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13266$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13267        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13268$as_echo_n "checking for EGREP... " >&6; }
13269        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13270$as_echo "disabled" >&6; }
13271      else
13272        # Check if the provided tool contains a complete path.
13273        tool_specified="$EGREP"
13274        tool_basename="${tool_specified##*/}"
13275        if test "x$tool_basename" = "x$tool_specified"; then
13276          # A command without a complete path is provided, search $PATH.
13277          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13278$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13279          # Extract the first word of "$tool_basename", so it can be a program name with args.
13280set dummy $tool_basename; ac_word=$2
13281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13282$as_echo_n "checking for $ac_word... " >&6; }
13283if ${ac_cv_path_EGREP+:} false; then :
13284  $as_echo_n "(cached) " >&6
13285else
13286  case $EGREP in
13287  [\\/]* | ?:[\\/]*)
13288  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13289  ;;
13290  *)
13291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13292for as_dir in $PATH
13293do
13294  IFS=$as_save_IFS
13295  test -z "$as_dir" && as_dir=.
13296    for ac_exec_ext in '' $ac_executable_extensions; do
13297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13298    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13300    break 2
13301  fi
13302done
13303  done
13304IFS=$as_save_IFS
13305
13306  ;;
13307esac
13308fi
13309EGREP=$ac_cv_path_EGREP
13310if test -n "$EGREP"; then
13311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13312$as_echo "$EGREP" >&6; }
13313else
13314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13315$as_echo "no" >&6; }
13316fi
13317
13318
13319          if test "x$EGREP" = x; then
13320            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13321          fi
13322        else
13323          # Otherwise we believe it is a complete path. Use it as it is.
13324          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13325$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13326          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13327$as_echo_n "checking for EGREP... " >&6; }
13328          if test ! -x "$tool_specified"; then
13329            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13330$as_echo "not found" >&6; }
13331            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13332          fi
13333          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13334$as_echo "$tool_specified" >&6; }
13335        fi
13336      fi
13337    fi
13338
13339  fi
13340
13341
13342  if test "x$EGREP" = x; then
13343    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13344  fi
13345
13346
13347
13348
13349  # Publish this variable in the help.
13350
13351
13352  if [ -z "${FGREP+x}" ]; then
13353    # The variable is not set by user, try to locate tool using the code snippet
13354    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13355$as_echo_n "checking for fgrep... " >&6; }
13356if ${ac_cv_path_FGREP+:} false; then :
13357  $as_echo_n "(cached) " >&6
13358else
13359  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13360   then ac_cv_path_FGREP="$GREP -F"
13361   else
13362     if test -z "$FGREP"; then
13363  ac_path_FGREP_found=false
13364  # Loop through the user's path and test for each of PROGNAME-LIST
13365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13366for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13367do
13368  IFS=$as_save_IFS
13369  test -z "$as_dir" && as_dir=.
13370    for ac_prog in fgrep; do
13371    for ac_exec_ext in '' $ac_executable_extensions; do
13372      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13373      as_fn_executable_p "$ac_path_FGREP" || continue
13374# Check for GNU ac_path_FGREP and select it if it is found.
13375  # Check for GNU $ac_path_FGREP
13376case `"$ac_path_FGREP" --version 2>&1` in
13377*GNU*)
13378  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13379*)
13380  ac_count=0
13381  $as_echo_n 0123456789 >"conftest.in"
13382  while :
13383  do
13384    cat "conftest.in" "conftest.in" >"conftest.tmp"
13385    mv "conftest.tmp" "conftest.in"
13386    cp "conftest.in" "conftest.nl"
13387    $as_echo 'FGREP' >> "conftest.nl"
13388    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13389    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13390    as_fn_arith $ac_count + 1 && ac_count=$as_val
13391    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13392      # Best one so far, save it but keep looking for a better one
13393      ac_cv_path_FGREP="$ac_path_FGREP"
13394      ac_path_FGREP_max=$ac_count
13395    fi
13396    # 10*(2^10) chars as input seems more than enough
13397    test $ac_count -gt 10 && break
13398  done
13399  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13400esac
13401
13402      $ac_path_FGREP_found && break 3
13403    done
13404  done
13405  done
13406IFS=$as_save_IFS
13407  if test -z "$ac_cv_path_FGREP"; then
13408    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13409  fi
13410else
13411  ac_cv_path_FGREP=$FGREP
13412fi
13413
13414   fi
13415fi
13416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13417$as_echo "$ac_cv_path_FGREP" >&6; }
13418 FGREP="$ac_cv_path_FGREP"
13419
13420
13421  else
13422    # The variable is set, but is it from the command line or the environment?
13423
13424    # Try to remove the string !FGREP! from our list.
13425    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13426    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13427      # If it failed, the variable was not from the command line. Ignore it,
13428      # but warn the user (except for BASH, which is always set by the calling BASH).
13429      if test "xFGREP" != xBASH; then
13430        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13431$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13432      fi
13433      # Try to locate tool using the code snippet
13434      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13435$as_echo_n "checking for fgrep... " >&6; }
13436if ${ac_cv_path_FGREP+:} false; then :
13437  $as_echo_n "(cached) " >&6
13438else
13439  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13440   then ac_cv_path_FGREP="$GREP -F"
13441   else
13442     if test -z "$FGREP"; then
13443  ac_path_FGREP_found=false
13444  # Loop through the user's path and test for each of PROGNAME-LIST
13445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13446for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13447do
13448  IFS=$as_save_IFS
13449  test -z "$as_dir" && as_dir=.
13450    for ac_prog in fgrep; do
13451    for ac_exec_ext in '' $ac_executable_extensions; do
13452      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13453      as_fn_executable_p "$ac_path_FGREP" || continue
13454# Check for GNU ac_path_FGREP and select it if it is found.
13455  # Check for GNU $ac_path_FGREP
13456case `"$ac_path_FGREP" --version 2>&1` in
13457*GNU*)
13458  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13459*)
13460  ac_count=0
13461  $as_echo_n 0123456789 >"conftest.in"
13462  while :
13463  do
13464    cat "conftest.in" "conftest.in" >"conftest.tmp"
13465    mv "conftest.tmp" "conftest.in"
13466    cp "conftest.in" "conftest.nl"
13467    $as_echo 'FGREP' >> "conftest.nl"
13468    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13469    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13470    as_fn_arith $ac_count + 1 && ac_count=$as_val
13471    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13472      # Best one so far, save it but keep looking for a better one
13473      ac_cv_path_FGREP="$ac_path_FGREP"
13474      ac_path_FGREP_max=$ac_count
13475    fi
13476    # 10*(2^10) chars as input seems more than enough
13477    test $ac_count -gt 10 && break
13478  done
13479  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13480esac
13481
13482      $ac_path_FGREP_found && break 3
13483    done
13484  done
13485  done
13486IFS=$as_save_IFS
13487  if test -z "$ac_cv_path_FGREP"; then
13488    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13489  fi
13490else
13491  ac_cv_path_FGREP=$FGREP
13492fi
13493
13494   fi
13495fi
13496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13497$as_echo "$ac_cv_path_FGREP" >&6; }
13498 FGREP="$ac_cv_path_FGREP"
13499
13500
13501    else
13502      # If it succeeded, then it was overridden by the user. We will use it
13503      # for the tool.
13504
13505      # First remove it from the list of overridden variables, so we can test
13506      # for unknown variables in the end.
13507      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13508
13509      # Check if we try to supply an empty value
13510      if test "x$FGREP" = x; then
13511        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13512$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13513        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13514$as_echo_n "checking for FGREP... " >&6; }
13515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13516$as_echo "disabled" >&6; }
13517      else
13518        # Check if the provided tool contains a complete path.
13519        tool_specified="$FGREP"
13520        tool_basename="${tool_specified##*/}"
13521        if test "x$tool_basename" = "x$tool_specified"; then
13522          # A command without a complete path is provided, search $PATH.
13523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13524$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13525          # Extract the first word of "$tool_basename", so it can be a program name with args.
13526set dummy $tool_basename; ac_word=$2
13527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13528$as_echo_n "checking for $ac_word... " >&6; }
13529if ${ac_cv_path_FGREP+:} false; then :
13530  $as_echo_n "(cached) " >&6
13531else
13532  case $FGREP in
13533  [\\/]* | ?:[\\/]*)
13534  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13535  ;;
13536  *)
13537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13538for as_dir in $PATH
13539do
13540  IFS=$as_save_IFS
13541  test -z "$as_dir" && as_dir=.
13542    for ac_exec_ext in '' $ac_executable_extensions; do
13543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13544    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13546    break 2
13547  fi
13548done
13549  done
13550IFS=$as_save_IFS
13551
13552  ;;
13553esac
13554fi
13555FGREP=$ac_cv_path_FGREP
13556if test -n "$FGREP"; then
13557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13558$as_echo "$FGREP" >&6; }
13559else
13560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13561$as_echo "no" >&6; }
13562fi
13563
13564
13565          if test "x$FGREP" = x; then
13566            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13567          fi
13568        else
13569          # Otherwise we believe it is a complete path. Use it as it is.
13570          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13571$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13572          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13573$as_echo_n "checking for FGREP... " >&6; }
13574          if test ! -x "$tool_specified"; then
13575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13576$as_echo "not found" >&6; }
13577            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13578          fi
13579          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13580$as_echo "$tool_specified" >&6; }
13581        fi
13582      fi
13583    fi
13584
13585  fi
13586
13587
13588  if test "x$FGREP" = x; then
13589    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13590  fi
13591
13592
13593
13594
13595  # Publish this variable in the help.
13596
13597
13598  if [ -z "${SED+x}" ]; then
13599    # The variable is not set by user, try to locate tool using the code snippet
13600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13601$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13602if ${ac_cv_path_SED+:} false; then :
13603  $as_echo_n "(cached) " >&6
13604else
13605            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13606     for ac_i in 1 2 3 4 5 6 7; do
13607       ac_script="$ac_script$as_nl$ac_script"
13608     done
13609     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13610     { ac_script=; unset ac_script;}
13611     if test -z "$SED"; then
13612  ac_path_SED_found=false
13613  # Loop through the user's path and test for each of PROGNAME-LIST
13614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13615for as_dir in $PATH
13616do
13617  IFS=$as_save_IFS
13618  test -z "$as_dir" && as_dir=.
13619    for ac_prog in sed gsed; do
13620    for ac_exec_ext in '' $ac_executable_extensions; do
13621      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13622      as_fn_executable_p "$ac_path_SED" || continue
13623# Check for GNU ac_path_SED and select it if it is found.
13624  # Check for GNU $ac_path_SED
13625case `"$ac_path_SED" --version 2>&1` in
13626*GNU*)
13627  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13628*)
13629  ac_count=0
13630  $as_echo_n 0123456789 >"conftest.in"
13631  while :
13632  do
13633    cat "conftest.in" "conftest.in" >"conftest.tmp"
13634    mv "conftest.tmp" "conftest.in"
13635    cp "conftest.in" "conftest.nl"
13636    $as_echo '' >> "conftest.nl"
13637    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13638    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13639    as_fn_arith $ac_count + 1 && ac_count=$as_val
13640    if test $ac_count -gt ${ac_path_SED_max-0}; then
13641      # Best one so far, save it but keep looking for a better one
13642      ac_cv_path_SED="$ac_path_SED"
13643      ac_path_SED_max=$ac_count
13644    fi
13645    # 10*(2^10) chars as input seems more than enough
13646    test $ac_count -gt 10 && break
13647  done
13648  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13649esac
13650
13651      $ac_path_SED_found && break 3
13652    done
13653  done
13654  done
13655IFS=$as_save_IFS
13656  if test -z "$ac_cv_path_SED"; then
13657    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13658  fi
13659else
13660  ac_cv_path_SED=$SED
13661fi
13662
13663fi
13664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13665$as_echo "$ac_cv_path_SED" >&6; }
13666 SED="$ac_cv_path_SED"
13667  rm -f conftest.sed
13668
13669  else
13670    # The variable is set, but is it from the command line or the environment?
13671
13672    # Try to remove the string !SED! from our list.
13673    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13674    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13675      # If it failed, the variable was not from the command line. Ignore it,
13676      # but warn the user (except for BASH, which is always set by the calling BASH).
13677      if test "xSED" != xBASH; then
13678        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13679$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13680      fi
13681      # Try to locate tool using the code snippet
13682      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13683$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13684if ${ac_cv_path_SED+:} false; then :
13685  $as_echo_n "(cached) " >&6
13686else
13687            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13688     for ac_i in 1 2 3 4 5 6 7; do
13689       ac_script="$ac_script$as_nl$ac_script"
13690     done
13691     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13692     { ac_script=; unset ac_script;}
13693     if test -z "$SED"; then
13694  ac_path_SED_found=false
13695  # Loop through the user's path and test for each of PROGNAME-LIST
13696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13697for as_dir in $PATH
13698do
13699  IFS=$as_save_IFS
13700  test -z "$as_dir" && as_dir=.
13701    for ac_prog in sed gsed; do
13702    for ac_exec_ext in '' $ac_executable_extensions; do
13703      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13704      as_fn_executable_p "$ac_path_SED" || continue
13705# Check for GNU ac_path_SED and select it if it is found.
13706  # Check for GNU $ac_path_SED
13707case `"$ac_path_SED" --version 2>&1` in
13708*GNU*)
13709  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13710*)
13711  ac_count=0
13712  $as_echo_n 0123456789 >"conftest.in"
13713  while :
13714  do
13715    cat "conftest.in" "conftest.in" >"conftest.tmp"
13716    mv "conftest.tmp" "conftest.in"
13717    cp "conftest.in" "conftest.nl"
13718    $as_echo '' >> "conftest.nl"
13719    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13720    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13721    as_fn_arith $ac_count + 1 && ac_count=$as_val
13722    if test $ac_count -gt ${ac_path_SED_max-0}; then
13723      # Best one so far, save it but keep looking for a better one
13724      ac_cv_path_SED="$ac_path_SED"
13725      ac_path_SED_max=$ac_count
13726    fi
13727    # 10*(2^10) chars as input seems more than enough
13728    test $ac_count -gt 10 && break
13729  done
13730  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13731esac
13732
13733      $ac_path_SED_found && break 3
13734    done
13735  done
13736  done
13737IFS=$as_save_IFS
13738  if test -z "$ac_cv_path_SED"; then
13739    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13740  fi
13741else
13742  ac_cv_path_SED=$SED
13743fi
13744
13745fi
13746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13747$as_echo "$ac_cv_path_SED" >&6; }
13748 SED="$ac_cv_path_SED"
13749  rm -f conftest.sed
13750
13751    else
13752      # If it succeeded, then it was overridden by the user. We will use it
13753      # for the tool.
13754
13755      # First remove it from the list of overridden variables, so we can test
13756      # for unknown variables in the end.
13757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13758
13759      # Check if we try to supply an empty value
13760      if test "x$SED" = x; then
13761        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13762$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13764$as_echo_n "checking for SED... " >&6; }
13765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13766$as_echo "disabled" >&6; }
13767      else
13768        # Check if the provided tool contains a complete path.
13769        tool_specified="$SED"
13770        tool_basename="${tool_specified##*/}"
13771        if test "x$tool_basename" = "x$tool_specified"; then
13772          # A command without a complete path is provided, search $PATH.
13773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13774$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13775          # Extract the first word of "$tool_basename", so it can be a program name with args.
13776set dummy $tool_basename; ac_word=$2
13777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13778$as_echo_n "checking for $ac_word... " >&6; }
13779if ${ac_cv_path_SED+:} false; then :
13780  $as_echo_n "(cached) " >&6
13781else
13782  case $SED in
13783  [\\/]* | ?:[\\/]*)
13784  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13785  ;;
13786  *)
13787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13788for as_dir in $PATH
13789do
13790  IFS=$as_save_IFS
13791  test -z "$as_dir" && as_dir=.
13792    for ac_exec_ext in '' $ac_executable_extensions; do
13793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13794    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13796    break 2
13797  fi
13798done
13799  done
13800IFS=$as_save_IFS
13801
13802  ;;
13803esac
13804fi
13805SED=$ac_cv_path_SED
13806if test -n "$SED"; then
13807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13808$as_echo "$SED" >&6; }
13809else
13810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13811$as_echo "no" >&6; }
13812fi
13813
13814
13815          if test "x$SED" = x; then
13816            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13817          fi
13818        else
13819          # Otherwise we believe it is a complete path. Use it as it is.
13820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13821$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13822          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13823$as_echo_n "checking for SED... " >&6; }
13824          if test ! -x "$tool_specified"; then
13825            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13826$as_echo "not found" >&6; }
13827            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13828          fi
13829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13830$as_echo "$tool_specified" >&6; }
13831        fi
13832      fi
13833    fi
13834
13835  fi
13836
13837
13838  if test "x$SED" = x; then
13839    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13840  fi
13841
13842
13843
13844  # Always force rm.
13845  RM="$RM -f"
13846
13847  # pwd behaves differently on various platforms and some don't support the -L flag.
13848  # Always use the bash builtin pwd to get uniform behavior.
13849  THEPWDCMD=pwd
13850
13851  # These are not required on all platforms
13852
13853
13854  # Publish this variable in the help.
13855
13856
13857  if [ -z "${CYGPATH+x}" ]; then
13858    # The variable is not set by user, try to locate tool using the code snippet
13859    for ac_prog in cygpath
13860do
13861  # Extract the first word of "$ac_prog", so it can be a program name with args.
13862set dummy $ac_prog; ac_word=$2
13863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13864$as_echo_n "checking for $ac_word... " >&6; }
13865if ${ac_cv_path_CYGPATH+:} false; then :
13866  $as_echo_n "(cached) " >&6
13867else
13868  case $CYGPATH in
13869  [\\/]* | ?:[\\/]*)
13870  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13871  ;;
13872  *)
13873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13874for as_dir in $PATH
13875do
13876  IFS=$as_save_IFS
13877  test -z "$as_dir" && as_dir=.
13878    for ac_exec_ext in '' $ac_executable_extensions; do
13879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13880    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13882    break 2
13883  fi
13884done
13885  done
13886IFS=$as_save_IFS
13887
13888  ;;
13889esac
13890fi
13891CYGPATH=$ac_cv_path_CYGPATH
13892if test -n "$CYGPATH"; then
13893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13894$as_echo "$CYGPATH" >&6; }
13895else
13896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13897$as_echo "no" >&6; }
13898fi
13899
13900
13901  test -n "$CYGPATH" && break
13902done
13903
13904  else
13905    # The variable is set, but is it from the command line or the environment?
13906
13907    # Try to remove the string !CYGPATH! from our list.
13908    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13909    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13910      # If it failed, the variable was not from the command line. Ignore it,
13911      # but warn the user (except for BASH, which is always set by the calling BASH).
13912      if test "xCYGPATH" != xBASH; then
13913        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13914$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13915      fi
13916      # Try to locate tool using the code snippet
13917      for ac_prog in cygpath
13918do
13919  # Extract the first word of "$ac_prog", so it can be a program name with args.
13920set dummy $ac_prog; ac_word=$2
13921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13922$as_echo_n "checking for $ac_word... " >&6; }
13923if ${ac_cv_path_CYGPATH+:} false; then :
13924  $as_echo_n "(cached) " >&6
13925else
13926  case $CYGPATH in
13927  [\\/]* | ?:[\\/]*)
13928  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13929  ;;
13930  *)
13931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13932for as_dir in $PATH
13933do
13934  IFS=$as_save_IFS
13935  test -z "$as_dir" && as_dir=.
13936    for ac_exec_ext in '' $ac_executable_extensions; do
13937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13938    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13940    break 2
13941  fi
13942done
13943  done
13944IFS=$as_save_IFS
13945
13946  ;;
13947esac
13948fi
13949CYGPATH=$ac_cv_path_CYGPATH
13950if test -n "$CYGPATH"; then
13951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13952$as_echo "$CYGPATH" >&6; }
13953else
13954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13955$as_echo "no" >&6; }
13956fi
13957
13958
13959  test -n "$CYGPATH" && break
13960done
13961
13962    else
13963      # If it succeeded, then it was overridden by the user. We will use it
13964      # for the tool.
13965
13966      # First remove it from the list of overridden variables, so we can test
13967      # for unknown variables in the end.
13968      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13969
13970      # Check if we try to supply an empty value
13971      if test "x$CYGPATH" = x; then
13972        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13973$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13974        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13975$as_echo_n "checking for CYGPATH... " >&6; }
13976        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13977$as_echo "disabled" >&6; }
13978      else
13979        # Check if the provided tool contains a complete path.
13980        tool_specified="$CYGPATH"
13981        tool_basename="${tool_specified##*/}"
13982        if test "x$tool_basename" = "x$tool_specified"; then
13983          # A command without a complete path is provided, search $PATH.
13984          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13985$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13986          # Extract the first word of "$tool_basename", so it can be a program name with args.
13987set dummy $tool_basename; ac_word=$2
13988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13989$as_echo_n "checking for $ac_word... " >&6; }
13990if ${ac_cv_path_CYGPATH+:} false; then :
13991  $as_echo_n "(cached) " >&6
13992else
13993  case $CYGPATH in
13994  [\\/]* | ?:[\\/]*)
13995  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13996  ;;
13997  *)
13998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13999for as_dir in $PATH
14000do
14001  IFS=$as_save_IFS
14002  test -z "$as_dir" && as_dir=.
14003    for ac_exec_ext in '' $ac_executable_extensions; do
14004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14005    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14007    break 2
14008  fi
14009done
14010  done
14011IFS=$as_save_IFS
14012
14013  ;;
14014esac
14015fi
14016CYGPATH=$ac_cv_path_CYGPATH
14017if test -n "$CYGPATH"; then
14018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14019$as_echo "$CYGPATH" >&6; }
14020else
14021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14022$as_echo "no" >&6; }
14023fi
14024
14025
14026          if test "x$CYGPATH" = x; then
14027            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14028          fi
14029        else
14030          # Otherwise we believe it is a complete path. Use it as it is.
14031          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14032$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14033          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14034$as_echo_n "checking for CYGPATH... " >&6; }
14035          if test ! -x "$tool_specified"; then
14036            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14037$as_echo "not found" >&6; }
14038            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14039          fi
14040          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14041$as_echo "$tool_specified" >&6; }
14042        fi
14043      fi
14044    fi
14045
14046  fi
14047
14048
14049
14050
14051  # Publish this variable in the help.
14052
14053
14054  if [ -z "${READLINK+x}" ]; then
14055    # The variable is not set by user, try to locate tool using the code snippet
14056    for ac_prog in greadlink readlink
14057do
14058  # Extract the first word of "$ac_prog", so it can be a program name with args.
14059set dummy $ac_prog; ac_word=$2
14060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14061$as_echo_n "checking for $ac_word... " >&6; }
14062if ${ac_cv_path_READLINK+:} false; then :
14063  $as_echo_n "(cached) " >&6
14064else
14065  case $READLINK in
14066  [\\/]* | ?:[\\/]*)
14067  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14068  ;;
14069  *)
14070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14071for as_dir in $PATH
14072do
14073  IFS=$as_save_IFS
14074  test -z "$as_dir" && as_dir=.
14075    for ac_exec_ext in '' $ac_executable_extensions; do
14076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14077    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14079    break 2
14080  fi
14081done
14082  done
14083IFS=$as_save_IFS
14084
14085  ;;
14086esac
14087fi
14088READLINK=$ac_cv_path_READLINK
14089if test -n "$READLINK"; then
14090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14091$as_echo "$READLINK" >&6; }
14092else
14093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14094$as_echo "no" >&6; }
14095fi
14096
14097
14098  test -n "$READLINK" && break
14099done
14100
14101  else
14102    # The variable is set, but is it from the command line or the environment?
14103
14104    # Try to remove the string !READLINK! from our list.
14105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14107      # If it failed, the variable was not from the command line. Ignore it,
14108      # but warn the user (except for BASH, which is always set by the calling BASH).
14109      if test "xREADLINK" != xBASH; then
14110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14111$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14112      fi
14113      # Try to locate tool using the code snippet
14114      for ac_prog in greadlink readlink
14115do
14116  # Extract the first word of "$ac_prog", so it can be a program name with args.
14117set dummy $ac_prog; ac_word=$2
14118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14119$as_echo_n "checking for $ac_word... " >&6; }
14120if ${ac_cv_path_READLINK+:} false; then :
14121  $as_echo_n "(cached) " >&6
14122else
14123  case $READLINK in
14124  [\\/]* | ?:[\\/]*)
14125  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14126  ;;
14127  *)
14128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14129for as_dir in $PATH
14130do
14131  IFS=$as_save_IFS
14132  test -z "$as_dir" && as_dir=.
14133    for ac_exec_ext in '' $ac_executable_extensions; do
14134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14135    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14137    break 2
14138  fi
14139done
14140  done
14141IFS=$as_save_IFS
14142
14143  ;;
14144esac
14145fi
14146READLINK=$ac_cv_path_READLINK
14147if test -n "$READLINK"; then
14148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14149$as_echo "$READLINK" >&6; }
14150else
14151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14152$as_echo "no" >&6; }
14153fi
14154
14155
14156  test -n "$READLINK" && break
14157done
14158
14159    else
14160      # If it succeeded, then it was overridden by the user. We will use it
14161      # for the tool.
14162
14163      # First remove it from the list of overridden variables, so we can test
14164      # for unknown variables in the end.
14165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14166
14167      # Check if we try to supply an empty value
14168      if test "x$READLINK" = x; then
14169        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14170$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14172$as_echo_n "checking for READLINK... " >&6; }
14173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14174$as_echo "disabled" >&6; }
14175      else
14176        # Check if the provided tool contains a complete path.
14177        tool_specified="$READLINK"
14178        tool_basename="${tool_specified##*/}"
14179        if test "x$tool_basename" = "x$tool_specified"; then
14180          # A command without a complete path is provided, search $PATH.
14181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14182$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14183          # Extract the first word of "$tool_basename", so it can be a program name with args.
14184set dummy $tool_basename; ac_word=$2
14185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14186$as_echo_n "checking for $ac_word... " >&6; }
14187if ${ac_cv_path_READLINK+:} false; then :
14188  $as_echo_n "(cached) " >&6
14189else
14190  case $READLINK in
14191  [\\/]* | ?:[\\/]*)
14192  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14193  ;;
14194  *)
14195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14196for as_dir in $PATH
14197do
14198  IFS=$as_save_IFS
14199  test -z "$as_dir" && as_dir=.
14200    for ac_exec_ext in '' $ac_executable_extensions; do
14201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14202    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14204    break 2
14205  fi
14206done
14207  done
14208IFS=$as_save_IFS
14209
14210  ;;
14211esac
14212fi
14213READLINK=$ac_cv_path_READLINK
14214if test -n "$READLINK"; then
14215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14216$as_echo "$READLINK" >&6; }
14217else
14218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14219$as_echo "no" >&6; }
14220fi
14221
14222
14223          if test "x$READLINK" = x; then
14224            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14225          fi
14226        else
14227          # Otherwise we believe it is a complete path. Use it as it is.
14228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14229$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14230          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14231$as_echo_n "checking for READLINK... " >&6; }
14232          if test ! -x "$tool_specified"; then
14233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14234$as_echo "not found" >&6; }
14235            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14236          fi
14237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14238$as_echo "$tool_specified" >&6; }
14239        fi
14240      fi
14241    fi
14242
14243  fi
14244
14245
14246
14247
14248  # Publish this variable in the help.
14249
14250
14251  if [ -z "${DF+x}" ]; then
14252    # The variable is not set by user, try to locate tool using the code snippet
14253    for ac_prog in df
14254do
14255  # Extract the first word of "$ac_prog", so it can be a program name with args.
14256set dummy $ac_prog; ac_word=$2
14257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14258$as_echo_n "checking for $ac_word... " >&6; }
14259if ${ac_cv_path_DF+:} false; then :
14260  $as_echo_n "(cached) " >&6
14261else
14262  case $DF in
14263  [\\/]* | ?:[\\/]*)
14264  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14265  ;;
14266  *)
14267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14268for as_dir in $PATH
14269do
14270  IFS=$as_save_IFS
14271  test -z "$as_dir" && as_dir=.
14272    for ac_exec_ext in '' $ac_executable_extensions; do
14273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14274    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14276    break 2
14277  fi
14278done
14279  done
14280IFS=$as_save_IFS
14281
14282  ;;
14283esac
14284fi
14285DF=$ac_cv_path_DF
14286if test -n "$DF"; then
14287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14288$as_echo "$DF" >&6; }
14289else
14290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14291$as_echo "no" >&6; }
14292fi
14293
14294
14295  test -n "$DF" && break
14296done
14297
14298  else
14299    # The variable is set, but is it from the command line or the environment?
14300
14301    # Try to remove the string !DF! from our list.
14302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14304      # If it failed, the variable was not from the command line. Ignore it,
14305      # but warn the user (except for BASH, which is always set by the calling BASH).
14306      if test "xDF" != xBASH; then
14307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14308$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14309      fi
14310      # Try to locate tool using the code snippet
14311      for ac_prog in df
14312do
14313  # Extract the first word of "$ac_prog", so it can be a program name with args.
14314set dummy $ac_prog; ac_word=$2
14315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14316$as_echo_n "checking for $ac_word... " >&6; }
14317if ${ac_cv_path_DF+:} false; then :
14318  $as_echo_n "(cached) " >&6
14319else
14320  case $DF in
14321  [\\/]* | ?:[\\/]*)
14322  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14323  ;;
14324  *)
14325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14326for as_dir in $PATH
14327do
14328  IFS=$as_save_IFS
14329  test -z "$as_dir" && as_dir=.
14330    for ac_exec_ext in '' $ac_executable_extensions; do
14331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14332    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14334    break 2
14335  fi
14336done
14337  done
14338IFS=$as_save_IFS
14339
14340  ;;
14341esac
14342fi
14343DF=$ac_cv_path_DF
14344if test -n "$DF"; then
14345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14346$as_echo "$DF" >&6; }
14347else
14348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14349$as_echo "no" >&6; }
14350fi
14351
14352
14353  test -n "$DF" && break
14354done
14355
14356    else
14357      # If it succeeded, then it was overridden by the user. We will use it
14358      # for the tool.
14359
14360      # First remove it from the list of overridden variables, so we can test
14361      # for unknown variables in the end.
14362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14363
14364      # Check if we try to supply an empty value
14365      if test "x$DF" = x; then
14366        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14367$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14369$as_echo_n "checking for DF... " >&6; }
14370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14371$as_echo "disabled" >&6; }
14372      else
14373        # Check if the provided tool contains a complete path.
14374        tool_specified="$DF"
14375        tool_basename="${tool_specified##*/}"
14376        if test "x$tool_basename" = "x$tool_specified"; then
14377          # A command without a complete path is provided, search $PATH.
14378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14379$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14380          # Extract the first word of "$tool_basename", so it can be a program name with args.
14381set dummy $tool_basename; ac_word=$2
14382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14383$as_echo_n "checking for $ac_word... " >&6; }
14384if ${ac_cv_path_DF+:} false; then :
14385  $as_echo_n "(cached) " >&6
14386else
14387  case $DF in
14388  [\\/]* | ?:[\\/]*)
14389  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14390  ;;
14391  *)
14392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14393for as_dir in $PATH
14394do
14395  IFS=$as_save_IFS
14396  test -z "$as_dir" && as_dir=.
14397    for ac_exec_ext in '' $ac_executable_extensions; do
14398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14399    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14401    break 2
14402  fi
14403done
14404  done
14405IFS=$as_save_IFS
14406
14407  ;;
14408esac
14409fi
14410DF=$ac_cv_path_DF
14411if test -n "$DF"; then
14412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14413$as_echo "$DF" >&6; }
14414else
14415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14416$as_echo "no" >&6; }
14417fi
14418
14419
14420          if test "x$DF" = x; then
14421            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14422          fi
14423        else
14424          # Otherwise we believe it is a complete path. Use it as it is.
14425          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14426$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14427          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14428$as_echo_n "checking for DF... " >&6; }
14429          if test ! -x "$tool_specified"; then
14430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14431$as_echo "not found" >&6; }
14432            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14433          fi
14434          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14435$as_echo "$tool_specified" >&6; }
14436        fi
14437      fi
14438    fi
14439
14440  fi
14441
14442
14443
14444
14445  # Publish this variable in the help.
14446
14447
14448  if [ -z "${CPIO+x}" ]; then
14449    # The variable is not set by user, try to locate tool using the code snippet
14450    for ac_prog in cpio bsdcpio
14451do
14452  # Extract the first word of "$ac_prog", so it can be a program name with args.
14453set dummy $ac_prog; ac_word=$2
14454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14455$as_echo_n "checking for $ac_word... " >&6; }
14456if ${ac_cv_path_CPIO+:} false; then :
14457  $as_echo_n "(cached) " >&6
14458else
14459  case $CPIO in
14460  [\\/]* | ?:[\\/]*)
14461  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14462  ;;
14463  *)
14464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14465for as_dir in $PATH
14466do
14467  IFS=$as_save_IFS
14468  test -z "$as_dir" && as_dir=.
14469    for ac_exec_ext in '' $ac_executable_extensions; do
14470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14471    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14473    break 2
14474  fi
14475done
14476  done
14477IFS=$as_save_IFS
14478
14479  ;;
14480esac
14481fi
14482CPIO=$ac_cv_path_CPIO
14483if test -n "$CPIO"; then
14484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14485$as_echo "$CPIO" >&6; }
14486else
14487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14488$as_echo "no" >&6; }
14489fi
14490
14491
14492  test -n "$CPIO" && break
14493done
14494
14495  else
14496    # The variable is set, but is it from the command line or the environment?
14497
14498    # Try to remove the string !CPIO! from our list.
14499    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14500    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14501      # If it failed, the variable was not from the command line. Ignore it,
14502      # but warn the user (except for BASH, which is always set by the calling BASH).
14503      if test "xCPIO" != xBASH; then
14504        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14505$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14506      fi
14507      # Try to locate tool using the code snippet
14508      for ac_prog in cpio bsdcpio
14509do
14510  # Extract the first word of "$ac_prog", so it can be a program name with args.
14511set dummy $ac_prog; ac_word=$2
14512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14513$as_echo_n "checking for $ac_word... " >&6; }
14514if ${ac_cv_path_CPIO+:} false; then :
14515  $as_echo_n "(cached) " >&6
14516else
14517  case $CPIO in
14518  [\\/]* | ?:[\\/]*)
14519  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14520  ;;
14521  *)
14522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14523for as_dir in $PATH
14524do
14525  IFS=$as_save_IFS
14526  test -z "$as_dir" && as_dir=.
14527    for ac_exec_ext in '' $ac_executable_extensions; do
14528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14529    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14531    break 2
14532  fi
14533done
14534  done
14535IFS=$as_save_IFS
14536
14537  ;;
14538esac
14539fi
14540CPIO=$ac_cv_path_CPIO
14541if test -n "$CPIO"; then
14542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14543$as_echo "$CPIO" >&6; }
14544else
14545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14546$as_echo "no" >&6; }
14547fi
14548
14549
14550  test -n "$CPIO" && break
14551done
14552
14553    else
14554      # If it succeeded, then it was overridden by the user. We will use it
14555      # for the tool.
14556
14557      # First remove it from the list of overridden variables, so we can test
14558      # for unknown variables in the end.
14559      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14560
14561      # Check if we try to supply an empty value
14562      if test "x$CPIO" = x; then
14563        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14564$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14565        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14566$as_echo_n "checking for CPIO... " >&6; }
14567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14568$as_echo "disabled" >&6; }
14569      else
14570        # Check if the provided tool contains a complete path.
14571        tool_specified="$CPIO"
14572        tool_basename="${tool_specified##*/}"
14573        if test "x$tool_basename" = "x$tool_specified"; then
14574          # A command without a complete path is provided, search $PATH.
14575          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14576$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14577          # Extract the first word of "$tool_basename", so it can be a program name with args.
14578set dummy $tool_basename; ac_word=$2
14579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14580$as_echo_n "checking for $ac_word... " >&6; }
14581if ${ac_cv_path_CPIO+:} false; then :
14582  $as_echo_n "(cached) " >&6
14583else
14584  case $CPIO in
14585  [\\/]* | ?:[\\/]*)
14586  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14587  ;;
14588  *)
14589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14590for as_dir in $PATH
14591do
14592  IFS=$as_save_IFS
14593  test -z "$as_dir" && as_dir=.
14594    for ac_exec_ext in '' $ac_executable_extensions; do
14595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14596    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14598    break 2
14599  fi
14600done
14601  done
14602IFS=$as_save_IFS
14603
14604  ;;
14605esac
14606fi
14607CPIO=$ac_cv_path_CPIO
14608if test -n "$CPIO"; then
14609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14610$as_echo "$CPIO" >&6; }
14611else
14612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14613$as_echo "no" >&6; }
14614fi
14615
14616
14617          if test "x$CPIO" = x; then
14618            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14619          fi
14620        else
14621          # Otherwise we believe it is a complete path. Use it as it is.
14622          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14623$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14624          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14625$as_echo_n "checking for CPIO... " >&6; }
14626          if test ! -x "$tool_specified"; then
14627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14628$as_echo "not found" >&6; }
14629            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14630          fi
14631          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14632$as_echo "$tool_specified" >&6; }
14633        fi
14634      fi
14635    fi
14636
14637  fi
14638
14639
14640
14641
14642  # Publish this variable in the help.
14643
14644
14645  if [ -z "${NICE+x}" ]; then
14646    # The variable is not set by user, try to locate tool using the code snippet
14647    for ac_prog in nice
14648do
14649  # Extract the first word of "$ac_prog", so it can be a program name with args.
14650set dummy $ac_prog; ac_word=$2
14651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14652$as_echo_n "checking for $ac_word... " >&6; }
14653if ${ac_cv_path_NICE+:} false; then :
14654  $as_echo_n "(cached) " >&6
14655else
14656  case $NICE in
14657  [\\/]* | ?:[\\/]*)
14658  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14659  ;;
14660  *)
14661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14662for as_dir in $PATH
14663do
14664  IFS=$as_save_IFS
14665  test -z "$as_dir" && as_dir=.
14666    for ac_exec_ext in '' $ac_executable_extensions; do
14667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14668    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14670    break 2
14671  fi
14672done
14673  done
14674IFS=$as_save_IFS
14675
14676  ;;
14677esac
14678fi
14679NICE=$ac_cv_path_NICE
14680if test -n "$NICE"; then
14681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14682$as_echo "$NICE" >&6; }
14683else
14684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14685$as_echo "no" >&6; }
14686fi
14687
14688
14689  test -n "$NICE" && break
14690done
14691
14692  else
14693    # The variable is set, but is it from the command line or the environment?
14694
14695    # Try to remove the string !NICE! from our list.
14696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14698      # If it failed, the variable was not from the command line. Ignore it,
14699      # but warn the user (except for BASH, which is always set by the calling BASH).
14700      if test "xNICE" != xBASH; then
14701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14702$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14703      fi
14704      # Try to locate tool using the code snippet
14705      for ac_prog in nice
14706do
14707  # Extract the first word of "$ac_prog", so it can be a program name with args.
14708set dummy $ac_prog; ac_word=$2
14709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14710$as_echo_n "checking for $ac_word... " >&6; }
14711if ${ac_cv_path_NICE+:} false; then :
14712  $as_echo_n "(cached) " >&6
14713else
14714  case $NICE in
14715  [\\/]* | ?:[\\/]*)
14716  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14717  ;;
14718  *)
14719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14720for as_dir in $PATH
14721do
14722  IFS=$as_save_IFS
14723  test -z "$as_dir" && as_dir=.
14724    for ac_exec_ext in '' $ac_executable_extensions; do
14725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14726    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14728    break 2
14729  fi
14730done
14731  done
14732IFS=$as_save_IFS
14733
14734  ;;
14735esac
14736fi
14737NICE=$ac_cv_path_NICE
14738if test -n "$NICE"; then
14739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14740$as_echo "$NICE" >&6; }
14741else
14742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14743$as_echo "no" >&6; }
14744fi
14745
14746
14747  test -n "$NICE" && break
14748done
14749
14750    else
14751      # If it succeeded, then it was overridden by the user. We will use it
14752      # for the tool.
14753
14754      # First remove it from the list of overridden variables, so we can test
14755      # for unknown variables in the end.
14756      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14757
14758      # Check if we try to supply an empty value
14759      if test "x$NICE" = x; then
14760        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14761$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14763$as_echo_n "checking for NICE... " >&6; }
14764        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14765$as_echo "disabled" >&6; }
14766      else
14767        # Check if the provided tool contains a complete path.
14768        tool_specified="$NICE"
14769        tool_basename="${tool_specified##*/}"
14770        if test "x$tool_basename" = "x$tool_specified"; then
14771          # A command without a complete path is provided, search $PATH.
14772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14773$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14774          # Extract the first word of "$tool_basename", so it can be a program name with args.
14775set dummy $tool_basename; ac_word=$2
14776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14777$as_echo_n "checking for $ac_word... " >&6; }
14778if ${ac_cv_path_NICE+:} false; then :
14779  $as_echo_n "(cached) " >&6
14780else
14781  case $NICE in
14782  [\\/]* | ?:[\\/]*)
14783  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14784  ;;
14785  *)
14786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14787for as_dir in $PATH
14788do
14789  IFS=$as_save_IFS
14790  test -z "$as_dir" && as_dir=.
14791    for ac_exec_ext in '' $ac_executable_extensions; do
14792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14793    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14795    break 2
14796  fi
14797done
14798  done
14799IFS=$as_save_IFS
14800
14801  ;;
14802esac
14803fi
14804NICE=$ac_cv_path_NICE
14805if test -n "$NICE"; then
14806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14807$as_echo "$NICE" >&6; }
14808else
14809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14810$as_echo "no" >&6; }
14811fi
14812
14813
14814          if test "x$NICE" = x; then
14815            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14816          fi
14817        else
14818          # Otherwise we believe it is a complete path. Use it as it is.
14819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14820$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14821          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14822$as_echo_n "checking for NICE... " >&6; }
14823          if test ! -x "$tool_specified"; then
14824            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14825$as_echo "not found" >&6; }
14826            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14827          fi
14828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14829$as_echo "$tool_specified" >&6; }
14830        fi
14831      fi
14832    fi
14833
14834  fi
14835
14836
14837
14838
14839# Now we can determine OpenJDK build and target platforms. This is required to
14840# have early on.
14841# Make sure we can run config.sub.
14842$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14843  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14844
14845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14846$as_echo_n "checking build system type... " >&6; }
14847if ${ac_cv_build+:} false; then :
14848  $as_echo_n "(cached) " >&6
14849else
14850  ac_build_alias=$build_alias
14851test "x$ac_build_alias" = x &&
14852  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14853test "x$ac_build_alias" = x &&
14854  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14855ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14856  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14857
14858fi
14859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14860$as_echo "$ac_cv_build" >&6; }
14861case $ac_cv_build in
14862*-*-*) ;;
14863*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14864esac
14865build=$ac_cv_build
14866ac_save_IFS=$IFS; IFS='-'
14867set x $ac_cv_build
14868shift
14869build_cpu=$1
14870build_vendor=$2
14871shift; shift
14872# Remember, the first character of IFS is used to create $*,
14873# except with old shells:
14874build_os=$*
14875IFS=$ac_save_IFS
14876case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14877
14878
14879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14880$as_echo_n "checking host system type... " >&6; }
14881if ${ac_cv_host+:} false; then :
14882  $as_echo_n "(cached) " >&6
14883else
14884  if test "x$host_alias" = x; then
14885  ac_cv_host=$ac_cv_build
14886else
14887  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14888    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14889fi
14890
14891fi
14892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14893$as_echo "$ac_cv_host" >&6; }
14894case $ac_cv_host in
14895*-*-*) ;;
14896*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14897esac
14898host=$ac_cv_host
14899ac_save_IFS=$IFS; IFS='-'
14900set x $ac_cv_host
14901shift
14902host_cpu=$1
14903host_vendor=$2
14904shift; shift
14905# Remember, the first character of IFS is used to create $*,
14906# except with old shells:
14907host_os=$*
14908IFS=$ac_save_IFS
14909case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14910
14911
14912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14913$as_echo_n "checking target system type... " >&6; }
14914if ${ac_cv_target+:} false; then :
14915  $as_echo_n "(cached) " >&6
14916else
14917  if test "x$target_alias" = x; then
14918  ac_cv_target=$ac_cv_host
14919else
14920  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14921    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14922fi
14923
14924fi
14925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14926$as_echo "$ac_cv_target" >&6; }
14927case $ac_cv_target in
14928*-*-*) ;;
14929*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14930esac
14931target=$ac_cv_target
14932ac_save_IFS=$IFS; IFS='-'
14933set x $ac_cv_target
14934shift
14935target_cpu=$1
14936target_vendor=$2
14937shift; shift
14938# Remember, the first character of IFS is used to create $*,
14939# except with old shells:
14940target_os=$*
14941IFS=$ac_save_IFS
14942case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14943
14944
14945# The aliases save the names the user supplied, while $host etc.
14946# will get canonicalized.
14947test -n "$target_alias" &&
14948  test "$program_prefix$program_suffix$program_transform_name" = \
14949    NONENONEs,x,x, &&
14950  program_prefix=${target_alias}-
14951
14952  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14953  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14954  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14955  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14956  # to use the configure naming style.
14957
14958
14959
14960
14961
14962  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14963  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14964  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14965  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14966  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14967  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14968
14969
14970
14971  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14972
14973  case "$build_os" in
14974    *linux*)
14975      VAR_OS=linux
14976      VAR_OS_TYPE=unix
14977      ;;
14978    *solaris*)
14979      VAR_OS=solaris
14980      VAR_OS_TYPE=unix
14981      ;;
14982    *darwin*)
14983      VAR_OS=macosx
14984      VAR_OS_TYPE=unix
14985      ;;
14986    *bsd*)
14987      VAR_OS=bsd
14988      VAR_OS_TYPE=unix
14989      ;;
14990    *cygwin*)
14991      VAR_OS=windows
14992      VAR_OS_ENV=windows.cygwin
14993      ;;
14994    *mingw*)
14995      VAR_OS=windows
14996      VAR_OS_ENV=windows.msys
14997      ;;
14998    *aix*)
14999      VAR_OS=aix
15000      VAR_OS_TYPE=unix
15001      ;;
15002    *)
15003      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15004      ;;
15005  esac
15006
15007
15008  # First argument is the cpu name from the trip/quad
15009  case "$build_cpu" in
15010    x86_64)
15011      VAR_CPU=x86_64
15012      VAR_CPU_ARCH=x86
15013      VAR_CPU_BITS=64
15014      VAR_CPU_ENDIAN=little
15015      ;;
15016    i?86)
15017      VAR_CPU=x86
15018      VAR_CPU_ARCH=x86
15019      VAR_CPU_BITS=32
15020      VAR_CPU_ENDIAN=little
15021      ;;
15022    arm*)
15023      VAR_CPU=arm
15024      VAR_CPU_ARCH=arm
15025      VAR_CPU_BITS=32
15026      VAR_CPU_ENDIAN=little
15027      ;;
15028    aarch64)
15029      VAR_CPU=aarch64
15030      VAR_CPU_ARCH=aarch64
15031      VAR_CPU_BITS=64
15032      VAR_CPU_ENDIAN=little
15033      ;;
15034    powerpc)
15035      VAR_CPU=ppc
15036      VAR_CPU_ARCH=ppc
15037      VAR_CPU_BITS=32
15038      VAR_CPU_ENDIAN=big
15039      ;;
15040    powerpc64)
15041      VAR_CPU=ppc64
15042      VAR_CPU_ARCH=ppc
15043      VAR_CPU_BITS=64
15044      VAR_CPU_ENDIAN=big
15045      ;;
15046    powerpc64le)
15047      VAR_CPU=ppc64le
15048      VAR_CPU_ARCH=ppc
15049      VAR_CPU_BITS=64
15050      VAR_CPU_ENDIAN=little
15051      ;;
15052    s390)
15053      VAR_CPU=s390
15054      VAR_CPU_ARCH=s390
15055      VAR_CPU_BITS=32
15056      VAR_CPU_ENDIAN=big
15057      ;;
15058    s390x)
15059      VAR_CPU=s390x
15060      VAR_CPU_ARCH=s390
15061      VAR_CPU_BITS=64
15062      VAR_CPU_ENDIAN=big
15063      ;;
15064    sparc)
15065      VAR_CPU=sparc
15066      VAR_CPU_ARCH=sparc
15067      VAR_CPU_BITS=32
15068      VAR_CPU_ENDIAN=big
15069      ;;
15070    sparcv9|sparc64)
15071      VAR_CPU=sparcv9
15072      VAR_CPU_ARCH=sparc
15073      VAR_CPU_BITS=64
15074      VAR_CPU_ENDIAN=big
15075      ;;
15076    *)
15077      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15078      ;;
15079  esac
15080
15081  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15082  OPENJDK_BUILD_OS="$VAR_OS"
15083  if test "x$VAR_OS_TYPE" != x; then
15084    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15085  else
15086    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15087  fi
15088  if test "x$VAR_OS_ENV" != x; then
15089    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15090  else
15091    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15092  fi
15093  OPENJDK_BUILD_CPU="$VAR_CPU"
15094  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15095  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15096  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15097
15098
15099
15100
15101
15102
15103
15104
15105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15106$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15108$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15109
15110  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15111
15112  case "$host_os" in
15113    *linux*)
15114      VAR_OS=linux
15115      VAR_OS_TYPE=unix
15116      ;;
15117    *solaris*)
15118      VAR_OS=solaris
15119      VAR_OS_TYPE=unix
15120      ;;
15121    *darwin*)
15122      VAR_OS=macosx
15123      VAR_OS_TYPE=unix
15124      ;;
15125    *bsd*)
15126      VAR_OS=bsd
15127      VAR_OS_TYPE=unix
15128      ;;
15129    *cygwin*)
15130      VAR_OS=windows
15131      VAR_OS_ENV=windows.cygwin
15132      ;;
15133    *mingw*)
15134      VAR_OS=windows
15135      VAR_OS_ENV=windows.msys
15136      ;;
15137    *aix*)
15138      VAR_OS=aix
15139      VAR_OS_TYPE=unix
15140      ;;
15141    *)
15142      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15143      ;;
15144  esac
15145
15146
15147  # First argument is the cpu name from the trip/quad
15148  case "$host_cpu" in
15149    x86_64)
15150      VAR_CPU=x86_64
15151      VAR_CPU_ARCH=x86
15152      VAR_CPU_BITS=64
15153      VAR_CPU_ENDIAN=little
15154      ;;
15155    i?86)
15156      VAR_CPU=x86
15157      VAR_CPU_ARCH=x86
15158      VAR_CPU_BITS=32
15159      VAR_CPU_ENDIAN=little
15160      ;;
15161    arm*)
15162      VAR_CPU=arm
15163      VAR_CPU_ARCH=arm
15164      VAR_CPU_BITS=32
15165      VAR_CPU_ENDIAN=little
15166      ;;
15167    aarch64)
15168      VAR_CPU=aarch64
15169      VAR_CPU_ARCH=aarch64
15170      VAR_CPU_BITS=64
15171      VAR_CPU_ENDIAN=little
15172      ;;
15173    powerpc)
15174      VAR_CPU=ppc
15175      VAR_CPU_ARCH=ppc
15176      VAR_CPU_BITS=32
15177      VAR_CPU_ENDIAN=big
15178      ;;
15179    powerpc64)
15180      VAR_CPU=ppc64
15181      VAR_CPU_ARCH=ppc
15182      VAR_CPU_BITS=64
15183      VAR_CPU_ENDIAN=big
15184      ;;
15185    powerpc64le)
15186      VAR_CPU=ppc64le
15187      VAR_CPU_ARCH=ppc
15188      VAR_CPU_BITS=64
15189      VAR_CPU_ENDIAN=little
15190      ;;
15191    s390)
15192      VAR_CPU=s390
15193      VAR_CPU_ARCH=s390
15194      VAR_CPU_BITS=32
15195      VAR_CPU_ENDIAN=big
15196      ;;
15197    s390x)
15198      VAR_CPU=s390x
15199      VAR_CPU_ARCH=s390
15200      VAR_CPU_BITS=64
15201      VAR_CPU_ENDIAN=big
15202      ;;
15203    sparc)
15204      VAR_CPU=sparc
15205      VAR_CPU_ARCH=sparc
15206      VAR_CPU_BITS=32
15207      VAR_CPU_ENDIAN=big
15208      ;;
15209    sparcv9|sparc64)
15210      VAR_CPU=sparcv9
15211      VAR_CPU_ARCH=sparc
15212      VAR_CPU_BITS=64
15213      VAR_CPU_ENDIAN=big
15214      ;;
15215    *)
15216      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15217      ;;
15218  esac
15219
15220  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15221  OPENJDK_TARGET_OS="$VAR_OS"
15222  if test "x$VAR_OS_TYPE" != x; then
15223    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15224  else
15225    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15226  fi
15227  if test "x$VAR_OS_ENV" != x; then
15228    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15229  else
15230    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15231  fi
15232  OPENJDK_TARGET_CPU="$VAR_CPU"
15233  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15234  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15235  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15236
15237
15238
15239
15240
15241
15242
15243
15244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15245$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15247$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15248
15249
15250
15251# Check whether --with-target-bits was given.
15252if test "${with_target_bits+set}" = set; then :
15253  withval=$with_target_bits;
15254fi
15255
15256
15257  # We have three types of compiles:
15258  # native  == normal compilation, target system == build system
15259  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15260  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15261  #
15262  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15263    # We're doing a proper cross-compilation
15264    COMPILE_TYPE="cross"
15265  else
15266    COMPILE_TYPE="native"
15267  fi
15268
15269  if test "x$with_target_bits" != x; then
15270    if test "x$COMPILE_TYPE" = "xcross"; then
15271      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15272    fi
15273
15274    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15275      # A reduced build is requested
15276      COMPILE_TYPE="reduced"
15277      OPENJDK_TARGET_CPU_BITS=32
15278      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15279        OPENJDK_TARGET_CPU=x86
15280      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15281        OPENJDK_TARGET_CPU=sparc
15282      else
15283        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15284      fi
15285    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15286      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
15287    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15288      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15289$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15290    else
15291      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15292    fi
15293  fi
15294
15295
15296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15297$as_echo_n "checking compilation type... " >&6; }
15298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15299$as_echo "$COMPILE_TYPE" >&6; }
15300
15301
15302  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15303    REQUIRED_OS_NAME=SunOS
15304    REQUIRED_OS_VERSION=5.10
15305  fi
15306  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15307    REQUIRED_OS_NAME=Linux
15308    REQUIRED_OS_VERSION=2.6
15309  fi
15310  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15311    REQUIRED_OS_NAME=Windows
15312    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15313      REQUIRED_OS_VERSION=5.2
15314    else
15315      REQUIRED_OS_VERSION=5.1
15316    fi
15317  fi
15318  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15319    REQUIRED_OS_NAME=Darwin
15320    REQUIRED_OS_VERSION=11.2
15321  fi
15322  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15323    REQUIRED_OS_NAME=AIX
15324    REQUIRED_OS_VERSION=7.1
15325  fi
15326
15327
15328
15329
15330
15331
15332  # Also store the legacy naming of the cpu.
15333  # Ie i586 and amd64 instead of x86 and x86_64
15334  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15335  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15336    OPENJDK_TARGET_CPU_LEGACY="i586"
15337  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15338    # On all platforms except MacOSX replace x86_64 with amd64.
15339    OPENJDK_TARGET_CPU_LEGACY="amd64"
15340  fi
15341
15342
15343  # And the second legacy naming of the cpu.
15344  # Ie i386 and amd64 instead of x86 and x86_64.
15345  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15346  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15347    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15348  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15349    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15350  fi
15351
15352
15353  # This is the name of the cpu (but using i386 and amd64 instead of
15354  # x86 and x86_64, respectively), preceeded by a /, to be used when
15355  # locating libraries. On macosx, it's empty, though.
15356  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15357  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15358    OPENJDK_TARGET_CPU_LIBDIR=""
15359  fi
15360
15361
15362  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15363  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15364  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15365  OPENJDK_TARGET_CPU_ISADIR=""
15366  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15367    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15368      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15369    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15370      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15371    fi
15372  fi
15373
15374
15375  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15376  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15377  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15378    # On linux only, we replace x86 with i386.
15379    OPENJDK_TARGET_CPU_OSARCH="i386"
15380  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15381    # On all platforms except macosx, we replace x86_64 with amd64.
15382    OPENJDK_TARGET_CPU_OSARCH="amd64"
15383  fi
15384
15385
15386  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15387  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15388    OPENJDK_TARGET_CPU_JLI="i386"
15389  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15390    # On all platforms except macosx, we replace x86_64 with amd64.
15391    OPENJDK_TARGET_CPU_JLI="amd64"
15392  fi
15393  # Now setup the -D flags for building libjli.
15394  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15395  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15396    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15397      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15398    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15399      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15400    fi
15401  fi
15402
15403
15404  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15405      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15406  else
15407      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15408  fi
15409
15410
15411  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15412    A_LP64="LP64:="
15413    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15414    # unpack200.exe
15415    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15416      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15417    fi
15418  fi
15419  LP64=$A_LP64
15420
15421
15422  if test "x$COMPILE_TYPE" = "xcross"; then
15423    # FIXME: ... or should this include reduced builds..?
15424    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15425  else
15426    DEFINE_CROSS_COMPILE_ARCH=""
15427  fi
15428
15429
15430  # Convert openjdk platform names to hotspot names
15431
15432  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15433  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15434    HOTSPOT_TARGET_OS=bsd
15435  fi
15436
15437
15438  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15439  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15440    HOTSPOT_TARGET_OS_TYPE=posix
15441  fi
15442
15443
15444  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15445  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15446    HOTSPOT_TARGET_CPU=x86_32
15447  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15448    HOTSPOT_TARGET_CPU=sparc
15449  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15450    HOTSPOT_TARGET_CPU=ppc_64
15451  fi
15452
15453
15454  # This is identical with OPENJDK_*, but define anyway for consistency.
15455  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15456
15457
15458  # Setup HOTSPOT_TARGET_CPU_DEFINE
15459  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15460    HOTSPOT_TARGET_CPU_DEFINE=IA32
15461  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15462    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15463  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15464    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15465  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15466    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15467  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15468    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15469
15470  # The cpu defines below are for zero, we don't support them directly.
15471  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15472    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15473  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15474    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15475  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15476    HOTSPOT_TARGET_CPU_DEFINE=S390
15477  elif test "x$OPENJDK_TARGET_CPU" = ss390x; then
15478    HOTSPOT_TARGET_CPU_DEFINE=S390
15479  fi
15480
15481
15482
15483
15484  # Also store the legacy naming of the cpu.
15485  # Ie i586 and amd64 instead of x86 and x86_64
15486  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15487  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15488    OPENJDK_BUILD_CPU_LEGACY="i586"
15489  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15490    # On all platforms except MacOSX replace x86_64 with amd64.
15491    OPENJDK_BUILD_CPU_LEGACY="amd64"
15492  fi
15493
15494
15495  # And the second legacy naming of the cpu.
15496  # Ie i386 and amd64 instead of x86 and x86_64.
15497  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15498  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15499    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15500  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15501    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15502  fi
15503
15504
15505  # This is the name of the cpu (but using i386 and amd64 instead of
15506  # x86 and x86_64, respectively), preceeded by a /, to be used when
15507  # locating libraries. On macosx, it's empty, though.
15508  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15509  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15510    OPENJDK_BUILD_CPU_LIBDIR=""
15511  fi
15512
15513
15514  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15515  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15516  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15517  OPENJDK_BUILD_CPU_ISADIR=""
15518  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15519    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15520      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15521    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15522      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15523    fi
15524  fi
15525
15526
15527  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15528  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15529  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15530    # On linux only, we replace x86 with i386.
15531    OPENJDK_BUILD_CPU_OSARCH="i386"
15532  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15533    # On all platforms except macosx, we replace x86_64 with amd64.
15534    OPENJDK_BUILD_CPU_OSARCH="amd64"
15535  fi
15536
15537
15538  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15539  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15540    OPENJDK_BUILD_CPU_JLI="i386"
15541  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15542    # On all platforms except macosx, we replace x86_64 with amd64.
15543    OPENJDK_BUILD_CPU_JLI="amd64"
15544  fi
15545  # Now setup the -D flags for building libjli.
15546  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
15547  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15548    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
15549      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15550    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
15551      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15552    fi
15553  fi
15554
15555
15556  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15557      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
15558  else
15559      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
15560  fi
15561
15562
15563  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
15564    A_LP64="LP64:="
15565    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15566    # unpack200.exe
15567    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
15568      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
15569    fi
15570  fi
15571  LP64=$A_LP64
15572
15573
15574  if test "x$COMPILE_TYPE" = "xcross"; then
15575    # FIXME: ... or should this include reduced builds..?
15576    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
15577  else
15578    DEFINE_CROSS_COMPILE_ARCH=""
15579  fi
15580
15581
15582  # Convert openjdk platform names to hotspot names
15583
15584  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
15585  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15586    HOTSPOT_BUILD_OS=bsd
15587  fi
15588
15589
15590  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
15591  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
15592    HOTSPOT_BUILD_OS_TYPE=posix
15593  fi
15594
15595
15596  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
15597  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15598    HOTSPOT_BUILD_CPU=x86_32
15599  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15600    HOTSPOT_BUILD_CPU=sparc
15601  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15602    HOTSPOT_BUILD_CPU=ppc_64
15603  fi
15604
15605
15606  # This is identical with OPENJDK_*, but define anyway for consistency.
15607  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
15608
15609
15610  # Setup HOTSPOT_BUILD_CPU_DEFINE
15611  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15612    HOTSPOT_BUILD_CPU_DEFINE=IA32
15613  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15614    HOTSPOT_BUILD_CPU_DEFINE=AMD64
15615  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15616    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15617  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
15618    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
15619  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15620    HOTSPOT_BUILD_CPU_DEFINE=PPC64
15621
15622  # The cpu defines below are for zero, we don't support them directly.
15623  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
15624    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15625  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
15626    HOTSPOT_BUILD_CPU_DEFINE=PPC32
15627  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
15628    HOTSPOT_BUILD_CPU_DEFINE=S390
15629  elif test "x$OPENJDK_BUILD_CPU" = ss390x; then
15630    HOTSPOT_BUILD_CPU_DEFINE=S390
15631  fi
15632
15633
15634
15635
15636  # ZERO_ARCHDEF is used to enable architecture-specific code.
15637  # This is used in legacy hotspot build.
15638  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
15639
15640
15641
15642
15643
15644# Continue setting up basic stuff. Most remaining code require fundamental tools.
15645
15646  # Save the current directory this script was started from
15647  CURDIR="$PWD"
15648
15649  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15650  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15651  # was not available at that time.
15652  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15653  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15654    ORIGINAL_PATH="$REWRITTEN_PATH"
15655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15656$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15657  fi
15658
15659  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15660    PATH_SEP=";"
15661
15662  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15663  if test $SRC_ROOT_LENGTH -gt 100; then
15664    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15665  fi
15666
15667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15669$as_echo_n "checking cygwin release... " >&6; }
15670    CYGWIN_VERSION=`$UNAME -r`
15671    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15672$as_echo "$CYGWIN_VERSION" >&6; }
15673    WINDOWS_ENV_VENDOR='cygwin'
15674    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15675
15676    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15677    if test "x$CYGWIN_VERSION_OLD" != x; then
15678      { $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
15679$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;}
15680      as_fn_error $? "Cannot continue" "$LINENO" 5
15681    fi
15682    if test "x$CYGPATH" = x; then
15683      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15684    fi
15685    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15686$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15687    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15688    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15689    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15690    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15691    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15692$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15693    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15694    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15695    if test "x$test_cygdrive_prefix" = x; then
15696      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15697    fi
15698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15699    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15700$as_echo_n "checking msys release... " >&6; }
15701    MSYS_VERSION=`$UNAME -r`
15702    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15703$as_echo "$MSYS_VERSION" >&6; }
15704
15705    WINDOWS_ENV_VENDOR='msys'
15706    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15707
15708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15709$as_echo_n "checking msys 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    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15712
15713  windows_path="$MSYS_ROOT_PATH"
15714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15715    unix_path=`$CYGPATH -u "$windows_path"`
15716    MSYS_ROOT_PATH="$unix_path"
15717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15719    MSYS_ROOT_PATH="$unix_path"
15720  fi
15721
15722    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15723$as_echo "$MSYS_ROOT_PATH" >&6; }
15724    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15725  else
15726    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15727  fi
15728
15729  # Test if windows or unix (cygwin/msys) find is first in path.
15730  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15731$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15732  FIND_BINARY_OUTPUT=`find --version 2>&1`
15733  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15735$as_echo "unix style" >&6; }
15736  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15737    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15738$as_echo "Windows" >&6; }
15739    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15740$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15741    { $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
15742$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15743    as_fn_error $? "Cannot continue" "$LINENO" 5
15744  else
15745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15746$as_echo "unknown" >&6; }
15747    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15748$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15749  fi
15750
15751  else
15752    PATH_SEP=":"
15753  fi
15754
15755
15756  # We get the top-level directory from the supporting wrappers.
15757  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15758$as_echo_n "checking for top-level directory... " >&6; }
15759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15760$as_echo "$TOPDIR" >&6; }
15761
15762
15763  # Save the original version of TOPDIR for string comparisons
15764  ORIGINAL_TOPDIR="$TOPDIR"
15765
15766
15767  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15768
15769  # Only process if variable expands to non-empty
15770
15771  if test "x$CURDIR" != x; then
15772    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15773
15774  # Input might be given as Windows format, start by converting to
15775  # unix format.
15776  path="$CURDIR"
15777  new_path=`$CYGPATH -u "$path"`
15778
15779  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15780  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15781  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15782  # "foo.exe" is OK but "foo" is an error.
15783  #
15784  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15785  # It is also a way to make sure we got the proper file name for the real test later on.
15786  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15787  if test "x$test_shortpath" = x; then
15788    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15789$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15790    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15791  fi
15792
15793  # Call helper function which possibly converts this using DOS-style short mode.
15794  # If so, the updated path is stored in $new_path.
15795
15796  input_path="$new_path"
15797  # Check if we need to convert this using DOS-style short mode. If the path
15798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15799  # take no chances and rewrite it.
15800  # Note: m4 eats our [], so we need to use [ and ] instead.
15801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15802  if test "x$has_forbidden_chars" != x; then
15803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15804    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15805    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15806    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15807      # Going to short mode and back again did indeed matter. Since short mode is
15808      # case insensitive, let's make it lowercase to improve readability.
15809      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15810      # Now convert it back to Unix-style (cygpath)
15811      input_path=`$CYGPATH -u "$shortmode_path"`
15812      new_path="$input_path"
15813    fi
15814  fi
15815
15816  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15817  if test "x$test_cygdrive_prefix" = x; then
15818    # As a simple fix, exclude /usr/bin since it's not a real path.
15819    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15820      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15821      # a path prefixed by /cygdrive for fixpath to work.
15822      new_path="$CYGWIN_ROOT_PATH$input_path"
15823    fi
15824  fi
15825
15826
15827  if test "x$path" != "x$new_path"; then
15828    CURDIR="$new_path"
15829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15830$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15831  fi
15832
15833    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15834
15835  path="$CURDIR"
15836  has_colon=`$ECHO $path | $GREP ^.:`
15837  new_path="$path"
15838  if test "x$has_colon" = x; then
15839    # Not in mixed or Windows style, start by that.
15840    new_path=`cmd //c echo $path`
15841  fi
15842
15843
15844  input_path="$new_path"
15845  # Check if we need to convert this using DOS-style short mode. If the path
15846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15847  # take no chances and rewrite it.
15848  # Note: m4 eats our [], so we need to use [ and ] instead.
15849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15850  if test "x$has_forbidden_chars" != x; then
15851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15852    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15853  fi
15854
15855
15856  windows_path="$new_path"
15857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15858    unix_path=`$CYGPATH -u "$windows_path"`
15859    new_path="$unix_path"
15860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15862    new_path="$unix_path"
15863  fi
15864
15865  if test "x$path" != "x$new_path"; then
15866    CURDIR="$new_path"
15867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15868$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15869  fi
15870
15871  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15872  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15873
15874    else
15875      # We're on a unix platform. Hooray! :)
15876      path="$CURDIR"
15877      has_space=`$ECHO "$path" | $GREP " "`
15878      if test "x$has_space" != x; then
15879        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15880$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15881        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15882      fi
15883
15884      # Use eval to expand a potential ~
15885      eval path="$path"
15886      if test ! -f "$path" && test ! -d "$path"; then
15887        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15888      fi
15889
15890      if test -d "$path"; then
15891        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15892      else
15893        dir="`$DIRNAME "$path"`"
15894        base="`$BASENAME "$path"`"
15895        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15896      fi
15897    fi
15898  fi
15899
15900
15901  # Only process if variable expands to non-empty
15902
15903  if test "x$TOPDIR" != x; then
15904    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15905
15906  # Input might be given as Windows format, start by converting to
15907  # unix format.
15908  path="$TOPDIR"
15909  new_path=`$CYGPATH -u "$path"`
15910
15911  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15912  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15913  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15914  # "foo.exe" is OK but "foo" is an error.
15915  #
15916  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15917  # It is also a way to make sure we got the proper file name for the real test later on.
15918  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15919  if test "x$test_shortpath" = x; then
15920    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15921$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15922    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15923  fi
15924
15925  # Call helper function which possibly converts this using DOS-style short mode.
15926  # If so, the updated path is stored in $new_path.
15927
15928  input_path="$new_path"
15929  # Check if we need to convert this using DOS-style short mode. If the path
15930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15931  # take no chances and rewrite it.
15932  # Note: m4 eats our [], so we need to use [ and ] instead.
15933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15934  if test "x$has_forbidden_chars" != x; then
15935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15939      # Going to short mode and back again did indeed matter. Since short mode is
15940      # case insensitive, let's make it lowercase to improve readability.
15941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15942      # Now convert it back to Unix-style (cygpath)
15943      input_path=`$CYGPATH -u "$shortmode_path"`
15944      new_path="$input_path"
15945    fi
15946  fi
15947
15948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15949  if test "x$test_cygdrive_prefix" = x; then
15950    # As a simple fix, exclude /usr/bin since it's not a real path.
15951    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15953      # a path prefixed by /cygdrive for fixpath to work.
15954      new_path="$CYGWIN_ROOT_PATH$input_path"
15955    fi
15956  fi
15957
15958
15959  if test "x$path" != "x$new_path"; then
15960    TOPDIR="$new_path"
15961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15962$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15963  fi
15964
15965    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15966
15967  path="$TOPDIR"
15968  has_colon=`$ECHO $path | $GREP ^.:`
15969  new_path="$path"
15970  if test "x$has_colon" = x; then
15971    # Not in mixed or Windows style, start by that.
15972    new_path=`cmd //c echo $path`
15973  fi
15974
15975
15976  input_path="$new_path"
15977  # Check if we need to convert this using DOS-style short mode. If the path
15978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15979  # take no chances and rewrite it.
15980  # Note: m4 eats our [], so we need to use [ and ] instead.
15981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15982  if test "x$has_forbidden_chars" != x; then
15983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15984    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15985  fi
15986
15987
15988  windows_path="$new_path"
15989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15990    unix_path=`$CYGPATH -u "$windows_path"`
15991    new_path="$unix_path"
15992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15994    new_path="$unix_path"
15995  fi
15996
15997  if test "x$path" != "x$new_path"; then
15998    TOPDIR="$new_path"
15999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16000$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16001  fi
16002
16003  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16004  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16005
16006    else
16007      # We're on a unix platform. Hooray! :)
16008      path="$TOPDIR"
16009      has_space=`$ECHO "$path" | $GREP " "`
16010      if test "x$has_space" != x; then
16011        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16012$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16013        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16014      fi
16015
16016      # Use eval to expand a potential ~
16017      eval path="$path"
16018      if test ! -f "$path" && test ! -d "$path"; then
16019        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16020      fi
16021
16022      if test -d "$path"; then
16023        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16024      else
16025        dir="`$DIRNAME "$path"`"
16026        base="`$BASENAME "$path"`"
16027        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16028      fi
16029    fi
16030  fi
16031
16032  # SRC_ROOT is a traditional alias for TOPDIR.
16033  SRC_ROOT=$TOPDIR
16034
16035  # Calculate a canonical version of TOPDIR for string comparisons
16036  CANONICAL_TOPDIR=$TOPDIR
16037
16038  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16039    # Follow a chain of symbolic links. Use readlink
16040    # where it exists, else fall back to horribly
16041    # complicated shell code.
16042    if test "x$READLINK_TESTED" != yes; then
16043      # On MacOSX there is a readlink tool with a different
16044      # purpose than the GNU readlink tool. Check the found readlink.
16045      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16046      if test "x$ISGNU" = x; then
16047        # A readlink that we do not know how to use.
16048        # Are there other non-GNU readlinks out there?
16049        READLINK_TESTED=yes
16050        READLINK=
16051      fi
16052    fi
16053
16054    if test "x$READLINK" != x; then
16055      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16056    else
16057      # Save the current directory for restoring afterwards
16058      STARTDIR=$PWD
16059      COUNTER=0
16060      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16061      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16062      cd $sym_link_dir
16063      # Use -P flag to resolve symlinks in directories.
16064      cd `$THEPWDCMD -P`
16065      sym_link_dir=`$THEPWDCMD -P`
16066      # Resolve file symlinks
16067      while test $COUNTER -lt 20; do
16068        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16069        if test "x$ISLINK" == x; then
16070          # This is not a symbolic link! We are done!
16071          break
16072        fi
16073        # Again resolve directory symlinks since the target of the just found
16074        # link could be in a different directory
16075        cd `$DIRNAME $ISLINK`
16076        sym_link_dir=`$THEPWDCMD -P`
16077        sym_link_file=`$BASENAME $ISLINK`
16078        let COUNTER=COUNTER+1
16079      done
16080      cd $STARTDIR
16081      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16082    fi
16083  fi
16084
16085
16086
16087  # Locate the directory of this script.
16088  AUTOCONF_DIR=$TOPDIR/common/autoconf
16089
16090  # Setup username (for use in adhoc version strings etc)
16091  # Outer [ ] to quote m4.
16092   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16093
16094
16095
16096# Check if it's a pure open build or if custom sources are to be used.
16097
16098  # Check whether --enable-openjdk-only was given.
16099if test "${enable_openjdk_only+set}" = set; then :
16100  enableval=$enable_openjdk_only;
16101else
16102  enable_openjdk_only="no"
16103fi
16104
16105
16106  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
16107$as_echo_n "checking for presence of closed sources... " >&6; }
16108  if test -d "$SRC_ROOT/jdk/src/closed"; then
16109    CLOSED_SOURCE_PRESENT=yes
16110  else
16111    CLOSED_SOURCE_PRESENT=no
16112  fi
16113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
16114$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
16115
16116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
16117$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
16118  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
16119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
16120$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
16121
16122  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
16123    OPENJDK=true
16124    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16125      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
16126$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
16127    fi
16128  else
16129    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16130      OPENJDK=true
16131    else
16132      OPENJDK=false
16133    fi
16134  fi
16135
16136  if test "x$OPENJDK" = "xtrue"; then
16137    SET_OPENJDK="OPENJDK=true"
16138  fi
16139
16140
16141
16142  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16143  # the IncludeCustomExtension macro.
16144
16145
16146# Check whether --with-custom-make-dir was given.
16147if test "${with_custom_make_dir+set}" = set; then :
16148  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
16149$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16150fi
16151
16152
16153
16154
16155# These are needed to be able to create a configuration name (and thus the output directory)
16156
16157  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16158$as_echo_n "checking which variant of the JDK to build... " >&6; }
16159
16160# Check whether --with-jdk-variant was given.
16161if test "${with_jdk_variant+set}" = set; then :
16162  withval=$with_jdk_variant;
16163fi
16164
16165
16166  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16167    JDK_VARIANT="normal"
16168  else
16169    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16170  fi
16171
16172
16173
16174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16175$as_echo "$JDK_VARIANT" >&6; }
16176
16177
16178  DEBUG_LEVEL="release"
16179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16180$as_echo_n "checking which debug level to use... " >&6; }
16181  # Check whether --enable-debug was given.
16182if test "${enable_debug+set}" = set; then :
16183  enableval=$enable_debug;
16184        ENABLE_DEBUG="${enableval}"
16185        DEBUG_LEVEL="fastdebug"
16186
16187else
16188  ENABLE_DEBUG="no"
16189fi
16190
16191
16192
16193# Check whether --with-debug-level was given.
16194if test "${with_debug_level+set}" = set; then :
16195  withval=$with_debug_level;
16196        DEBUG_LEVEL="${withval}"
16197        if test "x$ENABLE_DEBUG" = xyes; then
16198          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16199        fi
16200
16201fi
16202
16203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16204$as_echo "$DEBUG_LEVEL" >&6; }
16205
16206  if test "x$DEBUG_LEVEL" != xrelease && \
16207      test "x$DEBUG_LEVEL" != xoptimized && \
16208      test "x$DEBUG_LEVEL" != xfastdebug && \
16209      test "x$DEBUG_LEVEL" != xslowdebug; then
16210    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16211  fi
16212
16213  # Translate DEBUG_LEVEL to debug level used by Hotspot
16214  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16215  if test "x$DEBUG_LEVEL" = xrelease; then
16216    HOTSPOT_DEBUG_LEVEL="product"
16217  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16218    HOTSPOT_DEBUG_LEVEL="debug"
16219  fi
16220
16221  if test "x$DEBUG_LEVEL" = xoptimized; then
16222    # The debug level 'optimized' is a little special because it is currently only
16223    # applicable to the HotSpot build where it means to build a completely
16224    # optimized version of the VM without any debugging code (like for the
16225    # 'release' debug level which is called 'product' in the HotSpot build) but
16226    # with the exception that it can contain additional code which is otherwise
16227    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16228    # test new and/or experimental features which are not intended for customer
16229    # shipment. Because these new features need to be tested and benchmarked in
16230    # real world scenarios, we want to build the containing JDK at the 'release'
16231    # debug level.
16232    DEBUG_LEVEL="release"
16233  fi
16234
16235
16236
16237
16238
16239
16240# Check whether --with-jvm-variants was given.
16241if test "${with_jvm_variants+set}" = set; then :
16242  withval=$with_jvm_variants;
16243fi
16244
16245
16246  if test "x$with_jvm_variants" = x; then
16247    with_jvm_variants="server"
16248  fi
16249  JVM_VARIANTS_OPT="$with_jvm_variants"
16250
16251  # Has the user listed more than one variant?
16252  # Additional [] needed to keep m4 from mangling shell constructs.
16253  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16254    BUILDING_MULTIPLE_JVM_VARIANTS=true
16255  else
16256    BUILDING_MULTIPLE_JVM_VARIANTS=false
16257  fi
16258  # Replace the commas with AND for use in the build directory name.
16259  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16260
16261  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16262$as_echo_n "checking which variants of the JVM to build... " >&6; }
16263  # JVM_VARIANTS is a space-separated list.
16264  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16265  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16267$as_echo "$JVM_VARIANTS" >&6; }
16268
16269  # Check that the selected variants are valid
16270
16271  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16272  INVALID_VARIANTS=`$GREP -Fvx "${VALID_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
16273  if test "x$INVALID_VARIANTS" != x; then
16274    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16275$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16276    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16277  fi
16278
16279  # All "special" variants share the same output directory ("server")
16280  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16281  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
16282  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16283    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16284  fi
16285
16286
16287
16288
16289  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16290    # zero behaves as a platform and rewrites these values. This is really weird. :(
16291    # We are guaranteed that we do not build any other variants when building zero.
16292    HOTSPOT_TARGET_CPU=zero
16293    HOTSPOT_TARGET_CPU_ARCH=zero
16294  fi
16295
16296
16297# With basic setup done, call the custom early hook.
16298
16299
16300# Check if we have devkits, extra paths or sysroot set.
16301
16302
16303# Check whether --with-devkit was given.
16304if test "${with_devkit+set}" = set; then :
16305  withval=$with_devkit;
16306
16307  # Only process if variable expands to non-empty
16308
16309  if test "x$with_devkit" != x; then
16310    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16311
16312  # Input might be given as Windows format, start by converting to
16313  # unix format.
16314  path="$with_devkit"
16315  new_path=`$CYGPATH -u "$path"`
16316
16317  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16318  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16319  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16320  # "foo.exe" is OK but "foo" is an error.
16321  #
16322  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16323  # It is also a way to make sure we got the proper file name for the real test later on.
16324  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16325  if test "x$test_shortpath" = x; then
16326    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16327$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16328    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16329  fi
16330
16331  # Call helper function which possibly converts this using DOS-style short mode.
16332  # If so, the updated path is stored in $new_path.
16333
16334  input_path="$new_path"
16335  # Check if we need to convert this using DOS-style short mode. If the path
16336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16337  # take no chances and rewrite it.
16338  # Note: m4 eats our [], so we need to use [ and ] instead.
16339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16340  if test "x$has_forbidden_chars" != x; then
16341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16342    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16343    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16344    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16345      # Going to short mode and back again did indeed matter. Since short mode is
16346      # case insensitive, let's make it lowercase to improve readability.
16347      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16348      # Now convert it back to Unix-style (cygpath)
16349      input_path=`$CYGPATH -u "$shortmode_path"`
16350      new_path="$input_path"
16351    fi
16352  fi
16353
16354  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16355  if test "x$test_cygdrive_prefix" = x; then
16356    # As a simple fix, exclude /usr/bin since it's not a real path.
16357    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16358      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16359      # a path prefixed by /cygdrive for fixpath to work.
16360      new_path="$CYGWIN_ROOT_PATH$input_path"
16361    fi
16362  fi
16363
16364
16365  if test "x$path" != "x$new_path"; then
16366    with_devkit="$new_path"
16367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16368$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16369  fi
16370
16371    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16372
16373  path="$with_devkit"
16374  has_colon=`$ECHO $path | $GREP ^.:`
16375  new_path="$path"
16376  if test "x$has_colon" = x; then
16377    # Not in mixed or Windows style, start by that.
16378    new_path=`cmd //c echo $path`
16379  fi
16380
16381
16382  input_path="$new_path"
16383  # Check if we need to convert this using DOS-style short mode. If the path
16384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16385  # take no chances and rewrite it.
16386  # Note: m4 eats our [], so we need to use [ and ] instead.
16387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16388  if test "x$has_forbidden_chars" != x; then
16389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16391  fi
16392
16393
16394  windows_path="$new_path"
16395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16396    unix_path=`$CYGPATH -u "$windows_path"`
16397    new_path="$unix_path"
16398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16400    new_path="$unix_path"
16401  fi
16402
16403  if test "x$path" != "x$new_path"; then
16404    with_devkit="$new_path"
16405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16406$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16407  fi
16408
16409  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16410  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16411
16412    else
16413      # We're on a unix platform. Hooray! :)
16414      path="$with_devkit"
16415      has_space=`$ECHO "$path" | $GREP " "`
16416      if test "x$has_space" != x; then
16417        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16418$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16419        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16420      fi
16421
16422      # Use eval to expand a potential ~
16423      eval path="$path"
16424      if test ! -f "$path" && test ! -d "$path"; then
16425        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16426      fi
16427
16428      if test -d "$path"; then
16429        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16430      else
16431        dir="`$DIRNAME "$path"`"
16432        base="`$BASENAME "$path"`"
16433        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16434      fi
16435    fi
16436  fi
16437
16438        DEVKIT_ROOT="$with_devkit"
16439        # Check for a meta data info file in the root of the devkit
16440        if test -f "$DEVKIT_ROOT/devkit.info"; then
16441          . $DEVKIT_ROOT/devkit.info
16442          # This potentially sets the following:
16443          # A descriptive name of the devkit
16444
16445  if test "x$DEVKIT_NAME" = x; then
16446    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16447  fi
16448
16449          # Corresponds to --with-extra-path
16450
16451  if test "x$DEVKIT_EXTRA_PATH" = x; then
16452    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16453  fi
16454
16455          # Corresponds to --with-toolchain-path
16456
16457  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16458    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16459  fi
16460
16461          # Corresponds to --with-sysroot
16462
16463  if test "x$DEVKIT_SYSROOT" = x; then
16464    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16465  fi
16466
16467
16468          # Identifies the Visual Studio version in the devkit
16469
16470  if test "x$DEVKIT_VS_VERSION" = x; then
16471    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16472  fi
16473
16474          # The Visual Studio include environment variable
16475
16476  if test "x$DEVKIT_VS_INCLUDE" = x; then
16477    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16478  fi
16479
16480          # The Visual Studio lib environment variable
16481
16482  if test "x$DEVKIT_VS_LIB" = x; then
16483    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16484  fi
16485
16486          # Corresponds to --with-msvcr-dll
16487
16488  if test "x$DEVKIT_MSVCR_DLL" = x; then
16489    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16490  fi
16491
16492          # Corresponds to --with-msvcp-dll
16493
16494  if test "x$DEVKIT_MSVCP_DLL" = x; then
16495    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16496  fi
16497
16498        fi
16499
16500        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16501$as_echo_n "checking for devkit... " >&6; }
16502        if test "x$DEVKIT_NAME" != x; then
16503          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16504$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16505        else
16506          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16507$as_echo "$DEVKIT_ROOT" >&6; }
16508        fi
16509
16510
16511  if test "x$DEVKIT_EXTRA_PATH" != x; then
16512    if test "x$EXTRA_PATH" = x; then
16513      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16514    else
16515      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16516    fi
16517  fi
16518
16519
16520        # Fallback default of just /bin if DEVKIT_PATH is not defined
16521        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16522          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16523        fi
16524
16525  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16526    if test "x$TOOLCHAIN_PATH" = x; then
16527      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16528    else
16529      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16530    fi
16531  fi
16532
16533
16534        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16535        # places for backwards compatiblity.
16536        if test "x$DEVKIT_SYSROOT" != x; then
16537          SYSROOT="$DEVKIT_SYSROOT"
16538        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16539          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16540        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16541          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16542        fi
16543
16544
16545fi
16546
16547
16548  # You can force the sysroot if the sysroot encoded into the compiler tools
16549  # is not correct.
16550
16551# Check whether --with-sys-root was given.
16552if test "${with_sys_root+set}" = set; then :
16553  withval=$with_sys_root; SYSROOT=$with_sys_root
16554
16555fi
16556
16557
16558
16559# Check whether --with-sysroot was given.
16560if test "${with_sysroot+set}" = set; then :
16561  withval=$with_sysroot; SYSROOT=$with_sysroot
16562
16563fi
16564
16565
16566
16567# Check whether --with-tools-dir was given.
16568if test "${with_tools_dir+set}" = set; then :
16569  withval=$with_tools_dir;
16570  if test "x$with_tools_dir" != x; then
16571    if test "x$TOOLCHAIN_PATH" = x; then
16572      TOOLCHAIN_PATH="$with_tools_dir"
16573    else
16574      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16575    fi
16576  fi
16577
16578
16579fi
16580
16581
16582
16583# Check whether --with-toolchain-path was given.
16584if test "${with_toolchain_path+set}" = set; then :
16585  withval=$with_toolchain_path;
16586  if test "x$with_toolchain_path" != x; then
16587    if test "x$TOOLCHAIN_PATH" = x; then
16588      TOOLCHAIN_PATH="$with_toolchain_path"
16589    else
16590      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16591    fi
16592  fi
16593
16594
16595fi
16596
16597
16598
16599# Check whether --with-extra-path was given.
16600if test "${with_extra_path+set}" = set; then :
16601  withval=$with_extra_path;
16602  if test "x$with_extra_path" != x; then
16603    if test "x$EXTRA_PATH" = x; then
16604      EXTRA_PATH="$with_extra_path"
16605    else
16606      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16607    fi
16608  fi
16609
16610
16611fi
16612
16613
16614  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16615    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16616    # If not, detect if Xcode is installed by running xcodebuild -version
16617    # if no Xcode installed, xcodebuild exits with 1
16618    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16619    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16620      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16621      # fall back on the stub binary in /usr/bin/xcodebuild
16622      # Extract the first word of "xcodebuild", so it can be a program name with args.
16623set dummy xcodebuild; ac_word=$2
16624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16625$as_echo_n "checking for $ac_word... " >&6; }
16626if ${ac_cv_path_XCODEBUILD+:} false; then :
16627  $as_echo_n "(cached) " >&6
16628else
16629  case $XCODEBUILD in
16630  [\\/]* | ?:[\\/]*)
16631  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16632  ;;
16633  *)
16634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16635for as_dir in $TOOLCHAIN_PATH
16636do
16637  IFS=$as_save_IFS
16638  test -z "$as_dir" && as_dir=.
16639    for ac_exec_ext in '' $ac_executable_extensions; do
16640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16641    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16643    break 2
16644  fi
16645done
16646  done
16647IFS=$as_save_IFS
16648
16649  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16650  ;;
16651esac
16652fi
16653XCODEBUILD=$ac_cv_path_XCODEBUILD
16654if test -n "$XCODEBUILD"; then
16655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16656$as_echo "$XCODEBUILD" >&6; }
16657else
16658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16659$as_echo "no" >&6; }
16660fi
16661
16662
16663    else
16664      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16665      # when only the command line tools are installed there are no SDKs, so headers
16666      # are copied into the system frameworks
16667      XCODEBUILD=
16668
16669    fi
16670
16671    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16672$as_echo_n "checking for sdk name... " >&6; }
16673
16674# Check whether --with-sdk-name was given.
16675if test "${with_sdk_name+set}" = set; then :
16676  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16677
16678fi
16679
16680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16681$as_echo "$SDKNAME" >&6; }
16682
16683    # if toolchain path is specified then don't rely on system headers, they may not compile
16684    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16685    test -z "$TOOLCHAIN_PATH" && \
16686      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16687
16688    if test -z "$SYSROOT"; then
16689      if test -n "$XCODEBUILD"; then
16690        # if we don't have system headers, use default SDK name (last resort)
16691        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16692          SDKNAME=${SDKNAME:-macosx}
16693        fi
16694
16695        if test -n "$SDKNAME"; then
16696          # Call xcodebuild to determine SYSROOT
16697          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16698        fi
16699      else
16700        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16701          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
16702        fi
16703      fi
16704    else
16705      # warn user if --with-sdk-name was also set
16706      if test -n "$with_sdk_name"; then
16707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16708$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16709      fi
16710    fi
16711
16712    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16713      # If no system framework headers, then SYSROOT must be set, or we won't build
16714      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
16715    fi
16716
16717    # Perform a basic sanity test
16718    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16719      if test -z "$SYSROOT"; then
16720        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
16721      else
16722        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16723      fi
16724    fi
16725
16726    # set SDKROOT too, Xcode tools will pick it up
16727    SDKROOT=$SYSROOT
16728
16729  fi
16730
16731  # Prepend the extra path to the global path
16732
16733  if test "x$EXTRA_PATH" != x; then
16734    if test "x$PATH" = x; then
16735      PATH="$EXTRA_PATH"
16736    else
16737      PATH="$EXTRA_PATH:$PATH"
16738    fi
16739  fi
16740
16741
16742  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16743    # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
16744    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
16745  fi
16746
16747  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16748$as_echo_n "checking for sysroot... " >&6; }
16749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16750$as_echo "$SYSROOT" >&6; }
16751  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16752$as_echo_n "checking for toolchain path... " >&6; }
16753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16754$as_echo "$TOOLCHAIN_PATH" >&6; }
16755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16756$as_echo_n "checking for extra path... " >&6; }
16757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16758$as_echo "$EXTRA_PATH" >&6; }
16759
16760
16761# To properly create a configuration name, we need to have the OpenJDK target
16762# and options (variants and debug level) parsed.
16763
16764
16765
16766# Check whether --with-conf-name was given.
16767if test "${with_conf_name+set}" = set; then :
16768  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16769fi
16770
16771
16772  # Test from where we are running configure, in or outside of src root.
16773  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16774$as_echo_n "checking where to store configuration... " >&6; }
16775  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16776      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16777      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16778    # We are running configure from the src root.
16779    # Create a default ./build/target-variant-debuglevel output root.
16780    if test "x${CONF_NAME}" = x; then
16781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16782$as_echo "in default location" >&6; }
16783      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
16784    else
16785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16786$as_echo "in build directory with custom name" >&6; }
16787    fi
16788    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16789    $MKDIR -p "$OUTPUT_ROOT"
16790    if test ! -d "$OUTPUT_ROOT"; then
16791      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16792    fi
16793  else
16794    # We are running configure from outside of the src dir.
16795    # Then use the current directory as output dir!
16796    # If configuration is situated in normal build directory, just use the build
16797    # directory name as configuration name, otherwise use the complete path.
16798    if test "x${CONF_NAME}" = x; then
16799      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16800    fi
16801    OUTPUT_ROOT="$CURDIR"
16802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16803$as_echo "in current directory" >&6; }
16804
16805    # WARNING: This might be a bad thing to do. You need to be sure you want to
16806    # have a configuration in this directory. Do some sanity checks!
16807
16808    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16809      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16810      # other files
16811      files_present=`$LS $OUTPUT_ROOT`
16812      # Configure has already touched config.log and confdefs.h in the current dir when this check
16813      # is performed.
16814      filtered_files=`$ECHO "$files_present" \
16815          | $SED -e 's/config.log//g' \
16816              -e 's/configure.log//g' \
16817              -e 's/confdefs.h//g' \
16818              -e 's/ //g' \
16819          | $TR -d '\n'`
16820      if test "x$filtered_files" != x; then
16821        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16822$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16823        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16824$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16825        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16826$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16827        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16828$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16829        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16830$as_echo "$as_me: seriously mess up just about everything." >&6;}
16831        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16832$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16833        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16834$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16835        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16836      fi
16837    fi
16838  fi
16839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16840$as_echo_n "checking what configuration name to use... " >&6; }
16841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16842$as_echo "$CONF_NAME" >&6; }
16843
16844
16845  # Only process if variable expands to non-empty
16846
16847  if test "x$OUTPUT_ROOT" != x; then
16848    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16849
16850  # Input might be given as Windows format, start by converting to
16851  # unix format.
16852  path="$OUTPUT_ROOT"
16853  new_path=`$CYGPATH -u "$path"`
16854
16855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16858  # "foo.exe" is OK but "foo" is an error.
16859  #
16860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16861  # It is also a way to make sure we got the proper file name for the real test later on.
16862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16863  if test "x$test_shortpath" = x; then
16864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16865$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16866    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16867  fi
16868
16869  # Call helper function which possibly converts this using DOS-style short mode.
16870  # If so, the updated path is stored in $new_path.
16871
16872  input_path="$new_path"
16873  # Check if we need to convert this using DOS-style short mode. If the path
16874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16875  # take no chances and rewrite it.
16876  # Note: m4 eats our [], so we need to use [ and ] instead.
16877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16878  if test "x$has_forbidden_chars" != x; then
16879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16883      # Going to short mode and back again did indeed matter. Since short mode is
16884      # case insensitive, let's make it lowercase to improve readability.
16885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16886      # Now convert it back to Unix-style (cygpath)
16887      input_path=`$CYGPATH -u "$shortmode_path"`
16888      new_path="$input_path"
16889    fi
16890  fi
16891
16892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16893  if test "x$test_cygdrive_prefix" = x; then
16894    # As a simple fix, exclude /usr/bin since it's not a real path.
16895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16897      # a path prefixed by /cygdrive for fixpath to work.
16898      new_path="$CYGWIN_ROOT_PATH$input_path"
16899    fi
16900  fi
16901
16902
16903  if test "x$path" != "x$new_path"; then
16904    OUTPUT_ROOT="$new_path"
16905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16906$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16907  fi
16908
16909    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16910
16911  path="$OUTPUT_ROOT"
16912  has_colon=`$ECHO $path | $GREP ^.:`
16913  new_path="$path"
16914  if test "x$has_colon" = x; then
16915    # Not in mixed or Windows style, start by that.
16916    new_path=`cmd //c echo $path`
16917  fi
16918
16919
16920  input_path="$new_path"
16921  # Check if we need to convert this using DOS-style short mode. If the path
16922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16923  # take no chances and rewrite it.
16924  # Note: m4 eats our [], so we need to use [ and ] instead.
16925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16926  if test "x$has_forbidden_chars" != x; then
16927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16929  fi
16930
16931
16932  windows_path="$new_path"
16933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16934    unix_path=`$CYGPATH -u "$windows_path"`
16935    new_path="$unix_path"
16936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16938    new_path="$unix_path"
16939  fi
16940
16941  if test "x$path" != "x$new_path"; then
16942    OUTPUT_ROOT="$new_path"
16943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16944$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16945  fi
16946
16947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16949
16950    else
16951      # We're on a unix platform. Hooray! :)
16952      path="$OUTPUT_ROOT"
16953      has_space=`$ECHO "$path" | $GREP " "`
16954      if test "x$has_space" != x; then
16955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16956$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16957        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16958      fi
16959
16960      # Use eval to expand a potential ~
16961      eval path="$path"
16962      if test ! -f "$path" && test ! -d "$path"; then
16963        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16964      fi
16965
16966      if test -d "$path"; then
16967        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16968      else
16969        dir="`$DIRNAME "$path"`"
16970        base="`$BASENAME "$path"`"
16971        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16972      fi
16973    fi
16974  fi
16975
16976
16977  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16978  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16979
16980  SPEC=$OUTPUT_ROOT/spec.gmk
16981
16982  CONF_NAME=$CONF_NAME
16983
16984  OUTPUT_ROOT=$OUTPUT_ROOT
16985
16986
16987
16988  # The spec.gmk file contains all variables for the make system.
16989  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16990
16991  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16992  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16993
16994  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16995  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16996
16997  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
16998  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
16999
17000  # The compare.sh is used to compare the build output to other builds.
17001  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17002
17003  # The generated Makefile knows where the spec.gmk is and where the source is.
17004  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17005  # which will look for generated configurations
17006  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17007
17008
17009
17010# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17011
17012  for ac_prog in apt-get yum port pkgutil pkgadd
17013do
17014  # Extract the first word of "$ac_prog", so it can be a program name with args.
17015set dummy $ac_prog; ac_word=$2
17016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17017$as_echo_n "checking for $ac_word... " >&6; }
17018if ${ac_cv_prog_PKGHANDLER+:} false; then :
17019  $as_echo_n "(cached) " >&6
17020else
17021  if test -n "$PKGHANDLER"; then
17022  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17023else
17024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17025for as_dir in $PATH
17026do
17027  IFS=$as_save_IFS
17028  test -z "$as_dir" && as_dir=.
17029    for ac_exec_ext in '' $ac_executable_extensions; do
17030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17031    ac_cv_prog_PKGHANDLER="$ac_prog"
17032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17033    break 2
17034  fi
17035done
17036  done
17037IFS=$as_save_IFS
17038
17039fi
17040fi
17041PKGHANDLER=$ac_cv_prog_PKGHANDLER
17042if test -n "$PKGHANDLER"; then
17043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17044$as_echo "$PKGHANDLER" >&6; }
17045else
17046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17047$as_echo "no" >&6; }
17048fi
17049
17050
17051  test -n "$PKGHANDLER" && break
17052done
17053
17054
17055
17056# Setup tools that requires more complex handling, or that is not needed by the configure script.
17057
17058
17059
17060  # Publish this variable in the help.
17061
17062
17063  if [ -z "${MAKE+x}" ]; then
17064    # The variable is not set by user, try to locate tool using the code snippet
17065
17066    # Try our hardest to locate a correct version of GNU make
17067    for ac_prog in gmake
17068do
17069  # Extract the first word of "$ac_prog", so it can be a program name with args.
17070set dummy $ac_prog; ac_word=$2
17071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17072$as_echo_n "checking for $ac_word... " >&6; }
17073if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17074  $as_echo_n "(cached) " >&6
17075else
17076  case $CHECK_GMAKE in
17077  [\\/]* | ?:[\\/]*)
17078  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17079  ;;
17080  *)
17081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17082for as_dir in $PATH
17083do
17084  IFS=$as_save_IFS
17085  test -z "$as_dir" && as_dir=.
17086    for ac_exec_ext in '' $ac_executable_extensions; do
17087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17088    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17090    break 2
17091  fi
17092done
17093  done
17094IFS=$as_save_IFS
17095
17096  ;;
17097esac
17098fi
17099CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17100if test -n "$CHECK_GMAKE"; then
17101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17102$as_echo "$CHECK_GMAKE" >&6; }
17103else
17104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17105$as_echo "no" >&6; }
17106fi
17107
17108
17109  test -n "$CHECK_GMAKE" && break
17110done
17111
17112
17113  MAKE_CANDIDATE=""$CHECK_GMAKE""
17114  DESCRIPTION="gmake in PATH"
17115
17116  # On Cygwin, we require a newer version of make than on other platforms
17117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17118    MAKE_VERSION_EXPR="-e 4\."
17119    MAKE_REQUIRED_VERSION="4.0"
17120   else
17121    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17122    MAKE_REQUIRED_VERSION="3.81"
17123  fi
17124
17125  if test "x$MAKE_CANDIDATE" != x; then
17126    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17127$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17128    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17129    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17130    if test "x$IS_GNU_MAKE" = x; then
17131      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17132$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17133    else
17134      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17135      if test "x$IS_MODERN_MAKE" = x; then
17136        { $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
17137$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;}
17138      else
17139        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17140          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17141            MAKE_EXPECTED_ENV='cygwin'
17142          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17143            MAKE_EXPECTED_ENV='msys'
17144          else
17145            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17146          fi
17147          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17148          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17149        else
17150          # Not relevant for non-Windows
17151          IS_MAKE_CORRECT_ENV=true
17152        fi
17153        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17154          { $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
17155$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;}
17156        else
17157          FOUND_MAKE=$MAKE_CANDIDATE
17158
17159  # Only process if variable expands to non-empty
17160
17161  if test "x$FOUND_MAKE" != x; then
17162    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17163
17164  # First separate the path from the arguments. This will split at the first
17165  # space.
17166  complete="$FOUND_MAKE"
17167  path="${complete%% *}"
17168  tmp="$complete EOL"
17169  arguments="${tmp#* }"
17170
17171  # Input might be given as Windows format, start by converting to
17172  # unix format.
17173  new_path=`$CYGPATH -u "$path"`
17174
17175  # Now try to locate executable using which
17176  new_path=`$WHICH "$new_path" 2> /dev/null`
17177  # bat and cmd files are not always considered executable in cygwin causing which
17178  # to not find them
17179  if test "x$new_path" = x \
17180      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17181      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17182    new_path=`$CYGPATH -u "$path"`
17183  fi
17184  if test "x$new_path" = x; then
17185    # Oops. Which didn't find the executable.
17186    # The splitting of arguments from the executable at a space might have been incorrect,
17187    # since paths with space are more likely in Windows. Give it another try with the whole
17188    # argument.
17189    path="$complete"
17190    arguments="EOL"
17191    new_path=`$CYGPATH -u "$path"`
17192    new_path=`$WHICH "$new_path" 2> /dev/null`
17193    # bat and cmd files are not always considered executable in cygwin causing which
17194    # to not find them
17195    if test "x$new_path" = x \
17196        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17197        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17198      new_path=`$CYGPATH -u "$path"`
17199    fi
17200    if test "x$new_path" = x; then
17201      # It's still not found. Now this is an unrecoverable error.
17202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17203$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17204      has_space=`$ECHO "$complete" | $GREP " "`
17205      if test "x$has_space" != x; then
17206        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17207$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17208      fi
17209      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17210    fi
17211  fi
17212
17213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17216  # "foo.exe" is OK but "foo" is an error.
17217  #
17218  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17219  # It is also a way to make sure we got the proper file name for the real test later on.
17220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17221  if test "x$test_shortpath" = x; then
17222    # Short path failed, file does not exist as specified.
17223    # Try adding .exe or .cmd
17224    if test -f "${new_path}.exe"; then
17225      input_to_shortpath="${new_path}.exe"
17226    elif test -f "${new_path}.cmd"; then
17227      input_to_shortpath="${new_path}.cmd"
17228    else
17229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17230$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17231      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17232$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17233      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17234    fi
17235  else
17236    input_to_shortpath="$new_path"
17237  fi
17238
17239  # Call helper function which possibly converts this using DOS-style short mode.
17240  # If so, the updated path is stored in $new_path.
17241  new_path="$input_to_shortpath"
17242
17243  input_path="$input_to_shortpath"
17244  # Check if we need to convert this using DOS-style short mode. If the path
17245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17246  # take no chances and rewrite it.
17247  # Note: m4 eats our [], so we need to use [ and ] instead.
17248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17249  if test "x$has_forbidden_chars" != x; then
17250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17254      # Going to short mode and back again did indeed matter. Since short mode is
17255      # case insensitive, let's make it lowercase to improve readability.
17256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17257      # Now convert it back to Unix-style (cygpath)
17258      input_path=`$CYGPATH -u "$shortmode_path"`
17259      new_path="$input_path"
17260    fi
17261  fi
17262
17263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17264  if test "x$test_cygdrive_prefix" = x; then
17265    # As a simple fix, exclude /usr/bin since it's not a real path.
17266    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17268      # a path prefixed by /cygdrive for fixpath to work.
17269      new_path="$CYGWIN_ROOT_PATH$input_path"
17270    fi
17271  fi
17272
17273  # remove trailing .exe if any
17274  new_path="${new_path/%.exe/}"
17275
17276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17277
17278  # First separate the path from the arguments. This will split at the first
17279  # space.
17280  complete="$FOUND_MAKE"
17281  path="${complete%% *}"
17282  tmp="$complete EOL"
17283  arguments="${tmp#* }"
17284
17285  # Input might be given as Windows format, start by converting to
17286  # unix format.
17287  new_path="$path"
17288
17289  windows_path="$new_path"
17290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17291    unix_path=`$CYGPATH -u "$windows_path"`
17292    new_path="$unix_path"
17293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17295    new_path="$unix_path"
17296  fi
17297
17298
17299  # Now try to locate executable using which
17300  new_path=`$WHICH "$new_path" 2> /dev/null`
17301
17302  if test "x$new_path" = x; then
17303    # Oops. Which didn't find the executable.
17304    # The splitting of arguments from the executable at a space might have been incorrect,
17305    # since paths with space are more likely in Windows. Give it another try with the whole
17306    # argument.
17307    path="$complete"
17308    arguments="EOL"
17309    new_path="$path"
17310
17311  windows_path="$new_path"
17312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17313    unix_path=`$CYGPATH -u "$windows_path"`
17314    new_path="$unix_path"
17315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17317    new_path="$unix_path"
17318  fi
17319
17320
17321    new_path=`$WHICH "$new_path" 2> /dev/null`
17322    # bat and cmd files are not always considered executable in MSYS causing which
17323    # to not find them
17324    if test "x$new_path" = x \
17325        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17326        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17327      new_path="$path"
17328
17329  windows_path="$new_path"
17330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17331    unix_path=`$CYGPATH -u "$windows_path"`
17332    new_path="$unix_path"
17333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17335    new_path="$unix_path"
17336  fi
17337
17338    fi
17339
17340    if test "x$new_path" = x; then
17341      # It's still not found. Now this is an unrecoverable error.
17342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17343$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17344      has_space=`$ECHO "$complete" | $GREP " "`
17345      if test "x$has_space" != x; then
17346        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17347$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17348      fi
17349      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17350    fi
17351  fi
17352
17353  # Now new_path has a complete unix path to the binary
17354  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17355    # Keep paths in /bin as-is, but remove trailing .exe if any
17356    new_path="${new_path/%.exe/}"
17357    # Do not save /bin paths to all_fixpath_prefixes!
17358  else
17359    # Not in mixed or Windows style, start by that.
17360    new_path=`cmd //c echo $new_path`
17361
17362  input_path="$new_path"
17363  # Check if we need to convert this using DOS-style short mode. If the path
17364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17365  # take no chances and rewrite it.
17366  # Note: m4 eats our [], so we need to use [ and ] instead.
17367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17368  if test "x$has_forbidden_chars" != x; then
17369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17371  fi
17372
17373    # Output is in $new_path
17374
17375  windows_path="$new_path"
17376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17377    unix_path=`$CYGPATH -u "$windows_path"`
17378    new_path="$unix_path"
17379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17381    new_path="$unix_path"
17382  fi
17383
17384    # remove trailing .exe if any
17385    new_path="${new_path/%.exe/}"
17386
17387    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17388    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17389  fi
17390
17391    else
17392      # We're on a unix platform. Hooray! :)
17393      # First separate the path from the arguments. This will split at the first
17394      # space.
17395      complete="$FOUND_MAKE"
17396      path="${complete%% *}"
17397      tmp="$complete EOL"
17398      arguments="${tmp#* }"
17399
17400      # Cannot rely on the command "which" here since it doesn't always work.
17401      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17402      if test -z "$is_absolute_path"; then
17403        # Path to executable is not absolute. Find it.
17404        IFS_save="$IFS"
17405        IFS=:
17406        for p in $PATH; do
17407          if test -f "$p/$path" && test -x "$p/$path"; then
17408            new_path="$p/$path"
17409            break
17410          fi
17411        done
17412        IFS="$IFS_save"
17413      else
17414        # This is an absolute path, we can use it without further modifications.
17415        new_path="$path"
17416      fi
17417
17418      if test "x$new_path" = x; then
17419        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17420$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17421        has_space=`$ECHO "$complete" | $GREP " "`
17422        if test "x$has_space" != x; then
17423          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17424$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17425        fi
17426        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17427      fi
17428    fi
17429
17430    # Now join together the path and the arguments once again
17431    if test "x$arguments" != xEOL; then
17432      new_complete="$new_path ${arguments% *}"
17433    else
17434      new_complete="$new_path"
17435    fi
17436
17437    if test "x$complete" != "x$new_complete"; then
17438      FOUND_MAKE="$new_complete"
17439      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17440$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17441    fi
17442  fi
17443
17444        fi
17445      fi
17446    fi
17447  fi
17448
17449
17450    if test "x$FOUND_MAKE" = x; then
17451      for ac_prog in make
17452do
17453  # Extract the first word of "$ac_prog", so it can be a program name with args.
17454set dummy $ac_prog; ac_word=$2
17455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17456$as_echo_n "checking for $ac_word... " >&6; }
17457if ${ac_cv_path_CHECK_MAKE+:} false; then :
17458  $as_echo_n "(cached) " >&6
17459else
17460  case $CHECK_MAKE in
17461  [\\/]* | ?:[\\/]*)
17462  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17463  ;;
17464  *)
17465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17466for as_dir in $PATH
17467do
17468  IFS=$as_save_IFS
17469  test -z "$as_dir" && as_dir=.
17470    for ac_exec_ext in '' $ac_executable_extensions; do
17471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17472    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17474    break 2
17475  fi
17476done
17477  done
17478IFS=$as_save_IFS
17479
17480  ;;
17481esac
17482fi
17483CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17484if test -n "$CHECK_MAKE"; then
17485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17486$as_echo "$CHECK_MAKE" >&6; }
17487else
17488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17489$as_echo "no" >&6; }
17490fi
17491
17492
17493  test -n "$CHECK_MAKE" && break
17494done
17495
17496
17497  MAKE_CANDIDATE=""$CHECK_MAKE""
17498  DESCRIPTION="make in PATH"
17499
17500  # On Cygwin, we require a newer version of make than on other platforms
17501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17502    MAKE_VERSION_EXPR="-e 4\."
17503    MAKE_REQUIRED_VERSION="4.0"
17504   else
17505    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17506    MAKE_REQUIRED_VERSION="3.81"
17507  fi
17508
17509  if test "x$MAKE_CANDIDATE" != x; then
17510    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17511$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17512    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17513    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17514    if test "x$IS_GNU_MAKE" = x; then
17515      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17516$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17517    else
17518      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17519      if test "x$IS_MODERN_MAKE" = x; then
17520        { $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
17521$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;}
17522      else
17523        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17524          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17525            MAKE_EXPECTED_ENV='cygwin'
17526          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17527            MAKE_EXPECTED_ENV='msys'
17528          else
17529            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17530          fi
17531          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17532          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17533        else
17534          # Not relevant for non-Windows
17535          IS_MAKE_CORRECT_ENV=true
17536        fi
17537        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17538          { $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
17539$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;}
17540        else
17541          FOUND_MAKE=$MAKE_CANDIDATE
17542
17543  # Only process if variable expands to non-empty
17544
17545  if test "x$FOUND_MAKE" != x; then
17546    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17547
17548  # First separate the path from the arguments. This will split at the first
17549  # space.
17550  complete="$FOUND_MAKE"
17551  path="${complete%% *}"
17552  tmp="$complete EOL"
17553  arguments="${tmp#* }"
17554
17555  # Input might be given as Windows format, start by converting to
17556  # unix format.
17557  new_path=`$CYGPATH -u "$path"`
17558
17559  # Now try to locate executable using which
17560  new_path=`$WHICH "$new_path" 2> /dev/null`
17561  # bat and cmd files are not always considered executable in cygwin causing which
17562  # to not find them
17563  if test "x$new_path" = x \
17564      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17565      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17566    new_path=`$CYGPATH -u "$path"`
17567  fi
17568  if test "x$new_path" = x; then
17569    # Oops. Which didn't find the executable.
17570    # The splitting of arguments from the executable at a space might have been incorrect,
17571    # since paths with space are more likely in Windows. Give it another try with the whole
17572    # argument.
17573    path="$complete"
17574    arguments="EOL"
17575    new_path=`$CYGPATH -u "$path"`
17576    new_path=`$WHICH "$new_path" 2> /dev/null`
17577    # bat and cmd files are not always considered executable in cygwin causing which
17578    # to not find them
17579    if test "x$new_path" = x \
17580        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17581        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17582      new_path=`$CYGPATH -u "$path"`
17583    fi
17584    if test "x$new_path" = x; then
17585      # It's still not found. Now this is an unrecoverable error.
17586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17587$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17588      has_space=`$ECHO "$complete" | $GREP " "`
17589      if test "x$has_space" != x; then
17590        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17591$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17592      fi
17593      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17594    fi
17595  fi
17596
17597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17600  # "foo.exe" is OK but "foo" is an error.
17601  #
17602  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17603  # It is also a way to make sure we got the proper file name for the real test later on.
17604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17605  if test "x$test_shortpath" = x; then
17606    # Short path failed, file does not exist as specified.
17607    # Try adding .exe or .cmd
17608    if test -f "${new_path}.exe"; then
17609      input_to_shortpath="${new_path}.exe"
17610    elif test -f "${new_path}.cmd"; then
17611      input_to_shortpath="${new_path}.cmd"
17612    else
17613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17614$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17615      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17616$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17617      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17618    fi
17619  else
17620    input_to_shortpath="$new_path"
17621  fi
17622
17623  # Call helper function which possibly converts this using DOS-style short mode.
17624  # If so, the updated path is stored in $new_path.
17625  new_path="$input_to_shortpath"
17626
17627  input_path="$input_to_shortpath"
17628  # Check if we need to convert this using DOS-style short mode. If the path
17629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17630  # take no chances and rewrite it.
17631  # Note: m4 eats our [], so we need to use [ and ] instead.
17632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17633  if test "x$has_forbidden_chars" != x; then
17634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17638      # Going to short mode and back again did indeed matter. Since short mode is
17639      # case insensitive, let's make it lowercase to improve readability.
17640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17641      # Now convert it back to Unix-style (cygpath)
17642      input_path=`$CYGPATH -u "$shortmode_path"`
17643      new_path="$input_path"
17644    fi
17645  fi
17646
17647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17648  if test "x$test_cygdrive_prefix" = x; then
17649    # As a simple fix, exclude /usr/bin since it's not a real path.
17650    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17652      # a path prefixed by /cygdrive for fixpath to work.
17653      new_path="$CYGWIN_ROOT_PATH$input_path"
17654    fi
17655  fi
17656
17657  # remove trailing .exe if any
17658  new_path="${new_path/%.exe/}"
17659
17660    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17661
17662  # First separate the path from the arguments. This will split at the first
17663  # space.
17664  complete="$FOUND_MAKE"
17665  path="${complete%% *}"
17666  tmp="$complete EOL"
17667  arguments="${tmp#* }"
17668
17669  # Input might be given as Windows format, start by converting to
17670  # unix format.
17671  new_path="$path"
17672
17673  windows_path="$new_path"
17674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17675    unix_path=`$CYGPATH -u "$windows_path"`
17676    new_path="$unix_path"
17677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17679    new_path="$unix_path"
17680  fi
17681
17682
17683  # Now try to locate executable using which
17684  new_path=`$WHICH "$new_path" 2> /dev/null`
17685
17686  if test "x$new_path" = x; then
17687    # Oops. Which didn't find the executable.
17688    # The splitting of arguments from the executable at a space might have been incorrect,
17689    # since paths with space are more likely in Windows. Give it another try with the whole
17690    # argument.
17691    path="$complete"
17692    arguments="EOL"
17693    new_path="$path"
17694
17695  windows_path="$new_path"
17696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17697    unix_path=`$CYGPATH -u "$windows_path"`
17698    new_path="$unix_path"
17699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17701    new_path="$unix_path"
17702  fi
17703
17704
17705    new_path=`$WHICH "$new_path" 2> /dev/null`
17706    # bat and cmd files are not always considered executable in MSYS causing which
17707    # to not find them
17708    if test "x$new_path" = x \
17709        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17710        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17711      new_path="$path"
17712
17713  windows_path="$new_path"
17714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17715    unix_path=`$CYGPATH -u "$windows_path"`
17716    new_path="$unix_path"
17717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17719    new_path="$unix_path"
17720  fi
17721
17722    fi
17723
17724    if test "x$new_path" = x; then
17725      # It's still not found. Now this is an unrecoverable error.
17726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17727$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17728      has_space=`$ECHO "$complete" | $GREP " "`
17729      if test "x$has_space" != x; then
17730        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17731$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17732      fi
17733      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17734    fi
17735  fi
17736
17737  # Now new_path has a complete unix path to the binary
17738  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17739    # Keep paths in /bin as-is, but remove trailing .exe if any
17740    new_path="${new_path/%.exe/}"
17741    # Do not save /bin paths to all_fixpath_prefixes!
17742  else
17743    # Not in mixed or Windows style, start by that.
17744    new_path=`cmd //c echo $new_path`
17745
17746  input_path="$new_path"
17747  # Check if we need to convert this using DOS-style short mode. If the path
17748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17749  # take no chances and rewrite it.
17750  # Note: m4 eats our [], so we need to use [ and ] instead.
17751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17752  if test "x$has_forbidden_chars" != x; then
17753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17754    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17755  fi
17756
17757    # Output is in $new_path
17758
17759  windows_path="$new_path"
17760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17761    unix_path=`$CYGPATH -u "$windows_path"`
17762    new_path="$unix_path"
17763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17765    new_path="$unix_path"
17766  fi
17767
17768    # remove trailing .exe if any
17769    new_path="${new_path/%.exe/}"
17770
17771    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17772    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17773  fi
17774
17775    else
17776      # We're on a unix platform. Hooray! :)
17777      # First separate the path from the arguments. This will split at the first
17778      # space.
17779      complete="$FOUND_MAKE"
17780      path="${complete%% *}"
17781      tmp="$complete EOL"
17782      arguments="${tmp#* }"
17783
17784      # Cannot rely on the command "which" here since it doesn't always work.
17785      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17786      if test -z "$is_absolute_path"; then
17787        # Path to executable is not absolute. Find it.
17788        IFS_save="$IFS"
17789        IFS=:
17790        for p in $PATH; do
17791          if test -f "$p/$path" && test -x "$p/$path"; then
17792            new_path="$p/$path"
17793            break
17794          fi
17795        done
17796        IFS="$IFS_save"
17797      else
17798        # This is an absolute path, we can use it without further modifications.
17799        new_path="$path"
17800      fi
17801
17802      if test "x$new_path" = x; then
17803        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17804$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17805        has_space=`$ECHO "$complete" | $GREP " "`
17806        if test "x$has_space" != x; then
17807          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17808$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17809        fi
17810        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17811      fi
17812    fi
17813
17814    # Now join together the path and the arguments once again
17815    if test "x$arguments" != xEOL; then
17816      new_complete="$new_path ${arguments% *}"
17817    else
17818      new_complete="$new_path"
17819    fi
17820
17821    if test "x$complete" != "x$new_complete"; then
17822      FOUND_MAKE="$new_complete"
17823      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17824$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17825    fi
17826  fi
17827
17828        fi
17829      fi
17830    fi
17831  fi
17832
17833    fi
17834
17835    if test "x$FOUND_MAKE" = x; then
17836      if test "x$TOOLCHAIN_PATH" != x; then
17837        # We have a toolchain path, check that as well before giving up.
17838        OLD_PATH=$PATH
17839        PATH=$TOOLCHAIN_PATH:$PATH
17840        for ac_prog in gmake
17841do
17842  # Extract the first word of "$ac_prog", so it can be a program name with args.
17843set dummy $ac_prog; ac_word=$2
17844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17845$as_echo_n "checking for $ac_word... " >&6; }
17846if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17847  $as_echo_n "(cached) " >&6
17848else
17849  case $CHECK_TOOLSDIR_GMAKE in
17850  [\\/]* | ?:[\\/]*)
17851  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17852  ;;
17853  *)
17854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17855for as_dir in $PATH
17856do
17857  IFS=$as_save_IFS
17858  test -z "$as_dir" && as_dir=.
17859    for ac_exec_ext in '' $ac_executable_extensions; do
17860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17861    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17863    break 2
17864  fi
17865done
17866  done
17867IFS=$as_save_IFS
17868
17869  ;;
17870esac
17871fi
17872CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17873if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17875$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17876else
17877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17878$as_echo "no" >&6; }
17879fi
17880
17881
17882  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17883done
17884
17885
17886  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17887  DESCRIPTION="gmake in tools-dir"
17888
17889  # On Cygwin, we require a newer version of make than on other platforms
17890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17891    MAKE_VERSION_EXPR="-e 4\."
17892    MAKE_REQUIRED_VERSION="4.0"
17893   else
17894    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17895    MAKE_REQUIRED_VERSION="3.81"
17896  fi
17897
17898  if test "x$MAKE_CANDIDATE" != x; then
17899    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17900$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17901    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17902    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17903    if test "x$IS_GNU_MAKE" = x; then
17904      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17905$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17906    else
17907      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17908      if test "x$IS_MODERN_MAKE" = x; then
17909        { $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
17910$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;}
17911      else
17912        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17913          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17914            MAKE_EXPECTED_ENV='cygwin'
17915          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17916            MAKE_EXPECTED_ENV='msys'
17917          else
17918            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17919          fi
17920          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17921          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17922        else
17923          # Not relevant for non-Windows
17924          IS_MAKE_CORRECT_ENV=true
17925        fi
17926        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17927          { $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
17928$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;}
17929        else
17930          FOUND_MAKE=$MAKE_CANDIDATE
17931
17932  # Only process if variable expands to non-empty
17933
17934  if test "x$FOUND_MAKE" != x; then
17935    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17936
17937  # First separate the path from the arguments. This will split at the first
17938  # space.
17939  complete="$FOUND_MAKE"
17940  path="${complete%% *}"
17941  tmp="$complete EOL"
17942  arguments="${tmp#* }"
17943
17944  # Input might be given as Windows format, start by converting to
17945  # unix format.
17946  new_path=`$CYGPATH -u "$path"`
17947
17948  # Now try to locate executable using which
17949  new_path=`$WHICH "$new_path" 2> /dev/null`
17950  # bat and cmd files are not always considered executable in cygwin causing which
17951  # to not find them
17952  if test "x$new_path" = x \
17953      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17954      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17955    new_path=`$CYGPATH -u "$path"`
17956  fi
17957  if test "x$new_path" = x; then
17958    # Oops. Which didn't find the executable.
17959    # The splitting of arguments from the executable at a space might have been incorrect,
17960    # since paths with space are more likely in Windows. Give it another try with the whole
17961    # argument.
17962    path="$complete"
17963    arguments="EOL"
17964    new_path=`$CYGPATH -u "$path"`
17965    new_path=`$WHICH "$new_path" 2> /dev/null`
17966    # bat and cmd files are not always considered executable in cygwin causing which
17967    # to not find them
17968    if test "x$new_path" = x \
17969        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17970        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17971      new_path=`$CYGPATH -u "$path"`
17972    fi
17973    if test "x$new_path" = x; then
17974      # It's still not found. Now this is an unrecoverable error.
17975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17976$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17977      has_space=`$ECHO "$complete" | $GREP " "`
17978      if test "x$has_space" != x; then
17979        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17980$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17981      fi
17982      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17983    fi
17984  fi
17985
17986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17989  # "foo.exe" is OK but "foo" is an error.
17990  #
17991  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17992  # It is also a way to make sure we got the proper file name for the real test later on.
17993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17994  if test "x$test_shortpath" = x; then
17995    # Short path failed, file does not exist as specified.
17996    # Try adding .exe or .cmd
17997    if test -f "${new_path}.exe"; then
17998      input_to_shortpath="${new_path}.exe"
17999    elif test -f "${new_path}.cmd"; then
18000      input_to_shortpath="${new_path}.cmd"
18001    else
18002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18003$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18004      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18005$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18006      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18007    fi
18008  else
18009    input_to_shortpath="$new_path"
18010  fi
18011
18012  # Call helper function which possibly converts this using DOS-style short mode.
18013  # If so, the updated path is stored in $new_path.
18014  new_path="$input_to_shortpath"
18015
18016  input_path="$input_to_shortpath"
18017  # Check if we need to convert this using DOS-style short mode. If the path
18018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18019  # take no chances and rewrite it.
18020  # Note: m4 eats our [], so we need to use [ and ] instead.
18021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18022  if test "x$has_forbidden_chars" != x; then
18023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18024    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18025    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18026    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18027      # Going to short mode and back again did indeed matter. Since short mode is
18028      # case insensitive, let's make it lowercase to improve readability.
18029      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18030      # Now convert it back to Unix-style (cygpath)
18031      input_path=`$CYGPATH -u "$shortmode_path"`
18032      new_path="$input_path"
18033    fi
18034  fi
18035
18036  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18037  if test "x$test_cygdrive_prefix" = x; then
18038    # As a simple fix, exclude /usr/bin since it's not a real path.
18039    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18040      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18041      # a path prefixed by /cygdrive for fixpath to work.
18042      new_path="$CYGWIN_ROOT_PATH$input_path"
18043    fi
18044  fi
18045
18046  # remove trailing .exe if any
18047  new_path="${new_path/%.exe/}"
18048
18049    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18050
18051  # First separate the path from the arguments. This will split at the first
18052  # space.
18053  complete="$FOUND_MAKE"
18054  path="${complete%% *}"
18055  tmp="$complete EOL"
18056  arguments="${tmp#* }"
18057
18058  # Input might be given as Windows format, start by converting to
18059  # unix format.
18060  new_path="$path"
18061
18062  windows_path="$new_path"
18063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18064    unix_path=`$CYGPATH -u "$windows_path"`
18065    new_path="$unix_path"
18066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18068    new_path="$unix_path"
18069  fi
18070
18071
18072  # Now try to locate executable using which
18073  new_path=`$WHICH "$new_path" 2> /dev/null`
18074
18075  if test "x$new_path" = x; then
18076    # Oops. Which didn't find the executable.
18077    # The splitting of arguments from the executable at a space might have been incorrect,
18078    # since paths with space are more likely in Windows. Give it another try with the whole
18079    # argument.
18080    path="$complete"
18081    arguments="EOL"
18082    new_path="$path"
18083
18084  windows_path="$new_path"
18085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18086    unix_path=`$CYGPATH -u "$windows_path"`
18087    new_path="$unix_path"
18088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18090    new_path="$unix_path"
18091  fi
18092
18093
18094    new_path=`$WHICH "$new_path" 2> /dev/null`
18095    # bat and cmd files are not always considered executable in MSYS causing which
18096    # to not find them
18097    if test "x$new_path" = x \
18098        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18099        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18100      new_path="$path"
18101
18102  windows_path="$new_path"
18103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18104    unix_path=`$CYGPATH -u "$windows_path"`
18105    new_path="$unix_path"
18106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18108    new_path="$unix_path"
18109  fi
18110
18111    fi
18112
18113    if test "x$new_path" = x; then
18114      # It's still not found. Now this is an unrecoverable error.
18115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18116$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18117      has_space=`$ECHO "$complete" | $GREP " "`
18118      if test "x$has_space" != x; then
18119        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18120$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18121      fi
18122      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18123    fi
18124  fi
18125
18126  # Now new_path has a complete unix path to the binary
18127  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18128    # Keep paths in /bin as-is, but remove trailing .exe if any
18129    new_path="${new_path/%.exe/}"
18130    # Do not save /bin paths to all_fixpath_prefixes!
18131  else
18132    # Not in mixed or Windows style, start by that.
18133    new_path=`cmd //c echo $new_path`
18134
18135  input_path="$new_path"
18136  # Check if we need to convert this using DOS-style short mode. If the path
18137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18138  # take no chances and rewrite it.
18139  # Note: m4 eats our [], so we need to use [ and ] instead.
18140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18141  if test "x$has_forbidden_chars" != x; then
18142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18143    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18144  fi
18145
18146    # Output is in $new_path
18147
18148  windows_path="$new_path"
18149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18150    unix_path=`$CYGPATH -u "$windows_path"`
18151    new_path="$unix_path"
18152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18154    new_path="$unix_path"
18155  fi
18156
18157    # remove trailing .exe if any
18158    new_path="${new_path/%.exe/}"
18159
18160    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18161    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18162  fi
18163
18164    else
18165      # We're on a unix platform. Hooray! :)
18166      # First separate the path from the arguments. This will split at the first
18167      # space.
18168      complete="$FOUND_MAKE"
18169      path="${complete%% *}"
18170      tmp="$complete EOL"
18171      arguments="${tmp#* }"
18172
18173      # Cannot rely on the command "which" here since it doesn't always work.
18174      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18175      if test -z "$is_absolute_path"; then
18176        # Path to executable is not absolute. Find it.
18177        IFS_save="$IFS"
18178        IFS=:
18179        for p in $PATH; do
18180          if test -f "$p/$path" && test -x "$p/$path"; then
18181            new_path="$p/$path"
18182            break
18183          fi
18184        done
18185        IFS="$IFS_save"
18186      else
18187        # This is an absolute path, we can use it without further modifications.
18188        new_path="$path"
18189      fi
18190
18191      if test "x$new_path" = x; then
18192        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18193$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18194        has_space=`$ECHO "$complete" | $GREP " "`
18195        if test "x$has_space" != x; then
18196          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18197$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18198        fi
18199        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18200      fi
18201    fi
18202
18203    # Now join together the path and the arguments once again
18204    if test "x$arguments" != xEOL; then
18205      new_complete="$new_path ${arguments% *}"
18206    else
18207      new_complete="$new_path"
18208    fi
18209
18210    if test "x$complete" != "x$new_complete"; then
18211      FOUND_MAKE="$new_complete"
18212      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18213$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18214    fi
18215  fi
18216
18217        fi
18218      fi
18219    fi
18220  fi
18221
18222        if test "x$FOUND_MAKE" = x; then
18223          for ac_prog in make
18224do
18225  # Extract the first word of "$ac_prog", so it can be a program name with args.
18226set dummy $ac_prog; ac_word=$2
18227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18228$as_echo_n "checking for $ac_word... " >&6; }
18229if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18230  $as_echo_n "(cached) " >&6
18231else
18232  case $CHECK_TOOLSDIR_MAKE in
18233  [\\/]* | ?:[\\/]*)
18234  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18235  ;;
18236  *)
18237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18238for as_dir in $PATH
18239do
18240  IFS=$as_save_IFS
18241  test -z "$as_dir" && as_dir=.
18242    for ac_exec_ext in '' $ac_executable_extensions; do
18243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18244    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18246    break 2
18247  fi
18248done
18249  done
18250IFS=$as_save_IFS
18251
18252  ;;
18253esac
18254fi
18255CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18256if test -n "$CHECK_TOOLSDIR_MAKE"; then
18257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18258$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18259else
18260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18261$as_echo "no" >&6; }
18262fi
18263
18264
18265  test -n "$CHECK_TOOLSDIR_MAKE" && break
18266done
18267
18268
18269  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18270  DESCRIPTION="make in tools-dir"
18271
18272  # On Cygwin, we require a newer version of make than on other platforms
18273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18274    MAKE_VERSION_EXPR="-e 4\."
18275    MAKE_REQUIRED_VERSION="4.0"
18276   else
18277    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18278    MAKE_REQUIRED_VERSION="3.81"
18279  fi
18280
18281  if test "x$MAKE_CANDIDATE" != x; then
18282    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18283$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18284    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18285    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18286    if test "x$IS_GNU_MAKE" = x; then
18287      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18288$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18289    else
18290      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18291      if test "x$IS_MODERN_MAKE" = x; then
18292        { $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
18293$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;}
18294      else
18295        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18296          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18297            MAKE_EXPECTED_ENV='cygwin'
18298          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18299            MAKE_EXPECTED_ENV='msys'
18300          else
18301            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18302          fi
18303          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18304          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18305        else
18306          # Not relevant for non-Windows
18307          IS_MAKE_CORRECT_ENV=true
18308        fi
18309        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18310          { $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
18311$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;}
18312        else
18313          FOUND_MAKE=$MAKE_CANDIDATE
18314
18315  # Only process if variable expands to non-empty
18316
18317  if test "x$FOUND_MAKE" != x; then
18318    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18319
18320  # First separate the path from the arguments. This will split at the first
18321  # space.
18322  complete="$FOUND_MAKE"
18323  path="${complete%% *}"
18324  tmp="$complete EOL"
18325  arguments="${tmp#* }"
18326
18327  # Input might be given as Windows format, start by converting to
18328  # unix format.
18329  new_path=`$CYGPATH -u "$path"`
18330
18331  # Now try to locate executable using which
18332  new_path=`$WHICH "$new_path" 2> /dev/null`
18333  # bat and cmd files are not always considered executable in cygwin causing which
18334  # to not find them
18335  if test "x$new_path" = x \
18336      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18337      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18338    new_path=`$CYGPATH -u "$path"`
18339  fi
18340  if test "x$new_path" = x; then
18341    # Oops. Which didn't find the executable.
18342    # The splitting of arguments from the executable at a space might have been incorrect,
18343    # since paths with space are more likely in Windows. Give it another try with the whole
18344    # argument.
18345    path="$complete"
18346    arguments="EOL"
18347    new_path=`$CYGPATH -u "$path"`
18348    new_path=`$WHICH "$new_path" 2> /dev/null`
18349    # bat and cmd files are not always considered executable in cygwin causing which
18350    # to not find them
18351    if test "x$new_path" = x \
18352        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18353        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18354      new_path=`$CYGPATH -u "$path"`
18355    fi
18356    if test "x$new_path" = x; then
18357      # It's still not found. Now this is an unrecoverable error.
18358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18359$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18360      has_space=`$ECHO "$complete" | $GREP " "`
18361      if test "x$has_space" != x; then
18362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18364      fi
18365      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18366    fi
18367  fi
18368
18369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18372  # "foo.exe" is OK but "foo" is an error.
18373  #
18374  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18375  # It is also a way to make sure we got the proper file name for the real test later on.
18376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18377  if test "x$test_shortpath" = x; then
18378    # Short path failed, file does not exist as specified.
18379    # Try adding .exe or .cmd
18380    if test -f "${new_path}.exe"; then
18381      input_to_shortpath="${new_path}.exe"
18382    elif test -f "${new_path}.cmd"; then
18383      input_to_shortpath="${new_path}.cmd"
18384    else
18385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18386$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18387      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18388$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18389      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18390    fi
18391  else
18392    input_to_shortpath="$new_path"
18393  fi
18394
18395  # Call helper function which possibly converts this using DOS-style short mode.
18396  # If so, the updated path is stored in $new_path.
18397  new_path="$input_to_shortpath"
18398
18399  input_path="$input_to_shortpath"
18400  # Check if we need to convert this using DOS-style short mode. If the path
18401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18402  # take no chances and rewrite it.
18403  # Note: m4 eats our [], so we need to use [ and ] instead.
18404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18405  if test "x$has_forbidden_chars" != x; then
18406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18410      # Going to short mode and back again did indeed matter. Since short mode is
18411      # case insensitive, let's make it lowercase to improve readability.
18412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18413      # Now convert it back to Unix-style (cygpath)
18414      input_path=`$CYGPATH -u "$shortmode_path"`
18415      new_path="$input_path"
18416    fi
18417  fi
18418
18419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18420  if test "x$test_cygdrive_prefix" = x; then
18421    # As a simple fix, exclude /usr/bin since it's not a real path.
18422    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18424      # a path prefixed by /cygdrive for fixpath to work.
18425      new_path="$CYGWIN_ROOT_PATH$input_path"
18426    fi
18427  fi
18428
18429  # remove trailing .exe if any
18430  new_path="${new_path/%.exe/}"
18431
18432    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18433
18434  # First separate the path from the arguments. This will split at the first
18435  # space.
18436  complete="$FOUND_MAKE"
18437  path="${complete%% *}"
18438  tmp="$complete EOL"
18439  arguments="${tmp#* }"
18440
18441  # Input might be given as Windows format, start by converting to
18442  # unix format.
18443  new_path="$path"
18444
18445  windows_path="$new_path"
18446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18447    unix_path=`$CYGPATH -u "$windows_path"`
18448    new_path="$unix_path"
18449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18451    new_path="$unix_path"
18452  fi
18453
18454
18455  # Now try to locate executable using which
18456  new_path=`$WHICH "$new_path" 2> /dev/null`
18457
18458  if test "x$new_path" = x; then
18459    # Oops. Which didn't find the executable.
18460    # The splitting of arguments from the executable at a space might have been incorrect,
18461    # since paths with space are more likely in Windows. Give it another try with the whole
18462    # argument.
18463    path="$complete"
18464    arguments="EOL"
18465    new_path="$path"
18466
18467  windows_path="$new_path"
18468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18469    unix_path=`$CYGPATH -u "$windows_path"`
18470    new_path="$unix_path"
18471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18473    new_path="$unix_path"
18474  fi
18475
18476
18477    new_path=`$WHICH "$new_path" 2> /dev/null`
18478    # bat and cmd files are not always considered executable in MSYS causing which
18479    # to not find them
18480    if test "x$new_path" = x \
18481        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18482        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18483      new_path="$path"
18484
18485  windows_path="$new_path"
18486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18487    unix_path=`$CYGPATH -u "$windows_path"`
18488    new_path="$unix_path"
18489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18491    new_path="$unix_path"
18492  fi
18493
18494    fi
18495
18496    if test "x$new_path" = x; then
18497      # It's still not found. Now this is an unrecoverable error.
18498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18499$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18500      has_space=`$ECHO "$complete" | $GREP " "`
18501      if test "x$has_space" != x; then
18502        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18503$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18504      fi
18505      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18506    fi
18507  fi
18508
18509  # Now new_path has a complete unix path to the binary
18510  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18511    # Keep paths in /bin as-is, but remove trailing .exe if any
18512    new_path="${new_path/%.exe/}"
18513    # Do not save /bin paths to all_fixpath_prefixes!
18514  else
18515    # Not in mixed or Windows style, start by that.
18516    new_path=`cmd //c echo $new_path`
18517
18518  input_path="$new_path"
18519  # Check if we need to convert this using DOS-style short mode. If the path
18520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18521  # take no chances and rewrite it.
18522  # Note: m4 eats our [], so we need to use [ and ] instead.
18523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18524  if test "x$has_forbidden_chars" != x; then
18525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18526    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18527  fi
18528
18529    # Output is in $new_path
18530
18531  windows_path="$new_path"
18532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18533    unix_path=`$CYGPATH -u "$windows_path"`
18534    new_path="$unix_path"
18535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18537    new_path="$unix_path"
18538  fi
18539
18540    # remove trailing .exe if any
18541    new_path="${new_path/%.exe/}"
18542
18543    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18544    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18545  fi
18546
18547    else
18548      # We're on a unix platform. Hooray! :)
18549      # First separate the path from the arguments. This will split at the first
18550      # space.
18551      complete="$FOUND_MAKE"
18552      path="${complete%% *}"
18553      tmp="$complete EOL"
18554      arguments="${tmp#* }"
18555
18556      # Cannot rely on the command "which" here since it doesn't always work.
18557      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18558      if test -z "$is_absolute_path"; then
18559        # Path to executable is not absolute. Find it.
18560        IFS_save="$IFS"
18561        IFS=:
18562        for p in $PATH; do
18563          if test -f "$p/$path" && test -x "$p/$path"; then
18564            new_path="$p/$path"
18565            break
18566          fi
18567        done
18568        IFS="$IFS_save"
18569      else
18570        # This is an absolute path, we can use it without further modifications.
18571        new_path="$path"
18572      fi
18573
18574      if test "x$new_path" = x; then
18575        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18576$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18577        has_space=`$ECHO "$complete" | $GREP " "`
18578        if test "x$has_space" != x; then
18579          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18580$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18581        fi
18582        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18583      fi
18584    fi
18585
18586    # Now join together the path and the arguments once again
18587    if test "x$arguments" != xEOL; then
18588      new_complete="$new_path ${arguments% *}"
18589    else
18590      new_complete="$new_path"
18591    fi
18592
18593    if test "x$complete" != "x$new_complete"; then
18594      FOUND_MAKE="$new_complete"
18595      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18596$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18597    fi
18598  fi
18599
18600        fi
18601      fi
18602    fi
18603  fi
18604
18605        fi
18606        PATH=$OLD_PATH
18607      fi
18608    fi
18609
18610    if test "x$FOUND_MAKE" = x; then
18611      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
18612    fi
18613
18614  else
18615    # The variable is set, but is it from the command line or the environment?
18616
18617    # Try to remove the string !MAKE! from our list.
18618    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18619    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18620      # If it failed, the variable was not from the command line. Ignore it,
18621      # but warn the user (except for BASH, which is always set by the calling BASH).
18622      if test "xMAKE" != xBASH; then
18623        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18624$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18625      fi
18626      # Try to locate tool using the code snippet
18627
18628    # Try our hardest to locate a correct version of GNU make
18629    for ac_prog in gmake
18630do
18631  # Extract the first word of "$ac_prog", so it can be a program name with args.
18632set dummy $ac_prog; ac_word=$2
18633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18634$as_echo_n "checking for $ac_word... " >&6; }
18635if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18636  $as_echo_n "(cached) " >&6
18637else
18638  case $CHECK_GMAKE in
18639  [\\/]* | ?:[\\/]*)
18640  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18641  ;;
18642  *)
18643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18644for as_dir in $PATH
18645do
18646  IFS=$as_save_IFS
18647  test -z "$as_dir" && as_dir=.
18648    for ac_exec_ext in '' $ac_executable_extensions; do
18649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18650    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18652    break 2
18653  fi
18654done
18655  done
18656IFS=$as_save_IFS
18657
18658  ;;
18659esac
18660fi
18661CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18662if test -n "$CHECK_GMAKE"; then
18663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18664$as_echo "$CHECK_GMAKE" >&6; }
18665else
18666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18667$as_echo "no" >&6; }
18668fi
18669
18670
18671  test -n "$CHECK_GMAKE" && break
18672done
18673
18674
18675  MAKE_CANDIDATE=""$CHECK_GMAKE""
18676  DESCRIPTION="gmake in PATH"
18677
18678  # On Cygwin, we require a newer version of make than on other platforms
18679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18680    MAKE_VERSION_EXPR="-e 4\."
18681    MAKE_REQUIRED_VERSION="4.0"
18682   else
18683    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18684    MAKE_REQUIRED_VERSION="3.81"
18685  fi
18686
18687  if test "x$MAKE_CANDIDATE" != x; then
18688    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18689$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18690    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18691    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18692    if test "x$IS_GNU_MAKE" = x; then
18693      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18694$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18695    else
18696      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18697      if test "x$IS_MODERN_MAKE" = x; then
18698        { $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
18699$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;}
18700      else
18701        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18702          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18703            MAKE_EXPECTED_ENV='cygwin'
18704          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18705            MAKE_EXPECTED_ENV='msys'
18706          else
18707            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18708          fi
18709          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18710          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18711        else
18712          # Not relevant for non-Windows
18713          IS_MAKE_CORRECT_ENV=true
18714        fi
18715        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18716          { $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
18717$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;}
18718        else
18719          FOUND_MAKE=$MAKE_CANDIDATE
18720
18721  # Only process if variable expands to non-empty
18722
18723  if test "x$FOUND_MAKE" != x; then
18724    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18725
18726  # First separate the path from the arguments. This will split at the first
18727  # space.
18728  complete="$FOUND_MAKE"
18729  path="${complete%% *}"
18730  tmp="$complete EOL"
18731  arguments="${tmp#* }"
18732
18733  # Input might be given as Windows format, start by converting to
18734  # unix format.
18735  new_path=`$CYGPATH -u "$path"`
18736
18737  # Now try to locate executable using which
18738  new_path=`$WHICH "$new_path" 2> /dev/null`
18739  # bat and cmd files are not always considered executable in cygwin causing which
18740  # to not find them
18741  if test "x$new_path" = x \
18742      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18743      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18744    new_path=`$CYGPATH -u "$path"`
18745  fi
18746  if test "x$new_path" = x; then
18747    # Oops. Which didn't find the executable.
18748    # The splitting of arguments from the executable at a space might have been incorrect,
18749    # since paths with space are more likely in Windows. Give it another try with the whole
18750    # argument.
18751    path="$complete"
18752    arguments="EOL"
18753    new_path=`$CYGPATH -u "$path"`
18754    new_path=`$WHICH "$new_path" 2> /dev/null`
18755    # bat and cmd files are not always considered executable in cygwin causing which
18756    # to not find them
18757    if test "x$new_path" = x \
18758        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18759        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18760      new_path=`$CYGPATH -u "$path"`
18761    fi
18762    if test "x$new_path" = x; then
18763      # It's still not found. Now this is an unrecoverable error.
18764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18765$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18766      has_space=`$ECHO "$complete" | $GREP " "`
18767      if test "x$has_space" != x; then
18768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18770      fi
18771      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18772    fi
18773  fi
18774
18775  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18776  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18777  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18778  # "foo.exe" is OK but "foo" is an error.
18779  #
18780  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18781  # It is also a way to make sure we got the proper file name for the real test later on.
18782  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18783  if test "x$test_shortpath" = x; then
18784    # Short path failed, file does not exist as specified.
18785    # Try adding .exe or .cmd
18786    if test -f "${new_path}.exe"; then
18787      input_to_shortpath="${new_path}.exe"
18788    elif test -f "${new_path}.cmd"; then
18789      input_to_shortpath="${new_path}.cmd"
18790    else
18791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18792$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18793      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18794$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18795      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18796    fi
18797  else
18798    input_to_shortpath="$new_path"
18799  fi
18800
18801  # Call helper function which possibly converts this using DOS-style short mode.
18802  # If so, the updated path is stored in $new_path.
18803  new_path="$input_to_shortpath"
18804
18805  input_path="$input_to_shortpath"
18806  # Check if we need to convert this using DOS-style short mode. If the path
18807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18808  # take no chances and rewrite it.
18809  # Note: m4 eats our [], so we need to use [ and ] instead.
18810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18811  if test "x$has_forbidden_chars" != x; then
18812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18816      # Going to short mode and back again did indeed matter. Since short mode is
18817      # case insensitive, let's make it lowercase to improve readability.
18818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18819      # Now convert it back to Unix-style (cygpath)
18820      input_path=`$CYGPATH -u "$shortmode_path"`
18821      new_path="$input_path"
18822    fi
18823  fi
18824
18825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18826  if test "x$test_cygdrive_prefix" = x; then
18827    # As a simple fix, exclude /usr/bin since it's not a real path.
18828    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18830      # a path prefixed by /cygdrive for fixpath to work.
18831      new_path="$CYGWIN_ROOT_PATH$input_path"
18832    fi
18833  fi
18834
18835  # remove trailing .exe if any
18836  new_path="${new_path/%.exe/}"
18837
18838    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18839
18840  # First separate the path from the arguments. This will split at the first
18841  # space.
18842  complete="$FOUND_MAKE"
18843  path="${complete%% *}"
18844  tmp="$complete EOL"
18845  arguments="${tmp#* }"
18846
18847  # Input might be given as Windows format, start by converting to
18848  # unix format.
18849  new_path="$path"
18850
18851  windows_path="$new_path"
18852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18853    unix_path=`$CYGPATH -u "$windows_path"`
18854    new_path="$unix_path"
18855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18857    new_path="$unix_path"
18858  fi
18859
18860
18861  # Now try to locate executable using which
18862  new_path=`$WHICH "$new_path" 2> /dev/null`
18863
18864  if test "x$new_path" = x; then
18865    # Oops. Which didn't find the executable.
18866    # The splitting of arguments from the executable at a space might have been incorrect,
18867    # since paths with space are more likely in Windows. Give it another try with the whole
18868    # argument.
18869    path="$complete"
18870    arguments="EOL"
18871    new_path="$path"
18872
18873  windows_path="$new_path"
18874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18875    unix_path=`$CYGPATH -u "$windows_path"`
18876    new_path="$unix_path"
18877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18879    new_path="$unix_path"
18880  fi
18881
18882
18883    new_path=`$WHICH "$new_path" 2> /dev/null`
18884    # bat and cmd files are not always considered executable in MSYS causing which
18885    # to not find them
18886    if test "x$new_path" = x \
18887        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18888        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18889      new_path="$path"
18890
18891  windows_path="$new_path"
18892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18893    unix_path=`$CYGPATH -u "$windows_path"`
18894    new_path="$unix_path"
18895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18897    new_path="$unix_path"
18898  fi
18899
18900    fi
18901
18902    if test "x$new_path" = x; then
18903      # It's still not found. Now this is an unrecoverable error.
18904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18905$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18906      has_space=`$ECHO "$complete" | $GREP " "`
18907      if test "x$has_space" != x; then
18908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18910      fi
18911      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18912    fi
18913  fi
18914
18915  # Now new_path has a complete unix path to the binary
18916  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18917    # Keep paths in /bin as-is, but remove trailing .exe if any
18918    new_path="${new_path/%.exe/}"
18919    # Do not save /bin paths to all_fixpath_prefixes!
18920  else
18921    # Not in mixed or Windows style, start by that.
18922    new_path=`cmd //c echo $new_path`
18923
18924  input_path="$new_path"
18925  # Check if we need to convert this using DOS-style short mode. If the path
18926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18927  # take no chances and rewrite it.
18928  # Note: m4 eats our [], so we need to use [ and ] instead.
18929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18930  if test "x$has_forbidden_chars" != x; then
18931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18933  fi
18934
18935    # Output is in $new_path
18936
18937  windows_path="$new_path"
18938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18939    unix_path=`$CYGPATH -u "$windows_path"`
18940    new_path="$unix_path"
18941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18943    new_path="$unix_path"
18944  fi
18945
18946    # remove trailing .exe if any
18947    new_path="${new_path/%.exe/}"
18948
18949    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18950    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18951  fi
18952
18953    else
18954      # We're on a unix platform. Hooray! :)
18955      # First separate the path from the arguments. This will split at the first
18956      # space.
18957      complete="$FOUND_MAKE"
18958      path="${complete%% *}"
18959      tmp="$complete EOL"
18960      arguments="${tmp#* }"
18961
18962      # Cannot rely on the command "which" here since it doesn't always work.
18963      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18964      if test -z "$is_absolute_path"; then
18965        # Path to executable is not absolute. Find it.
18966        IFS_save="$IFS"
18967        IFS=:
18968        for p in $PATH; do
18969          if test -f "$p/$path" && test -x "$p/$path"; then
18970            new_path="$p/$path"
18971            break
18972          fi
18973        done
18974        IFS="$IFS_save"
18975      else
18976        # This is an absolute path, we can use it without further modifications.
18977        new_path="$path"
18978      fi
18979
18980      if test "x$new_path" = x; then
18981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18982$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18983        has_space=`$ECHO "$complete" | $GREP " "`
18984        if test "x$has_space" != x; then
18985          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18986$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18987        fi
18988        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18989      fi
18990    fi
18991
18992    # Now join together the path and the arguments once again
18993    if test "x$arguments" != xEOL; then
18994      new_complete="$new_path ${arguments% *}"
18995    else
18996      new_complete="$new_path"
18997    fi
18998
18999    if test "x$complete" != "x$new_complete"; then
19000      FOUND_MAKE="$new_complete"
19001      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19002$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19003    fi
19004  fi
19005
19006        fi
19007      fi
19008    fi
19009  fi
19010
19011
19012    if test "x$FOUND_MAKE" = x; then
19013      for ac_prog in make
19014do
19015  # Extract the first word of "$ac_prog", so it can be a program name with args.
19016set dummy $ac_prog; ac_word=$2
19017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19018$as_echo_n "checking for $ac_word... " >&6; }
19019if ${ac_cv_path_CHECK_MAKE+:} false; then :
19020  $as_echo_n "(cached) " >&6
19021else
19022  case $CHECK_MAKE in
19023  [\\/]* | ?:[\\/]*)
19024  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19025  ;;
19026  *)
19027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19028for as_dir in $PATH
19029do
19030  IFS=$as_save_IFS
19031  test -z "$as_dir" && as_dir=.
19032    for ac_exec_ext in '' $ac_executable_extensions; do
19033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19034    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19036    break 2
19037  fi
19038done
19039  done
19040IFS=$as_save_IFS
19041
19042  ;;
19043esac
19044fi
19045CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19046if test -n "$CHECK_MAKE"; then
19047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19048$as_echo "$CHECK_MAKE" >&6; }
19049else
19050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19051$as_echo "no" >&6; }
19052fi
19053
19054
19055  test -n "$CHECK_MAKE" && break
19056done
19057
19058
19059  MAKE_CANDIDATE=""$CHECK_MAKE""
19060  DESCRIPTION="make in PATH"
19061
19062  # On Cygwin, we require a newer version of make than on other platforms
19063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19064    MAKE_VERSION_EXPR="-e 4\."
19065    MAKE_REQUIRED_VERSION="4.0"
19066   else
19067    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19068    MAKE_REQUIRED_VERSION="3.81"
19069  fi
19070
19071  if test "x$MAKE_CANDIDATE" != x; then
19072    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19073$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19074    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19075    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19076    if test "x$IS_GNU_MAKE" = x; then
19077      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19078$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19079    else
19080      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19081      if test "x$IS_MODERN_MAKE" = x; then
19082        { $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
19083$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;}
19084      else
19085        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19086          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19087            MAKE_EXPECTED_ENV='cygwin'
19088          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19089            MAKE_EXPECTED_ENV='msys'
19090          else
19091            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19092          fi
19093          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19094          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19095        else
19096          # Not relevant for non-Windows
19097          IS_MAKE_CORRECT_ENV=true
19098        fi
19099        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19100          { $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
19101$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;}
19102        else
19103          FOUND_MAKE=$MAKE_CANDIDATE
19104
19105  # Only process if variable expands to non-empty
19106
19107  if test "x$FOUND_MAKE" != x; then
19108    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19109
19110  # First separate the path from the arguments. This will split at the first
19111  # space.
19112  complete="$FOUND_MAKE"
19113  path="${complete%% *}"
19114  tmp="$complete EOL"
19115  arguments="${tmp#* }"
19116
19117  # Input might be given as Windows format, start by converting to
19118  # unix format.
19119  new_path=`$CYGPATH -u "$path"`
19120
19121  # Now try to locate executable using which
19122  new_path=`$WHICH "$new_path" 2> /dev/null`
19123  # bat and cmd files are not always considered executable in cygwin causing which
19124  # to not find them
19125  if test "x$new_path" = x \
19126      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19127      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19128    new_path=`$CYGPATH -u "$path"`
19129  fi
19130  if test "x$new_path" = x; then
19131    # Oops. Which didn't find the executable.
19132    # The splitting of arguments from the executable at a space might have been incorrect,
19133    # since paths with space are more likely in Windows. Give it another try with the whole
19134    # argument.
19135    path="$complete"
19136    arguments="EOL"
19137    new_path=`$CYGPATH -u "$path"`
19138    new_path=`$WHICH "$new_path" 2> /dev/null`
19139    # bat and cmd files are not always considered executable in cygwin causing which
19140    # to not find them
19141    if test "x$new_path" = x \
19142        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19143        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19144      new_path=`$CYGPATH -u "$path"`
19145    fi
19146    if test "x$new_path" = x; then
19147      # It's still not found. Now this is an unrecoverable error.
19148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19149$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19150      has_space=`$ECHO "$complete" | $GREP " "`
19151      if test "x$has_space" != x; then
19152        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19153$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19154      fi
19155      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19156    fi
19157  fi
19158
19159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19162  # "foo.exe" is OK but "foo" is an error.
19163  #
19164  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19165  # It is also a way to make sure we got the proper file name for the real test later on.
19166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19167  if test "x$test_shortpath" = x; then
19168    # Short path failed, file does not exist as specified.
19169    # Try adding .exe or .cmd
19170    if test -f "${new_path}.exe"; then
19171      input_to_shortpath="${new_path}.exe"
19172    elif test -f "${new_path}.cmd"; then
19173      input_to_shortpath="${new_path}.cmd"
19174    else
19175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19176$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19177      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19178$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19179      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19180    fi
19181  else
19182    input_to_shortpath="$new_path"
19183  fi
19184
19185  # Call helper function which possibly converts this using DOS-style short mode.
19186  # If so, the updated path is stored in $new_path.
19187  new_path="$input_to_shortpath"
19188
19189  input_path="$input_to_shortpath"
19190  # Check if we need to convert this using DOS-style short mode. If the path
19191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19192  # take no chances and rewrite it.
19193  # Note: m4 eats our [], so we need to use [ and ] instead.
19194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19195  if test "x$has_forbidden_chars" != x; then
19196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19200      # Going to short mode and back again did indeed matter. Since short mode is
19201      # case insensitive, let's make it lowercase to improve readability.
19202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19203      # Now convert it back to Unix-style (cygpath)
19204      input_path=`$CYGPATH -u "$shortmode_path"`
19205      new_path="$input_path"
19206    fi
19207  fi
19208
19209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19210  if test "x$test_cygdrive_prefix" = x; then
19211    # As a simple fix, exclude /usr/bin since it's not a real path.
19212    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19214      # a path prefixed by /cygdrive for fixpath to work.
19215      new_path="$CYGWIN_ROOT_PATH$input_path"
19216    fi
19217  fi
19218
19219  # remove trailing .exe if any
19220  new_path="${new_path/%.exe/}"
19221
19222    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19223
19224  # First separate the path from the arguments. This will split at the first
19225  # space.
19226  complete="$FOUND_MAKE"
19227  path="${complete%% *}"
19228  tmp="$complete EOL"
19229  arguments="${tmp#* }"
19230
19231  # Input might be given as Windows format, start by converting to
19232  # unix format.
19233  new_path="$path"
19234
19235  windows_path="$new_path"
19236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19237    unix_path=`$CYGPATH -u "$windows_path"`
19238    new_path="$unix_path"
19239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19241    new_path="$unix_path"
19242  fi
19243
19244
19245  # Now try to locate executable using which
19246  new_path=`$WHICH "$new_path" 2> /dev/null`
19247
19248  if test "x$new_path" = x; then
19249    # Oops. Which didn't find the executable.
19250    # The splitting of arguments from the executable at a space might have been incorrect,
19251    # since paths with space are more likely in Windows. Give it another try with the whole
19252    # argument.
19253    path="$complete"
19254    arguments="EOL"
19255    new_path="$path"
19256
19257  windows_path="$new_path"
19258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19259    unix_path=`$CYGPATH -u "$windows_path"`
19260    new_path="$unix_path"
19261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19263    new_path="$unix_path"
19264  fi
19265
19266
19267    new_path=`$WHICH "$new_path" 2> /dev/null`
19268    # bat and cmd files are not always considered executable in MSYS causing which
19269    # to not find them
19270    if test "x$new_path" = x \
19271        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19272        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19273      new_path="$path"
19274
19275  windows_path="$new_path"
19276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19277    unix_path=`$CYGPATH -u "$windows_path"`
19278    new_path="$unix_path"
19279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19281    new_path="$unix_path"
19282  fi
19283
19284    fi
19285
19286    if test "x$new_path" = x; then
19287      # It's still not found. Now this is an unrecoverable error.
19288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19289$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19290      has_space=`$ECHO "$complete" | $GREP " "`
19291      if test "x$has_space" != x; then
19292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19294      fi
19295      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19296    fi
19297  fi
19298
19299  # Now new_path has a complete unix path to the binary
19300  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19301    # Keep paths in /bin as-is, but remove trailing .exe if any
19302    new_path="${new_path/%.exe/}"
19303    # Do not save /bin paths to all_fixpath_prefixes!
19304  else
19305    # Not in mixed or Windows style, start by that.
19306    new_path=`cmd //c echo $new_path`
19307
19308  input_path="$new_path"
19309  # Check if we need to convert this using DOS-style short mode. If the path
19310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19311  # take no chances and rewrite it.
19312  # Note: m4 eats our [], so we need to use [ and ] instead.
19313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19314  if test "x$has_forbidden_chars" != x; then
19315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19317  fi
19318
19319    # Output is in $new_path
19320
19321  windows_path="$new_path"
19322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19323    unix_path=`$CYGPATH -u "$windows_path"`
19324    new_path="$unix_path"
19325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19327    new_path="$unix_path"
19328  fi
19329
19330    # remove trailing .exe if any
19331    new_path="${new_path/%.exe/}"
19332
19333    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19334    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19335  fi
19336
19337    else
19338      # We're on a unix platform. Hooray! :)
19339      # First separate the path from the arguments. This will split at the first
19340      # space.
19341      complete="$FOUND_MAKE"
19342      path="${complete%% *}"
19343      tmp="$complete EOL"
19344      arguments="${tmp#* }"
19345
19346      # Cannot rely on the command "which" here since it doesn't always work.
19347      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19348      if test -z "$is_absolute_path"; then
19349        # Path to executable is not absolute. Find it.
19350        IFS_save="$IFS"
19351        IFS=:
19352        for p in $PATH; do
19353          if test -f "$p/$path" && test -x "$p/$path"; then
19354            new_path="$p/$path"
19355            break
19356          fi
19357        done
19358        IFS="$IFS_save"
19359      else
19360        # This is an absolute path, we can use it without further modifications.
19361        new_path="$path"
19362      fi
19363
19364      if test "x$new_path" = x; then
19365        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19366$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19367        has_space=`$ECHO "$complete" | $GREP " "`
19368        if test "x$has_space" != x; then
19369          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19370$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19371        fi
19372        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19373      fi
19374    fi
19375
19376    # Now join together the path and the arguments once again
19377    if test "x$arguments" != xEOL; then
19378      new_complete="$new_path ${arguments% *}"
19379    else
19380      new_complete="$new_path"
19381    fi
19382
19383    if test "x$complete" != "x$new_complete"; then
19384      FOUND_MAKE="$new_complete"
19385      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19386$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19387    fi
19388  fi
19389
19390        fi
19391      fi
19392    fi
19393  fi
19394
19395    fi
19396
19397    if test "x$FOUND_MAKE" = x; then
19398      if test "x$TOOLCHAIN_PATH" != x; then
19399        # We have a toolchain path, check that as well before giving up.
19400        OLD_PATH=$PATH
19401        PATH=$TOOLCHAIN_PATH:$PATH
19402        for ac_prog in gmake
19403do
19404  # Extract the first word of "$ac_prog", so it can be a program name with args.
19405set dummy $ac_prog; ac_word=$2
19406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19407$as_echo_n "checking for $ac_word... " >&6; }
19408if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19409  $as_echo_n "(cached) " >&6
19410else
19411  case $CHECK_TOOLSDIR_GMAKE in
19412  [\\/]* | ?:[\\/]*)
19413  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19414  ;;
19415  *)
19416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19417for as_dir in $PATH
19418do
19419  IFS=$as_save_IFS
19420  test -z "$as_dir" && as_dir=.
19421    for ac_exec_ext in '' $ac_executable_extensions; do
19422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19423    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19425    break 2
19426  fi
19427done
19428  done
19429IFS=$as_save_IFS
19430
19431  ;;
19432esac
19433fi
19434CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19435if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19437$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19438else
19439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19440$as_echo "no" >&6; }
19441fi
19442
19443
19444  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19445done
19446
19447
19448  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19449  DESCRIPTION="gmake in tools-dir"
19450
19451  # On Cygwin, we require a newer version of make than on other platforms
19452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19453    MAKE_VERSION_EXPR="-e 4\."
19454    MAKE_REQUIRED_VERSION="4.0"
19455   else
19456    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19457    MAKE_REQUIRED_VERSION="3.81"
19458  fi
19459
19460  if test "x$MAKE_CANDIDATE" != x; then
19461    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19462$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19463    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19464    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19465    if test "x$IS_GNU_MAKE" = x; then
19466      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19467$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19468    else
19469      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19470      if test "x$IS_MODERN_MAKE" = x; then
19471        { $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
19472$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;}
19473      else
19474        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19475          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19476            MAKE_EXPECTED_ENV='cygwin'
19477          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19478            MAKE_EXPECTED_ENV='msys'
19479          else
19480            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19481          fi
19482          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19483          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19484        else
19485          # Not relevant for non-Windows
19486          IS_MAKE_CORRECT_ENV=true
19487        fi
19488        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19489          { $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
19490$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;}
19491        else
19492          FOUND_MAKE=$MAKE_CANDIDATE
19493
19494  # Only process if variable expands to non-empty
19495
19496  if test "x$FOUND_MAKE" != x; then
19497    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19498
19499  # First separate the path from the arguments. This will split at the first
19500  # space.
19501  complete="$FOUND_MAKE"
19502  path="${complete%% *}"
19503  tmp="$complete EOL"
19504  arguments="${tmp#* }"
19505
19506  # Input might be given as Windows format, start by converting to
19507  # unix format.
19508  new_path=`$CYGPATH -u "$path"`
19509
19510  # Now try to locate executable using which
19511  new_path=`$WHICH "$new_path" 2> /dev/null`
19512  # bat and cmd files are not always considered executable in cygwin causing which
19513  # to not find them
19514  if test "x$new_path" = x \
19515      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19516      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19517    new_path=`$CYGPATH -u "$path"`
19518  fi
19519  if test "x$new_path" = x; then
19520    # Oops. Which didn't find the executable.
19521    # The splitting of arguments from the executable at a space might have been incorrect,
19522    # since paths with space are more likely in Windows. Give it another try with the whole
19523    # argument.
19524    path="$complete"
19525    arguments="EOL"
19526    new_path=`$CYGPATH -u "$path"`
19527    new_path=`$WHICH "$new_path" 2> /dev/null`
19528    # bat and cmd files are not always considered executable in cygwin causing which
19529    # to not find them
19530    if test "x$new_path" = x \
19531        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19532        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19533      new_path=`$CYGPATH -u "$path"`
19534    fi
19535    if test "x$new_path" = x; then
19536      # It's still not found. Now this is an unrecoverable error.
19537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19538$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19539      has_space=`$ECHO "$complete" | $GREP " "`
19540      if test "x$has_space" != x; then
19541        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19542$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19543      fi
19544      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19545    fi
19546  fi
19547
19548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19551  # "foo.exe" is OK but "foo" is an error.
19552  #
19553  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19554  # It is also a way to make sure we got the proper file name for the real test later on.
19555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19556  if test "x$test_shortpath" = x; then
19557    # Short path failed, file does not exist as specified.
19558    # Try adding .exe or .cmd
19559    if test -f "${new_path}.exe"; then
19560      input_to_shortpath="${new_path}.exe"
19561    elif test -f "${new_path}.cmd"; then
19562      input_to_shortpath="${new_path}.cmd"
19563    else
19564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19565$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19566      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19567$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19568      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19569    fi
19570  else
19571    input_to_shortpath="$new_path"
19572  fi
19573
19574  # Call helper function which possibly converts this using DOS-style short mode.
19575  # If so, the updated path is stored in $new_path.
19576  new_path="$input_to_shortpath"
19577
19578  input_path="$input_to_shortpath"
19579  # Check if we need to convert this using DOS-style short mode. If the path
19580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19581  # take no chances and rewrite it.
19582  # Note: m4 eats our [], so we need to use [ and ] instead.
19583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19584  if test "x$has_forbidden_chars" != x; then
19585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19589      # Going to short mode and back again did indeed matter. Since short mode is
19590      # case insensitive, let's make it lowercase to improve readability.
19591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19592      # Now convert it back to Unix-style (cygpath)
19593      input_path=`$CYGPATH -u "$shortmode_path"`
19594      new_path="$input_path"
19595    fi
19596  fi
19597
19598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19599  if test "x$test_cygdrive_prefix" = x; then
19600    # As a simple fix, exclude /usr/bin since it's not a real path.
19601    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19603      # a path prefixed by /cygdrive for fixpath to work.
19604      new_path="$CYGWIN_ROOT_PATH$input_path"
19605    fi
19606  fi
19607
19608  # remove trailing .exe if any
19609  new_path="${new_path/%.exe/}"
19610
19611    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19612
19613  # First separate the path from the arguments. This will split at the first
19614  # space.
19615  complete="$FOUND_MAKE"
19616  path="${complete%% *}"
19617  tmp="$complete EOL"
19618  arguments="${tmp#* }"
19619
19620  # Input might be given as Windows format, start by converting to
19621  # unix format.
19622  new_path="$path"
19623
19624  windows_path="$new_path"
19625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19626    unix_path=`$CYGPATH -u "$windows_path"`
19627    new_path="$unix_path"
19628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19630    new_path="$unix_path"
19631  fi
19632
19633
19634  # Now try to locate executable using which
19635  new_path=`$WHICH "$new_path" 2> /dev/null`
19636
19637  if test "x$new_path" = x; then
19638    # Oops. Which didn't find the executable.
19639    # The splitting of arguments from the executable at a space might have been incorrect,
19640    # since paths with space are more likely in Windows. Give it another try with the whole
19641    # argument.
19642    path="$complete"
19643    arguments="EOL"
19644    new_path="$path"
19645
19646  windows_path="$new_path"
19647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19648    unix_path=`$CYGPATH -u "$windows_path"`
19649    new_path="$unix_path"
19650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19652    new_path="$unix_path"
19653  fi
19654
19655
19656    new_path=`$WHICH "$new_path" 2> /dev/null`
19657    # bat and cmd files are not always considered executable in MSYS causing which
19658    # to not find them
19659    if test "x$new_path" = x \
19660        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19661        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19662      new_path="$path"
19663
19664  windows_path="$new_path"
19665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19666    unix_path=`$CYGPATH -u "$windows_path"`
19667    new_path="$unix_path"
19668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19670    new_path="$unix_path"
19671  fi
19672
19673    fi
19674
19675    if test "x$new_path" = x; then
19676      # It's still not found. Now this is an unrecoverable error.
19677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19678$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19679      has_space=`$ECHO "$complete" | $GREP " "`
19680      if test "x$has_space" != x; then
19681        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19682$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19683      fi
19684      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19685    fi
19686  fi
19687
19688  # Now new_path has a complete unix path to the binary
19689  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19690    # Keep paths in /bin as-is, but remove trailing .exe if any
19691    new_path="${new_path/%.exe/}"
19692    # Do not save /bin paths to all_fixpath_prefixes!
19693  else
19694    # Not in mixed or Windows style, start by that.
19695    new_path=`cmd //c echo $new_path`
19696
19697  input_path="$new_path"
19698  # Check if we need to convert this using DOS-style short mode. If the path
19699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19700  # take no chances and rewrite it.
19701  # Note: m4 eats our [], so we need to use [ and ] instead.
19702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19703  if test "x$has_forbidden_chars" != x; then
19704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19706  fi
19707
19708    # Output is in $new_path
19709
19710  windows_path="$new_path"
19711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19712    unix_path=`$CYGPATH -u "$windows_path"`
19713    new_path="$unix_path"
19714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19716    new_path="$unix_path"
19717  fi
19718
19719    # remove trailing .exe if any
19720    new_path="${new_path/%.exe/}"
19721
19722    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19723    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19724  fi
19725
19726    else
19727      # We're on a unix platform. Hooray! :)
19728      # First separate the path from the arguments. This will split at the first
19729      # space.
19730      complete="$FOUND_MAKE"
19731      path="${complete%% *}"
19732      tmp="$complete EOL"
19733      arguments="${tmp#* }"
19734
19735      # Cannot rely on the command "which" here since it doesn't always work.
19736      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19737      if test -z "$is_absolute_path"; then
19738        # Path to executable is not absolute. Find it.
19739        IFS_save="$IFS"
19740        IFS=:
19741        for p in $PATH; do
19742          if test -f "$p/$path" && test -x "$p/$path"; then
19743            new_path="$p/$path"
19744            break
19745          fi
19746        done
19747        IFS="$IFS_save"
19748      else
19749        # This is an absolute path, we can use it without further modifications.
19750        new_path="$path"
19751      fi
19752
19753      if test "x$new_path" = x; then
19754        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19755$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19756        has_space=`$ECHO "$complete" | $GREP " "`
19757        if test "x$has_space" != x; then
19758          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19759$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19760        fi
19761        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19762      fi
19763    fi
19764
19765    # Now join together the path and the arguments once again
19766    if test "x$arguments" != xEOL; then
19767      new_complete="$new_path ${arguments% *}"
19768    else
19769      new_complete="$new_path"
19770    fi
19771
19772    if test "x$complete" != "x$new_complete"; then
19773      FOUND_MAKE="$new_complete"
19774      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19775$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19776    fi
19777  fi
19778
19779        fi
19780      fi
19781    fi
19782  fi
19783
19784        if test "x$FOUND_MAKE" = x; then
19785          for ac_prog in make
19786do
19787  # Extract the first word of "$ac_prog", so it can be a program name with args.
19788set dummy $ac_prog; ac_word=$2
19789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19790$as_echo_n "checking for $ac_word... " >&6; }
19791if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19792  $as_echo_n "(cached) " >&6
19793else
19794  case $CHECK_TOOLSDIR_MAKE in
19795  [\\/]* | ?:[\\/]*)
19796  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19797  ;;
19798  *)
19799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19800for as_dir in $PATH
19801do
19802  IFS=$as_save_IFS
19803  test -z "$as_dir" && as_dir=.
19804    for ac_exec_ext in '' $ac_executable_extensions; do
19805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19806    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19808    break 2
19809  fi
19810done
19811  done
19812IFS=$as_save_IFS
19813
19814  ;;
19815esac
19816fi
19817CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19818if test -n "$CHECK_TOOLSDIR_MAKE"; then
19819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19820$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19821else
19822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19823$as_echo "no" >&6; }
19824fi
19825
19826
19827  test -n "$CHECK_TOOLSDIR_MAKE" && break
19828done
19829
19830
19831  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19832  DESCRIPTION="make in tools-dir"
19833
19834  # On Cygwin, we require a newer version of make than on other platforms
19835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19836    MAKE_VERSION_EXPR="-e 4\."
19837    MAKE_REQUIRED_VERSION="4.0"
19838   else
19839    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19840    MAKE_REQUIRED_VERSION="3.81"
19841  fi
19842
19843  if test "x$MAKE_CANDIDATE" != x; then
19844    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19845$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19846    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19847    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19848    if test "x$IS_GNU_MAKE" = x; then
19849      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19850$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19851    else
19852      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19853      if test "x$IS_MODERN_MAKE" = x; then
19854        { $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
19855$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;}
19856      else
19857        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19858          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19859            MAKE_EXPECTED_ENV='cygwin'
19860          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19861            MAKE_EXPECTED_ENV='msys'
19862          else
19863            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19864          fi
19865          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19866          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19867        else
19868          # Not relevant for non-Windows
19869          IS_MAKE_CORRECT_ENV=true
19870        fi
19871        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19872          { $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
19873$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;}
19874        else
19875          FOUND_MAKE=$MAKE_CANDIDATE
19876
19877  # Only process if variable expands to non-empty
19878
19879  if test "x$FOUND_MAKE" != x; then
19880    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19881
19882  # First separate the path from the arguments. This will split at the first
19883  # space.
19884  complete="$FOUND_MAKE"
19885  path="${complete%% *}"
19886  tmp="$complete EOL"
19887  arguments="${tmp#* }"
19888
19889  # Input might be given as Windows format, start by converting to
19890  # unix format.
19891  new_path=`$CYGPATH -u "$path"`
19892
19893  # Now try to locate executable using which
19894  new_path=`$WHICH "$new_path" 2> /dev/null`
19895  # bat and cmd files are not always considered executable in cygwin causing which
19896  # to not find them
19897  if test "x$new_path" = x \
19898      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19899      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19900    new_path=`$CYGPATH -u "$path"`
19901  fi
19902  if test "x$new_path" = x; then
19903    # Oops. Which didn't find the executable.
19904    # The splitting of arguments from the executable at a space might have been incorrect,
19905    # since paths with space are more likely in Windows. Give it another try with the whole
19906    # argument.
19907    path="$complete"
19908    arguments="EOL"
19909    new_path=`$CYGPATH -u "$path"`
19910    new_path=`$WHICH "$new_path" 2> /dev/null`
19911    # bat and cmd files are not always considered executable in cygwin causing which
19912    # to not find them
19913    if test "x$new_path" = x \
19914        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19915        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19916      new_path=`$CYGPATH -u "$path"`
19917    fi
19918    if test "x$new_path" = x; then
19919      # It's still not found. Now this is an unrecoverable error.
19920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19921$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19922      has_space=`$ECHO "$complete" | $GREP " "`
19923      if test "x$has_space" != x; then
19924        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19925$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19926      fi
19927      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19928    fi
19929  fi
19930
19931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19934  # "foo.exe" is OK but "foo" is an error.
19935  #
19936  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19937  # It is also a way to make sure we got the proper file name for the real test later on.
19938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19939  if test "x$test_shortpath" = x; then
19940    # Short path failed, file does not exist as specified.
19941    # Try adding .exe or .cmd
19942    if test -f "${new_path}.exe"; then
19943      input_to_shortpath="${new_path}.exe"
19944    elif test -f "${new_path}.cmd"; then
19945      input_to_shortpath="${new_path}.cmd"
19946    else
19947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19948$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19949      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19950$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19951      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19952    fi
19953  else
19954    input_to_shortpath="$new_path"
19955  fi
19956
19957  # Call helper function which possibly converts this using DOS-style short mode.
19958  # If so, the updated path is stored in $new_path.
19959  new_path="$input_to_shortpath"
19960
19961  input_path="$input_to_shortpath"
19962  # Check if we need to convert this using DOS-style short mode. If the path
19963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19964  # take no chances and rewrite it.
19965  # Note: m4 eats our [], so we need to use [ and ] instead.
19966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19967  if test "x$has_forbidden_chars" != x; then
19968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19972      # Going to short mode and back again did indeed matter. Since short mode is
19973      # case insensitive, let's make it lowercase to improve readability.
19974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19975      # Now convert it back to Unix-style (cygpath)
19976      input_path=`$CYGPATH -u "$shortmode_path"`
19977      new_path="$input_path"
19978    fi
19979  fi
19980
19981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19982  if test "x$test_cygdrive_prefix" = x; then
19983    # As a simple fix, exclude /usr/bin since it's not a real path.
19984    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19986      # a path prefixed by /cygdrive for fixpath to work.
19987      new_path="$CYGWIN_ROOT_PATH$input_path"
19988    fi
19989  fi
19990
19991  # remove trailing .exe if any
19992  new_path="${new_path/%.exe/}"
19993
19994    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19995
19996  # First separate the path from the arguments. This will split at the first
19997  # space.
19998  complete="$FOUND_MAKE"
19999  path="${complete%% *}"
20000  tmp="$complete EOL"
20001  arguments="${tmp#* }"
20002
20003  # Input might be given as Windows format, start by converting to
20004  # unix format.
20005  new_path="$path"
20006
20007  windows_path="$new_path"
20008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20009    unix_path=`$CYGPATH -u "$windows_path"`
20010    new_path="$unix_path"
20011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20013    new_path="$unix_path"
20014  fi
20015
20016
20017  # Now try to locate executable using which
20018  new_path=`$WHICH "$new_path" 2> /dev/null`
20019
20020  if test "x$new_path" = x; then
20021    # Oops. Which didn't find the executable.
20022    # The splitting of arguments from the executable at a space might have been incorrect,
20023    # since paths with space are more likely in Windows. Give it another try with the whole
20024    # argument.
20025    path="$complete"
20026    arguments="EOL"
20027    new_path="$path"
20028
20029  windows_path="$new_path"
20030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20031    unix_path=`$CYGPATH -u "$windows_path"`
20032    new_path="$unix_path"
20033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20035    new_path="$unix_path"
20036  fi
20037
20038
20039    new_path=`$WHICH "$new_path" 2> /dev/null`
20040    # bat and cmd files are not always considered executable in MSYS causing which
20041    # to not find them
20042    if test "x$new_path" = x \
20043        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20044        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20045      new_path="$path"
20046
20047  windows_path="$new_path"
20048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20049    unix_path=`$CYGPATH -u "$windows_path"`
20050    new_path="$unix_path"
20051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20053    new_path="$unix_path"
20054  fi
20055
20056    fi
20057
20058    if test "x$new_path" = x; then
20059      # It's still not found. Now this is an unrecoverable error.
20060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20061$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20062      has_space=`$ECHO "$complete" | $GREP " "`
20063      if test "x$has_space" != x; then
20064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20066      fi
20067      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20068    fi
20069  fi
20070
20071  # Now new_path has a complete unix path to the binary
20072  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20073    # Keep paths in /bin as-is, but remove trailing .exe if any
20074    new_path="${new_path/%.exe/}"
20075    # Do not save /bin paths to all_fixpath_prefixes!
20076  else
20077    # Not in mixed or Windows style, start by that.
20078    new_path=`cmd //c echo $new_path`
20079
20080  input_path="$new_path"
20081  # Check if we need to convert this using DOS-style short mode. If the path
20082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20083  # take no chances and rewrite it.
20084  # Note: m4 eats our [], so we need to use [ and ] instead.
20085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20086  if test "x$has_forbidden_chars" != x; then
20087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20089  fi
20090
20091    # Output is in $new_path
20092
20093  windows_path="$new_path"
20094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20095    unix_path=`$CYGPATH -u "$windows_path"`
20096    new_path="$unix_path"
20097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20099    new_path="$unix_path"
20100  fi
20101
20102    # remove trailing .exe if any
20103    new_path="${new_path/%.exe/}"
20104
20105    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20106    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20107  fi
20108
20109    else
20110      # We're on a unix platform. Hooray! :)
20111      # First separate the path from the arguments. This will split at the first
20112      # space.
20113      complete="$FOUND_MAKE"
20114      path="${complete%% *}"
20115      tmp="$complete EOL"
20116      arguments="${tmp#* }"
20117
20118      # Cannot rely on the command "which" here since it doesn't always work.
20119      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20120      if test -z "$is_absolute_path"; then
20121        # Path to executable is not absolute. Find it.
20122        IFS_save="$IFS"
20123        IFS=:
20124        for p in $PATH; do
20125          if test -f "$p/$path" && test -x "$p/$path"; then
20126            new_path="$p/$path"
20127            break
20128          fi
20129        done
20130        IFS="$IFS_save"
20131      else
20132        # This is an absolute path, we can use it without further modifications.
20133        new_path="$path"
20134      fi
20135
20136      if test "x$new_path" = x; then
20137        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20138$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20139        has_space=`$ECHO "$complete" | $GREP " "`
20140        if test "x$has_space" != x; then
20141          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20142$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20143        fi
20144        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20145      fi
20146    fi
20147
20148    # Now join together the path and the arguments once again
20149    if test "x$arguments" != xEOL; then
20150      new_complete="$new_path ${arguments% *}"
20151    else
20152      new_complete="$new_path"
20153    fi
20154
20155    if test "x$complete" != "x$new_complete"; then
20156      FOUND_MAKE="$new_complete"
20157      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20158$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20159    fi
20160  fi
20161
20162        fi
20163      fi
20164    fi
20165  fi
20166
20167        fi
20168        PATH=$OLD_PATH
20169      fi
20170    fi
20171
20172    if test "x$FOUND_MAKE" = x; then
20173      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
20174    fi
20175
20176    else
20177      # If it succeeded, then it was overridden by the user. We will use it
20178      # for the tool.
20179
20180      # First remove it from the list of overridden variables, so we can test
20181      # for unknown variables in the end.
20182      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20183
20184      # Check if we try to supply an empty value
20185      if test "x$MAKE" = x; then
20186        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20187$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20188        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20189$as_echo_n "checking for MAKE... " >&6; }
20190        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20191$as_echo "disabled" >&6; }
20192      else
20193        # Check if the provided tool contains a complete path.
20194        tool_specified="$MAKE"
20195        tool_basename="${tool_specified##*/}"
20196        if test "x$tool_basename" = "x$tool_specified"; then
20197          # A command without a complete path is provided, search $PATH.
20198          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20199$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20200          # Extract the first word of "$tool_basename", so it can be a program name with args.
20201set dummy $tool_basename; ac_word=$2
20202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20203$as_echo_n "checking for $ac_word... " >&6; }
20204if ${ac_cv_path_MAKE+:} false; then :
20205  $as_echo_n "(cached) " >&6
20206else
20207  case $MAKE in
20208  [\\/]* | ?:[\\/]*)
20209  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20210  ;;
20211  *)
20212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20213for as_dir in $PATH
20214do
20215  IFS=$as_save_IFS
20216  test -z "$as_dir" && as_dir=.
20217    for ac_exec_ext in '' $ac_executable_extensions; do
20218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20219    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20221    break 2
20222  fi
20223done
20224  done
20225IFS=$as_save_IFS
20226
20227  ;;
20228esac
20229fi
20230MAKE=$ac_cv_path_MAKE
20231if test -n "$MAKE"; then
20232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20233$as_echo "$MAKE" >&6; }
20234else
20235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20236$as_echo "no" >&6; }
20237fi
20238
20239
20240          if test "x$MAKE" = x; then
20241            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20242          fi
20243        else
20244          # Otherwise we believe it is a complete path. Use it as it is.
20245          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20246$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20247          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20248$as_echo_n "checking for MAKE... " >&6; }
20249          if test ! -x "$tool_specified"; then
20250            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20251$as_echo "not found" >&6; }
20252            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20253          fi
20254          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20255$as_echo "$tool_specified" >&6; }
20256        fi
20257      fi
20258    fi
20259
20260    # If MAKE was set by user, verify the version
20261
20262  MAKE_CANDIDATE=""$MAKE""
20263  DESCRIPTION="user supplied MAKE=$MAKE"
20264
20265  # On Cygwin, we require a newer version of make than on other platforms
20266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20267    MAKE_VERSION_EXPR="-e 4\."
20268    MAKE_REQUIRED_VERSION="4.0"
20269   else
20270    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20271    MAKE_REQUIRED_VERSION="3.81"
20272  fi
20273
20274  if test "x$MAKE_CANDIDATE" != x; then
20275    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20276$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20277    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20278    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20279    if test "x$IS_GNU_MAKE" = x; then
20280      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20281$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20282    else
20283      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20284      if test "x$IS_MODERN_MAKE" = x; then
20285        { $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
20286$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;}
20287      else
20288        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20289          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20290            MAKE_EXPECTED_ENV='cygwin'
20291          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20292            MAKE_EXPECTED_ENV='msys'
20293          else
20294            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20295          fi
20296          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20297          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20298        else
20299          # Not relevant for non-Windows
20300          IS_MAKE_CORRECT_ENV=true
20301        fi
20302        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20303          { $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
20304$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;}
20305        else
20306          FOUND_MAKE=$MAKE_CANDIDATE
20307
20308  # Only process if variable expands to non-empty
20309
20310  if test "x$FOUND_MAKE" != x; then
20311    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20312
20313  # First separate the path from the arguments. This will split at the first
20314  # space.
20315  complete="$FOUND_MAKE"
20316  path="${complete%% *}"
20317  tmp="$complete EOL"
20318  arguments="${tmp#* }"
20319
20320  # Input might be given as Windows format, start by converting to
20321  # unix format.
20322  new_path=`$CYGPATH -u "$path"`
20323
20324  # Now try to locate executable using which
20325  new_path=`$WHICH "$new_path" 2> /dev/null`
20326  # bat and cmd files are not always considered executable in cygwin causing which
20327  # to not find them
20328  if test "x$new_path" = x \
20329      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20330      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20331    new_path=`$CYGPATH -u "$path"`
20332  fi
20333  if test "x$new_path" = x; then
20334    # Oops. Which didn't find the executable.
20335    # The splitting of arguments from the executable at a space might have been incorrect,
20336    # since paths with space are more likely in Windows. Give it another try with the whole
20337    # argument.
20338    path="$complete"
20339    arguments="EOL"
20340    new_path=`$CYGPATH -u "$path"`
20341    new_path=`$WHICH "$new_path" 2> /dev/null`
20342    # bat and cmd files are not always considered executable in cygwin causing which
20343    # to not find them
20344    if test "x$new_path" = x \
20345        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20346        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20347      new_path=`$CYGPATH -u "$path"`
20348    fi
20349    if test "x$new_path" = x; then
20350      # It's still not found. Now this is an unrecoverable error.
20351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20352$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20353      has_space=`$ECHO "$complete" | $GREP " "`
20354      if test "x$has_space" != x; then
20355        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20356$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20357      fi
20358      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20359    fi
20360  fi
20361
20362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20365  # "foo.exe" is OK but "foo" is an error.
20366  #
20367  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20368  # It is also a way to make sure we got the proper file name for the real test later on.
20369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20370  if test "x$test_shortpath" = x; then
20371    # Short path failed, file does not exist as specified.
20372    # Try adding .exe or .cmd
20373    if test -f "${new_path}.exe"; then
20374      input_to_shortpath="${new_path}.exe"
20375    elif test -f "${new_path}.cmd"; then
20376      input_to_shortpath="${new_path}.cmd"
20377    else
20378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20379$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20380      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20381$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20382      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20383    fi
20384  else
20385    input_to_shortpath="$new_path"
20386  fi
20387
20388  # Call helper function which possibly converts this using DOS-style short mode.
20389  # If so, the updated path is stored in $new_path.
20390  new_path="$input_to_shortpath"
20391
20392  input_path="$input_to_shortpath"
20393  # Check if we need to convert this using DOS-style short mode. If the path
20394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20395  # take no chances and rewrite it.
20396  # Note: m4 eats our [], so we need to use [ and ] instead.
20397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20398  if test "x$has_forbidden_chars" != x; then
20399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20403      # Going to short mode and back again did indeed matter. Since short mode is
20404      # case insensitive, let's make it lowercase to improve readability.
20405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20406      # Now convert it back to Unix-style (cygpath)
20407      input_path=`$CYGPATH -u "$shortmode_path"`
20408      new_path="$input_path"
20409    fi
20410  fi
20411
20412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20413  if test "x$test_cygdrive_prefix" = x; then
20414    # As a simple fix, exclude /usr/bin since it's not a real path.
20415    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20417      # a path prefixed by /cygdrive for fixpath to work.
20418      new_path="$CYGWIN_ROOT_PATH$input_path"
20419    fi
20420  fi
20421
20422  # remove trailing .exe if any
20423  new_path="${new_path/%.exe/}"
20424
20425    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20426
20427  # First separate the path from the arguments. This will split at the first
20428  # space.
20429  complete="$FOUND_MAKE"
20430  path="${complete%% *}"
20431  tmp="$complete EOL"
20432  arguments="${tmp#* }"
20433
20434  # Input might be given as Windows format, start by converting to
20435  # unix format.
20436  new_path="$path"
20437
20438  windows_path="$new_path"
20439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20440    unix_path=`$CYGPATH -u "$windows_path"`
20441    new_path="$unix_path"
20442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20444    new_path="$unix_path"
20445  fi
20446
20447
20448  # Now try to locate executable using which
20449  new_path=`$WHICH "$new_path" 2> /dev/null`
20450
20451  if test "x$new_path" = x; then
20452    # Oops. Which didn't find the executable.
20453    # The splitting of arguments from the executable at a space might have been incorrect,
20454    # since paths with space are more likely in Windows. Give it another try with the whole
20455    # argument.
20456    path="$complete"
20457    arguments="EOL"
20458    new_path="$path"
20459
20460  windows_path="$new_path"
20461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20462    unix_path=`$CYGPATH -u "$windows_path"`
20463    new_path="$unix_path"
20464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20466    new_path="$unix_path"
20467  fi
20468
20469
20470    new_path=`$WHICH "$new_path" 2> /dev/null`
20471    # bat and cmd files are not always considered executable in MSYS causing which
20472    # to not find them
20473    if test "x$new_path" = x \
20474        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20475        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20476      new_path="$path"
20477
20478  windows_path="$new_path"
20479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20480    unix_path=`$CYGPATH -u "$windows_path"`
20481    new_path="$unix_path"
20482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20484    new_path="$unix_path"
20485  fi
20486
20487    fi
20488
20489    if test "x$new_path" = x; then
20490      # It's still not found. Now this is an unrecoverable error.
20491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20492$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20493      has_space=`$ECHO "$complete" | $GREP " "`
20494      if test "x$has_space" != x; then
20495        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20496$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20497      fi
20498      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20499    fi
20500  fi
20501
20502  # Now new_path has a complete unix path to the binary
20503  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20504    # Keep paths in /bin as-is, but remove trailing .exe if any
20505    new_path="${new_path/%.exe/}"
20506    # Do not save /bin paths to all_fixpath_prefixes!
20507  else
20508    # Not in mixed or Windows style, start by that.
20509    new_path=`cmd //c echo $new_path`
20510
20511  input_path="$new_path"
20512  # Check if we need to convert this using DOS-style short mode. If the path
20513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20514  # take no chances and rewrite it.
20515  # Note: m4 eats our [], so we need to use [ and ] instead.
20516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20517  if test "x$has_forbidden_chars" != x; then
20518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20520  fi
20521
20522    # Output is in $new_path
20523
20524  windows_path="$new_path"
20525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20526    unix_path=`$CYGPATH -u "$windows_path"`
20527    new_path="$unix_path"
20528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20530    new_path="$unix_path"
20531  fi
20532
20533    # remove trailing .exe if any
20534    new_path="${new_path/%.exe/}"
20535
20536    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20537    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20538  fi
20539
20540    else
20541      # We're on a unix platform. Hooray! :)
20542      # First separate the path from the arguments. This will split at the first
20543      # space.
20544      complete="$FOUND_MAKE"
20545      path="${complete%% *}"
20546      tmp="$complete EOL"
20547      arguments="${tmp#* }"
20548
20549      # Cannot rely on the command "which" here since it doesn't always work.
20550      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20551      if test -z "$is_absolute_path"; then
20552        # Path to executable is not absolute. Find it.
20553        IFS_save="$IFS"
20554        IFS=:
20555        for p in $PATH; do
20556          if test -f "$p/$path" && test -x "$p/$path"; then
20557            new_path="$p/$path"
20558            break
20559          fi
20560        done
20561        IFS="$IFS_save"
20562      else
20563        # This is an absolute path, we can use it without further modifications.
20564        new_path="$path"
20565      fi
20566
20567      if test "x$new_path" = x; then
20568        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20569$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20570        has_space=`$ECHO "$complete" | $GREP " "`
20571        if test "x$has_space" != x; then
20572          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20573$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20574        fi
20575        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20576      fi
20577    fi
20578
20579    # Now join together the path and the arguments once again
20580    if test "x$arguments" != xEOL; then
20581      new_complete="$new_path ${arguments% *}"
20582    else
20583      new_complete="$new_path"
20584    fi
20585
20586    if test "x$complete" != "x$new_complete"; then
20587      FOUND_MAKE="$new_complete"
20588      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20589$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20590    fi
20591  fi
20592
20593        fi
20594      fi
20595    fi
20596  fi
20597
20598    if test "x$FOUND_MAKE" = x; then
20599      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20600    fi
20601
20602  fi
20603
20604
20605  MAKE=$FOUND_MAKE
20606
20607  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20608$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20609
20610
20611  # Check if make supports the output sync option and if so, setup using it.
20612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20613$as_echo_n "checking if make --output-sync is supported... " >&6; }
20614  if $MAKE --version -O > /dev/null 2>&1; then
20615    OUTPUT_SYNC_SUPPORTED=true
20616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20617$as_echo "yes" >&6; }
20618    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20619$as_echo_n "checking for output-sync value... " >&6; }
20620
20621# Check whether --with-output-sync was given.
20622if test "${with_output_sync+set}" = set; then :
20623  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20624fi
20625
20626    if test "x$OUTPUT_SYNC" = "x"; then
20627      OUTPUT_SYNC=none
20628    fi
20629    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20630$as_echo "$OUTPUT_SYNC" >&6; }
20631    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20632      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20633    fi
20634  else
20635    OUTPUT_SYNC_SUPPORTED=false
20636    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20637$as_echo "no" >&6; }
20638  fi
20639
20640
20641
20642
20643
20644
20645  # Test if find supports -delete
20646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20647$as_echo_n "checking if find supports -delete... " >&6; }
20648  FIND_DELETE="-delete"
20649
20650  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20651
20652  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20653
20654  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20655  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20656    # No, it does not.
20657    rm $DELETEDIR/TestIfFindSupportsDelete
20658    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20659      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20660      FIND_DELETE="-print | xargs rm"
20661    else
20662      FIND_DELETE="-exec rm \{\} \+"
20663    fi
20664    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20665$as_echo "no" >&6; }
20666  else
20667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20668$as_echo "yes" >&6; }
20669  fi
20670  rmdir $DELETEDIR
20671
20672
20673
20674  # These tools might not be installed by default,
20675  # need hint on how to install them.
20676
20677
20678
20679  # Publish this variable in the help.
20680
20681
20682  if [ -z "${UNZIP+x}" ]; then
20683    # The variable is not set by user, try to locate tool using the code snippet
20684    for ac_prog in unzip
20685do
20686  # Extract the first word of "$ac_prog", so it can be a program name with args.
20687set dummy $ac_prog; ac_word=$2
20688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20689$as_echo_n "checking for $ac_word... " >&6; }
20690if ${ac_cv_path_UNZIP+:} false; then :
20691  $as_echo_n "(cached) " >&6
20692else
20693  case $UNZIP in
20694  [\\/]* | ?:[\\/]*)
20695  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20696  ;;
20697  *)
20698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20699for as_dir in $PATH
20700do
20701  IFS=$as_save_IFS
20702  test -z "$as_dir" && as_dir=.
20703    for ac_exec_ext in '' $ac_executable_extensions; do
20704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20705    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20707    break 2
20708  fi
20709done
20710  done
20711IFS=$as_save_IFS
20712
20713  ;;
20714esac
20715fi
20716UNZIP=$ac_cv_path_UNZIP
20717if test -n "$UNZIP"; then
20718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20719$as_echo "$UNZIP" >&6; }
20720else
20721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20722$as_echo "no" >&6; }
20723fi
20724
20725
20726  test -n "$UNZIP" && break
20727done
20728
20729  else
20730    # The variable is set, but is it from the command line or the environment?
20731
20732    # Try to remove the string !UNZIP! from our list.
20733    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20734    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20735      # If it failed, the variable was not from the command line. Ignore it,
20736      # but warn the user (except for BASH, which is always set by the calling BASH).
20737      if test "xUNZIP" != xBASH; then
20738        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20739$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20740      fi
20741      # Try to locate tool using the code snippet
20742      for ac_prog in unzip
20743do
20744  # Extract the first word of "$ac_prog", so it can be a program name with args.
20745set dummy $ac_prog; ac_word=$2
20746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20747$as_echo_n "checking for $ac_word... " >&6; }
20748if ${ac_cv_path_UNZIP+:} false; then :
20749  $as_echo_n "(cached) " >&6
20750else
20751  case $UNZIP in
20752  [\\/]* | ?:[\\/]*)
20753  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20754  ;;
20755  *)
20756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20757for as_dir in $PATH
20758do
20759  IFS=$as_save_IFS
20760  test -z "$as_dir" && as_dir=.
20761    for ac_exec_ext in '' $ac_executable_extensions; do
20762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20763    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20765    break 2
20766  fi
20767done
20768  done
20769IFS=$as_save_IFS
20770
20771  ;;
20772esac
20773fi
20774UNZIP=$ac_cv_path_UNZIP
20775if test -n "$UNZIP"; then
20776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20777$as_echo "$UNZIP" >&6; }
20778else
20779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20780$as_echo "no" >&6; }
20781fi
20782
20783
20784  test -n "$UNZIP" && break
20785done
20786
20787    else
20788      # If it succeeded, then it was overridden by the user. We will use it
20789      # for the tool.
20790
20791      # First remove it from the list of overridden variables, so we can test
20792      # for unknown variables in the end.
20793      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20794
20795      # Check if we try to supply an empty value
20796      if test "x$UNZIP" = x; then
20797        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20798$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20800$as_echo_n "checking for UNZIP... " >&6; }
20801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20802$as_echo "disabled" >&6; }
20803      else
20804        # Check if the provided tool contains a complete path.
20805        tool_specified="$UNZIP"
20806        tool_basename="${tool_specified##*/}"
20807        if test "x$tool_basename" = "x$tool_specified"; then
20808          # A command without a complete path is provided, search $PATH.
20809          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20810$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20811          # Extract the first word of "$tool_basename", so it can be a program name with args.
20812set dummy $tool_basename; ac_word=$2
20813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20814$as_echo_n "checking for $ac_word... " >&6; }
20815if ${ac_cv_path_UNZIP+:} false; then :
20816  $as_echo_n "(cached) " >&6
20817else
20818  case $UNZIP in
20819  [\\/]* | ?:[\\/]*)
20820  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20821  ;;
20822  *)
20823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20824for as_dir in $PATH
20825do
20826  IFS=$as_save_IFS
20827  test -z "$as_dir" && as_dir=.
20828    for ac_exec_ext in '' $ac_executable_extensions; do
20829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20830    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20832    break 2
20833  fi
20834done
20835  done
20836IFS=$as_save_IFS
20837
20838  ;;
20839esac
20840fi
20841UNZIP=$ac_cv_path_UNZIP
20842if test -n "$UNZIP"; then
20843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20844$as_echo "$UNZIP" >&6; }
20845else
20846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20847$as_echo "no" >&6; }
20848fi
20849
20850
20851          if test "x$UNZIP" = x; then
20852            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20853          fi
20854        else
20855          # Otherwise we believe it is a complete path. Use it as it is.
20856          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20857$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20858          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20859$as_echo_n "checking for UNZIP... " >&6; }
20860          if test ! -x "$tool_specified"; then
20861            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20862$as_echo "not found" >&6; }
20863            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20864          fi
20865          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20866$as_echo "$tool_specified" >&6; }
20867        fi
20868      fi
20869    fi
20870
20871  fi
20872
20873
20874
20875  if test "x$UNZIP" = x; then
20876    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20877  fi
20878
20879
20880
20881
20882
20883  # Publish this variable in the help.
20884
20885
20886  if [ -z "${ZIP+x}" ]; then
20887    # The variable is not set by user, try to locate tool using the code snippet
20888    for ac_prog in zip
20889do
20890  # Extract the first word of "$ac_prog", so it can be a program name with args.
20891set dummy $ac_prog; ac_word=$2
20892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20893$as_echo_n "checking for $ac_word... " >&6; }
20894if ${ac_cv_path_ZIP+:} false; then :
20895  $as_echo_n "(cached) " >&6
20896else
20897  case $ZIP in
20898  [\\/]* | ?:[\\/]*)
20899  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20900  ;;
20901  *)
20902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20903for as_dir in $PATH
20904do
20905  IFS=$as_save_IFS
20906  test -z "$as_dir" && as_dir=.
20907    for ac_exec_ext in '' $ac_executable_extensions; do
20908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20909    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20911    break 2
20912  fi
20913done
20914  done
20915IFS=$as_save_IFS
20916
20917  ;;
20918esac
20919fi
20920ZIP=$ac_cv_path_ZIP
20921if test -n "$ZIP"; then
20922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20923$as_echo "$ZIP" >&6; }
20924else
20925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20926$as_echo "no" >&6; }
20927fi
20928
20929
20930  test -n "$ZIP" && break
20931done
20932
20933  else
20934    # The variable is set, but is it from the command line or the environment?
20935
20936    # Try to remove the string !ZIP! from our list.
20937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20939      # If it failed, the variable was not from the command line. Ignore it,
20940      # but warn the user (except for BASH, which is always set by the calling BASH).
20941      if test "xZIP" != xBASH; then
20942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20943$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20944      fi
20945      # Try to locate tool using the code snippet
20946      for ac_prog in zip
20947do
20948  # Extract the first word of "$ac_prog", so it can be a program name with args.
20949set dummy $ac_prog; ac_word=$2
20950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20951$as_echo_n "checking for $ac_word... " >&6; }
20952if ${ac_cv_path_ZIP+:} false; then :
20953  $as_echo_n "(cached) " >&6
20954else
20955  case $ZIP in
20956  [\\/]* | ?:[\\/]*)
20957  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20958  ;;
20959  *)
20960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20961for as_dir in $PATH
20962do
20963  IFS=$as_save_IFS
20964  test -z "$as_dir" && as_dir=.
20965    for ac_exec_ext in '' $ac_executable_extensions; do
20966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20967    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20969    break 2
20970  fi
20971done
20972  done
20973IFS=$as_save_IFS
20974
20975  ;;
20976esac
20977fi
20978ZIP=$ac_cv_path_ZIP
20979if test -n "$ZIP"; then
20980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20981$as_echo "$ZIP" >&6; }
20982else
20983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20984$as_echo "no" >&6; }
20985fi
20986
20987
20988  test -n "$ZIP" && break
20989done
20990
20991    else
20992      # If it succeeded, then it was overridden by the user. We will use it
20993      # for the tool.
20994
20995      # First remove it from the list of overridden variables, so we can test
20996      # for unknown variables in the end.
20997      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20998
20999      # Check if we try to supply an empty value
21000      if test "x$ZIP" = x; then
21001        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21002$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21003        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21004$as_echo_n "checking for ZIP... " >&6; }
21005        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21006$as_echo "disabled" >&6; }
21007      else
21008        # Check if the provided tool contains a complete path.
21009        tool_specified="$ZIP"
21010        tool_basename="${tool_specified##*/}"
21011        if test "x$tool_basename" = "x$tool_specified"; then
21012          # A command without a complete path is provided, search $PATH.
21013          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21014$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21015          # Extract the first word of "$tool_basename", so it can be a program name with args.
21016set dummy $tool_basename; ac_word=$2
21017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21018$as_echo_n "checking for $ac_word... " >&6; }
21019if ${ac_cv_path_ZIP+:} false; then :
21020  $as_echo_n "(cached) " >&6
21021else
21022  case $ZIP in
21023  [\\/]* | ?:[\\/]*)
21024  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21025  ;;
21026  *)
21027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21028for as_dir in $PATH
21029do
21030  IFS=$as_save_IFS
21031  test -z "$as_dir" && as_dir=.
21032    for ac_exec_ext in '' $ac_executable_extensions; do
21033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21034    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21036    break 2
21037  fi
21038done
21039  done
21040IFS=$as_save_IFS
21041
21042  ;;
21043esac
21044fi
21045ZIP=$ac_cv_path_ZIP
21046if test -n "$ZIP"; then
21047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21048$as_echo "$ZIP" >&6; }
21049else
21050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21051$as_echo "no" >&6; }
21052fi
21053
21054
21055          if test "x$ZIP" = x; then
21056            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21057          fi
21058        else
21059          # Otherwise we believe it is a complete path. Use it as it is.
21060          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21061$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21062          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21063$as_echo_n "checking for ZIP... " >&6; }
21064          if test ! -x "$tool_specified"; then
21065            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21066$as_echo "not found" >&6; }
21067            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21068          fi
21069          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21070$as_echo "$tool_specified" >&6; }
21071        fi
21072      fi
21073    fi
21074
21075  fi
21076
21077
21078
21079  if test "x$ZIP" = x; then
21080    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21081  fi
21082
21083
21084
21085  # Non-required basic tools
21086
21087
21088
21089  # Publish this variable in the help.
21090
21091
21092  if [ -z "${LDD+x}" ]; then
21093    # The variable is not set by user, try to locate tool using the code snippet
21094    for ac_prog in ldd
21095do
21096  # Extract the first word of "$ac_prog", so it can be a program name with args.
21097set dummy $ac_prog; ac_word=$2
21098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21099$as_echo_n "checking for $ac_word... " >&6; }
21100if ${ac_cv_path_LDD+:} false; then :
21101  $as_echo_n "(cached) " >&6
21102else
21103  case $LDD in
21104  [\\/]* | ?:[\\/]*)
21105  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21106  ;;
21107  *)
21108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21109for as_dir in $PATH
21110do
21111  IFS=$as_save_IFS
21112  test -z "$as_dir" && as_dir=.
21113    for ac_exec_ext in '' $ac_executable_extensions; do
21114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21115    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21117    break 2
21118  fi
21119done
21120  done
21121IFS=$as_save_IFS
21122
21123  ;;
21124esac
21125fi
21126LDD=$ac_cv_path_LDD
21127if test -n "$LDD"; then
21128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21129$as_echo "$LDD" >&6; }
21130else
21131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21132$as_echo "no" >&6; }
21133fi
21134
21135
21136  test -n "$LDD" && break
21137done
21138
21139  else
21140    # The variable is set, but is it from the command line or the environment?
21141
21142    # Try to remove the string !LDD! from our list.
21143    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21144    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21145      # If it failed, the variable was not from the command line. Ignore it,
21146      # but warn the user (except for BASH, which is always set by the calling BASH).
21147      if test "xLDD" != xBASH; then
21148        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21149$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21150      fi
21151      # Try to locate tool using the code snippet
21152      for ac_prog in ldd
21153do
21154  # Extract the first word of "$ac_prog", so it can be a program name with args.
21155set dummy $ac_prog; ac_word=$2
21156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21157$as_echo_n "checking for $ac_word... " >&6; }
21158if ${ac_cv_path_LDD+:} false; then :
21159  $as_echo_n "(cached) " >&6
21160else
21161  case $LDD in
21162  [\\/]* | ?:[\\/]*)
21163  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21164  ;;
21165  *)
21166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21167for as_dir in $PATH
21168do
21169  IFS=$as_save_IFS
21170  test -z "$as_dir" && as_dir=.
21171    for ac_exec_ext in '' $ac_executable_extensions; do
21172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21173    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21175    break 2
21176  fi
21177done
21178  done
21179IFS=$as_save_IFS
21180
21181  ;;
21182esac
21183fi
21184LDD=$ac_cv_path_LDD
21185if test -n "$LDD"; then
21186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21187$as_echo "$LDD" >&6; }
21188else
21189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21190$as_echo "no" >&6; }
21191fi
21192
21193
21194  test -n "$LDD" && break
21195done
21196
21197    else
21198      # If it succeeded, then it was overridden by the user. We will use it
21199      # for the tool.
21200
21201      # First remove it from the list of overridden variables, so we can test
21202      # for unknown variables in the end.
21203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21204
21205      # Check if we try to supply an empty value
21206      if test "x$LDD" = x; then
21207        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21208$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21210$as_echo_n "checking for LDD... " >&6; }
21211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21212$as_echo "disabled" >&6; }
21213      else
21214        # Check if the provided tool contains a complete path.
21215        tool_specified="$LDD"
21216        tool_basename="${tool_specified##*/}"
21217        if test "x$tool_basename" = "x$tool_specified"; then
21218          # A command without a complete path is provided, search $PATH.
21219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21220$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21221          # Extract the first word of "$tool_basename", so it can be a program name with args.
21222set dummy $tool_basename; ac_word=$2
21223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21224$as_echo_n "checking for $ac_word... " >&6; }
21225if ${ac_cv_path_LDD+:} false; then :
21226  $as_echo_n "(cached) " >&6
21227else
21228  case $LDD in
21229  [\\/]* | ?:[\\/]*)
21230  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21231  ;;
21232  *)
21233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21234for as_dir in $PATH
21235do
21236  IFS=$as_save_IFS
21237  test -z "$as_dir" && as_dir=.
21238    for ac_exec_ext in '' $ac_executable_extensions; do
21239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21240    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21242    break 2
21243  fi
21244done
21245  done
21246IFS=$as_save_IFS
21247
21248  ;;
21249esac
21250fi
21251LDD=$ac_cv_path_LDD
21252if test -n "$LDD"; then
21253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21254$as_echo "$LDD" >&6; }
21255else
21256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21257$as_echo "no" >&6; }
21258fi
21259
21260
21261          if test "x$LDD" = x; then
21262            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21263          fi
21264        else
21265          # Otherwise we believe it is a complete path. Use it as it is.
21266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21267$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21268          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21269$as_echo_n "checking for LDD... " >&6; }
21270          if test ! -x "$tool_specified"; then
21271            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21272$as_echo "not found" >&6; }
21273            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21274          fi
21275          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21276$as_echo "$tool_specified" >&6; }
21277        fi
21278      fi
21279    fi
21280
21281  fi
21282
21283
21284  if test "x$LDD" = "x"; then
21285    # List shared lib dependencies is used for
21286    # debug output and checking for forbidden dependencies.
21287    # We can build without it.
21288    LDD="true"
21289  fi
21290
21291
21292  # Publish this variable in the help.
21293
21294
21295  if [ -z "${OTOOL+x}" ]; then
21296    # The variable is not set by user, try to locate tool using the code snippet
21297    for ac_prog in otool
21298do
21299  # Extract the first word of "$ac_prog", so it can be a program name with args.
21300set dummy $ac_prog; ac_word=$2
21301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21302$as_echo_n "checking for $ac_word... " >&6; }
21303if ${ac_cv_path_OTOOL+:} false; then :
21304  $as_echo_n "(cached) " >&6
21305else
21306  case $OTOOL in
21307  [\\/]* | ?:[\\/]*)
21308  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21309  ;;
21310  *)
21311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21312for as_dir in $PATH
21313do
21314  IFS=$as_save_IFS
21315  test -z "$as_dir" && as_dir=.
21316    for ac_exec_ext in '' $ac_executable_extensions; do
21317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21318    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21320    break 2
21321  fi
21322done
21323  done
21324IFS=$as_save_IFS
21325
21326  ;;
21327esac
21328fi
21329OTOOL=$ac_cv_path_OTOOL
21330if test -n "$OTOOL"; then
21331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21332$as_echo "$OTOOL" >&6; }
21333else
21334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21335$as_echo "no" >&6; }
21336fi
21337
21338
21339  test -n "$OTOOL" && break
21340done
21341
21342  else
21343    # The variable is set, but is it from the command line or the environment?
21344
21345    # Try to remove the string !OTOOL! from our list.
21346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21348      # If it failed, the variable was not from the command line. Ignore it,
21349      # but warn the user (except for BASH, which is always set by the calling BASH).
21350      if test "xOTOOL" != xBASH; then
21351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21352$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21353      fi
21354      # Try to locate tool using the code snippet
21355      for ac_prog in otool
21356do
21357  # Extract the first word of "$ac_prog", so it can be a program name with args.
21358set dummy $ac_prog; ac_word=$2
21359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21360$as_echo_n "checking for $ac_word... " >&6; }
21361if ${ac_cv_path_OTOOL+:} false; then :
21362  $as_echo_n "(cached) " >&6
21363else
21364  case $OTOOL in
21365  [\\/]* | ?:[\\/]*)
21366  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21367  ;;
21368  *)
21369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21370for as_dir in $PATH
21371do
21372  IFS=$as_save_IFS
21373  test -z "$as_dir" && as_dir=.
21374    for ac_exec_ext in '' $ac_executable_extensions; do
21375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21376    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21378    break 2
21379  fi
21380done
21381  done
21382IFS=$as_save_IFS
21383
21384  ;;
21385esac
21386fi
21387OTOOL=$ac_cv_path_OTOOL
21388if test -n "$OTOOL"; then
21389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21390$as_echo "$OTOOL" >&6; }
21391else
21392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21393$as_echo "no" >&6; }
21394fi
21395
21396
21397  test -n "$OTOOL" && break
21398done
21399
21400    else
21401      # If it succeeded, then it was overridden by the user. We will use it
21402      # for the tool.
21403
21404      # First remove it from the list of overridden variables, so we can test
21405      # for unknown variables in the end.
21406      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21407
21408      # Check if we try to supply an empty value
21409      if test "x$OTOOL" = x; then
21410        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21411$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21412        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21413$as_echo_n "checking for OTOOL... " >&6; }
21414        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21415$as_echo "disabled" >&6; }
21416      else
21417        # Check if the provided tool contains a complete path.
21418        tool_specified="$OTOOL"
21419        tool_basename="${tool_specified##*/}"
21420        if test "x$tool_basename" = "x$tool_specified"; then
21421          # A command without a complete path is provided, search $PATH.
21422          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21423$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21424          # Extract the first word of "$tool_basename", so it can be a program name with args.
21425set dummy $tool_basename; ac_word=$2
21426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21427$as_echo_n "checking for $ac_word... " >&6; }
21428if ${ac_cv_path_OTOOL+:} false; then :
21429  $as_echo_n "(cached) " >&6
21430else
21431  case $OTOOL in
21432  [\\/]* | ?:[\\/]*)
21433  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21434  ;;
21435  *)
21436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21437for as_dir in $PATH
21438do
21439  IFS=$as_save_IFS
21440  test -z "$as_dir" && as_dir=.
21441    for ac_exec_ext in '' $ac_executable_extensions; do
21442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21443    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21445    break 2
21446  fi
21447done
21448  done
21449IFS=$as_save_IFS
21450
21451  ;;
21452esac
21453fi
21454OTOOL=$ac_cv_path_OTOOL
21455if test -n "$OTOOL"; then
21456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21457$as_echo "$OTOOL" >&6; }
21458else
21459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21460$as_echo "no" >&6; }
21461fi
21462
21463
21464          if test "x$OTOOL" = x; then
21465            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21466          fi
21467        else
21468          # Otherwise we believe it is a complete path. Use it as it is.
21469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21470$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21471          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21472$as_echo_n "checking for OTOOL... " >&6; }
21473          if test ! -x "$tool_specified"; then
21474            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21475$as_echo "not found" >&6; }
21476            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21477          fi
21478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21479$as_echo "$tool_specified" >&6; }
21480        fi
21481      fi
21482    fi
21483
21484  fi
21485
21486
21487  if test "x$OTOOL" = "x"; then
21488    OTOOL="true"
21489  fi
21490
21491
21492  # Publish this variable in the help.
21493
21494
21495  if [ -z "${READELF+x}" ]; then
21496    # The variable is not set by user, try to locate tool using the code snippet
21497    for ac_prog in greadelf readelf
21498do
21499  # Extract the first word of "$ac_prog", so it can be a program name with args.
21500set dummy $ac_prog; ac_word=$2
21501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21502$as_echo_n "checking for $ac_word... " >&6; }
21503if ${ac_cv_path_READELF+:} false; then :
21504  $as_echo_n "(cached) " >&6
21505else
21506  case $READELF in
21507  [\\/]* | ?:[\\/]*)
21508  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21509  ;;
21510  *)
21511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21512for as_dir in $PATH
21513do
21514  IFS=$as_save_IFS
21515  test -z "$as_dir" && as_dir=.
21516    for ac_exec_ext in '' $ac_executable_extensions; do
21517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21518    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21520    break 2
21521  fi
21522done
21523  done
21524IFS=$as_save_IFS
21525
21526  ;;
21527esac
21528fi
21529READELF=$ac_cv_path_READELF
21530if test -n "$READELF"; then
21531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21532$as_echo "$READELF" >&6; }
21533else
21534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21535$as_echo "no" >&6; }
21536fi
21537
21538
21539  test -n "$READELF" && break
21540done
21541
21542  else
21543    # The variable is set, but is it from the command line or the environment?
21544
21545    # Try to remove the string !READELF! from our list.
21546    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21547    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21548      # If it failed, the variable was not from the command line. Ignore it,
21549      # but warn the user (except for BASH, which is always set by the calling BASH).
21550      if test "xREADELF" != xBASH; then
21551        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21552$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21553      fi
21554      # Try to locate tool using the code snippet
21555      for ac_prog in greadelf readelf
21556do
21557  # Extract the first word of "$ac_prog", so it can be a program name with args.
21558set dummy $ac_prog; ac_word=$2
21559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21560$as_echo_n "checking for $ac_word... " >&6; }
21561if ${ac_cv_path_READELF+:} false; then :
21562  $as_echo_n "(cached) " >&6
21563else
21564  case $READELF in
21565  [\\/]* | ?:[\\/]*)
21566  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21567  ;;
21568  *)
21569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21570for as_dir in $PATH
21571do
21572  IFS=$as_save_IFS
21573  test -z "$as_dir" && as_dir=.
21574    for ac_exec_ext in '' $ac_executable_extensions; do
21575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21576    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21578    break 2
21579  fi
21580done
21581  done
21582IFS=$as_save_IFS
21583
21584  ;;
21585esac
21586fi
21587READELF=$ac_cv_path_READELF
21588if test -n "$READELF"; then
21589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21590$as_echo "$READELF" >&6; }
21591else
21592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21593$as_echo "no" >&6; }
21594fi
21595
21596
21597  test -n "$READELF" && break
21598done
21599
21600    else
21601      # If it succeeded, then it was overridden by the user. We will use it
21602      # for the tool.
21603
21604      # First remove it from the list of overridden variables, so we can test
21605      # for unknown variables in the end.
21606      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21607
21608      # Check if we try to supply an empty value
21609      if test "x$READELF" = x; then
21610        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21611$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21612        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21613$as_echo_n "checking for READELF... " >&6; }
21614        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21615$as_echo "disabled" >&6; }
21616      else
21617        # Check if the provided tool contains a complete path.
21618        tool_specified="$READELF"
21619        tool_basename="${tool_specified##*/}"
21620        if test "x$tool_basename" = "x$tool_specified"; then
21621          # A command without a complete path is provided, search $PATH.
21622          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21623$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21624          # Extract the first word of "$tool_basename", so it can be a program name with args.
21625set dummy $tool_basename; ac_word=$2
21626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21627$as_echo_n "checking for $ac_word... " >&6; }
21628if ${ac_cv_path_READELF+:} false; then :
21629  $as_echo_n "(cached) " >&6
21630else
21631  case $READELF in
21632  [\\/]* | ?:[\\/]*)
21633  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21634  ;;
21635  *)
21636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21637for as_dir in $PATH
21638do
21639  IFS=$as_save_IFS
21640  test -z "$as_dir" && as_dir=.
21641    for ac_exec_ext in '' $ac_executable_extensions; do
21642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21643    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21645    break 2
21646  fi
21647done
21648  done
21649IFS=$as_save_IFS
21650
21651  ;;
21652esac
21653fi
21654READELF=$ac_cv_path_READELF
21655if test -n "$READELF"; then
21656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21657$as_echo "$READELF" >&6; }
21658else
21659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21660$as_echo "no" >&6; }
21661fi
21662
21663
21664          if test "x$READELF" = x; then
21665            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21666          fi
21667        else
21668          # Otherwise we believe it is a complete path. Use it as it is.
21669          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21670$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21671          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21672$as_echo_n "checking for READELF... " >&6; }
21673          if test ! -x "$tool_specified"; then
21674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21675$as_echo "not found" >&6; }
21676            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21677          fi
21678          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21679$as_echo "$tool_specified" >&6; }
21680        fi
21681      fi
21682    fi
21683
21684  fi
21685
21686
21687
21688
21689  # Publish this variable in the help.
21690
21691
21692  if [ -z "${HG+x}" ]; then
21693    # The variable is not set by user, try to locate tool using the code snippet
21694    for ac_prog in hg
21695do
21696  # Extract the first word of "$ac_prog", so it can be a program name with args.
21697set dummy $ac_prog; ac_word=$2
21698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21699$as_echo_n "checking for $ac_word... " >&6; }
21700if ${ac_cv_path_HG+:} false; then :
21701  $as_echo_n "(cached) " >&6
21702else
21703  case $HG in
21704  [\\/]* | ?:[\\/]*)
21705  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21706  ;;
21707  *)
21708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21709for as_dir in $PATH
21710do
21711  IFS=$as_save_IFS
21712  test -z "$as_dir" && as_dir=.
21713    for ac_exec_ext in '' $ac_executable_extensions; do
21714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21715    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21717    break 2
21718  fi
21719done
21720  done
21721IFS=$as_save_IFS
21722
21723  ;;
21724esac
21725fi
21726HG=$ac_cv_path_HG
21727if test -n "$HG"; then
21728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21729$as_echo "$HG" >&6; }
21730else
21731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21732$as_echo "no" >&6; }
21733fi
21734
21735
21736  test -n "$HG" && break
21737done
21738
21739  else
21740    # The variable is set, but is it from the command line or the environment?
21741
21742    # Try to remove the string !HG! from our list.
21743    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21744    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21745      # If it failed, the variable was not from the command line. Ignore it,
21746      # but warn the user (except for BASH, which is always set by the calling BASH).
21747      if test "xHG" != xBASH; then
21748        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21749$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21750      fi
21751      # Try to locate tool using the code snippet
21752      for ac_prog in hg
21753do
21754  # Extract the first word of "$ac_prog", so it can be a program name with args.
21755set dummy $ac_prog; ac_word=$2
21756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21757$as_echo_n "checking for $ac_word... " >&6; }
21758if ${ac_cv_path_HG+:} false; then :
21759  $as_echo_n "(cached) " >&6
21760else
21761  case $HG in
21762  [\\/]* | ?:[\\/]*)
21763  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21764  ;;
21765  *)
21766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21767for as_dir in $PATH
21768do
21769  IFS=$as_save_IFS
21770  test -z "$as_dir" && as_dir=.
21771    for ac_exec_ext in '' $ac_executable_extensions; do
21772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21773    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21775    break 2
21776  fi
21777done
21778  done
21779IFS=$as_save_IFS
21780
21781  ;;
21782esac
21783fi
21784HG=$ac_cv_path_HG
21785if test -n "$HG"; then
21786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21787$as_echo "$HG" >&6; }
21788else
21789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21790$as_echo "no" >&6; }
21791fi
21792
21793
21794  test -n "$HG" && break
21795done
21796
21797    else
21798      # If it succeeded, then it was overridden by the user. We will use it
21799      # for the tool.
21800
21801      # First remove it from the list of overridden variables, so we can test
21802      # for unknown variables in the end.
21803      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21804
21805      # Check if we try to supply an empty value
21806      if test "x$HG" = x; then
21807        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21808$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21809        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21810$as_echo_n "checking for HG... " >&6; }
21811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21812$as_echo "disabled" >&6; }
21813      else
21814        # Check if the provided tool contains a complete path.
21815        tool_specified="$HG"
21816        tool_basename="${tool_specified##*/}"
21817        if test "x$tool_basename" = "x$tool_specified"; then
21818          # A command without a complete path is provided, search $PATH.
21819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21820$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21821          # Extract the first word of "$tool_basename", so it can be a program name with args.
21822set dummy $tool_basename; ac_word=$2
21823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21824$as_echo_n "checking for $ac_word... " >&6; }
21825if ${ac_cv_path_HG+:} false; then :
21826  $as_echo_n "(cached) " >&6
21827else
21828  case $HG in
21829  [\\/]* | ?:[\\/]*)
21830  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21831  ;;
21832  *)
21833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21834for as_dir in $PATH
21835do
21836  IFS=$as_save_IFS
21837  test -z "$as_dir" && as_dir=.
21838    for ac_exec_ext in '' $ac_executable_extensions; do
21839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21840    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21842    break 2
21843  fi
21844done
21845  done
21846IFS=$as_save_IFS
21847
21848  ;;
21849esac
21850fi
21851HG=$ac_cv_path_HG
21852if test -n "$HG"; then
21853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21854$as_echo "$HG" >&6; }
21855else
21856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21857$as_echo "no" >&6; }
21858fi
21859
21860
21861          if test "x$HG" = x; then
21862            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21863          fi
21864        else
21865          # Otherwise we believe it is a complete path. Use it as it is.
21866          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21867$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21868          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21869$as_echo_n "checking for HG... " >&6; }
21870          if test ! -x "$tool_specified"; then
21871            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21872$as_echo "not found" >&6; }
21873            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21874          fi
21875          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21876$as_echo "$tool_specified" >&6; }
21877        fi
21878      fi
21879    fi
21880
21881  fi
21882
21883
21884
21885
21886  # Publish this variable in the help.
21887
21888
21889  if [ -z "${STAT+x}" ]; then
21890    # The variable is not set by user, try to locate tool using the code snippet
21891    for ac_prog in stat
21892do
21893  # Extract the first word of "$ac_prog", so it can be a program name with args.
21894set dummy $ac_prog; ac_word=$2
21895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21896$as_echo_n "checking for $ac_word... " >&6; }
21897if ${ac_cv_path_STAT+:} false; then :
21898  $as_echo_n "(cached) " >&6
21899else
21900  case $STAT in
21901  [\\/]* | ?:[\\/]*)
21902  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21903  ;;
21904  *)
21905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21906for as_dir in $PATH
21907do
21908  IFS=$as_save_IFS
21909  test -z "$as_dir" && as_dir=.
21910    for ac_exec_ext in '' $ac_executable_extensions; do
21911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21912    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21914    break 2
21915  fi
21916done
21917  done
21918IFS=$as_save_IFS
21919
21920  ;;
21921esac
21922fi
21923STAT=$ac_cv_path_STAT
21924if test -n "$STAT"; then
21925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21926$as_echo "$STAT" >&6; }
21927else
21928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21929$as_echo "no" >&6; }
21930fi
21931
21932
21933  test -n "$STAT" && break
21934done
21935
21936  else
21937    # The variable is set, but is it from the command line or the environment?
21938
21939    # Try to remove the string !STAT! from our list.
21940    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21941    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21942      # If it failed, the variable was not from the command line. Ignore it,
21943      # but warn the user (except for BASH, which is always set by the calling BASH).
21944      if test "xSTAT" != xBASH; then
21945        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21946$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21947      fi
21948      # Try to locate tool using the code snippet
21949      for ac_prog in stat
21950do
21951  # Extract the first word of "$ac_prog", so it can be a program name with args.
21952set dummy $ac_prog; ac_word=$2
21953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21954$as_echo_n "checking for $ac_word... " >&6; }
21955if ${ac_cv_path_STAT+:} false; then :
21956  $as_echo_n "(cached) " >&6
21957else
21958  case $STAT in
21959  [\\/]* | ?:[\\/]*)
21960  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21961  ;;
21962  *)
21963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21964for as_dir in $PATH
21965do
21966  IFS=$as_save_IFS
21967  test -z "$as_dir" && as_dir=.
21968    for ac_exec_ext in '' $ac_executable_extensions; do
21969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21970    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21972    break 2
21973  fi
21974done
21975  done
21976IFS=$as_save_IFS
21977
21978  ;;
21979esac
21980fi
21981STAT=$ac_cv_path_STAT
21982if test -n "$STAT"; then
21983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21984$as_echo "$STAT" >&6; }
21985else
21986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21987$as_echo "no" >&6; }
21988fi
21989
21990
21991  test -n "$STAT" && break
21992done
21993
21994    else
21995      # If it succeeded, then it was overridden by the user. We will use it
21996      # for the tool.
21997
21998      # First remove it from the list of overridden variables, so we can test
21999      # for unknown variables in the end.
22000      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22001
22002      # Check if we try to supply an empty value
22003      if test "x$STAT" = x; then
22004        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22005$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22006        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22007$as_echo_n "checking for STAT... " >&6; }
22008        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22009$as_echo "disabled" >&6; }
22010      else
22011        # Check if the provided tool contains a complete path.
22012        tool_specified="$STAT"
22013        tool_basename="${tool_specified##*/}"
22014        if test "x$tool_basename" = "x$tool_specified"; then
22015          # A command without a complete path is provided, search $PATH.
22016          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22017$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22018          # Extract the first word of "$tool_basename", so it can be a program name with args.
22019set dummy $tool_basename; ac_word=$2
22020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22021$as_echo_n "checking for $ac_word... " >&6; }
22022if ${ac_cv_path_STAT+:} false; then :
22023  $as_echo_n "(cached) " >&6
22024else
22025  case $STAT in
22026  [\\/]* | ?:[\\/]*)
22027  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22028  ;;
22029  *)
22030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22031for as_dir in $PATH
22032do
22033  IFS=$as_save_IFS
22034  test -z "$as_dir" && as_dir=.
22035    for ac_exec_ext in '' $ac_executable_extensions; do
22036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22037    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22039    break 2
22040  fi
22041done
22042  done
22043IFS=$as_save_IFS
22044
22045  ;;
22046esac
22047fi
22048STAT=$ac_cv_path_STAT
22049if test -n "$STAT"; then
22050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22051$as_echo "$STAT" >&6; }
22052else
22053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22054$as_echo "no" >&6; }
22055fi
22056
22057
22058          if test "x$STAT" = x; then
22059            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22060          fi
22061        else
22062          # Otherwise we believe it is a complete path. Use it as it is.
22063          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22064$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22065          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22066$as_echo_n "checking for STAT... " >&6; }
22067          if test ! -x "$tool_specified"; then
22068            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22069$as_echo "not found" >&6; }
22070            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22071          fi
22072          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22073$as_echo "$tool_specified" >&6; }
22074        fi
22075      fi
22076    fi
22077
22078  fi
22079
22080
22081
22082
22083  # Publish this variable in the help.
22084
22085
22086  if [ -z "${TIME+x}" ]; then
22087    # The variable is not set by user, try to locate tool using the code snippet
22088    for ac_prog in time
22089do
22090  # Extract the first word of "$ac_prog", so it can be a program name with args.
22091set dummy $ac_prog; ac_word=$2
22092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22093$as_echo_n "checking for $ac_word... " >&6; }
22094if ${ac_cv_path_TIME+:} false; then :
22095  $as_echo_n "(cached) " >&6
22096else
22097  case $TIME in
22098  [\\/]* | ?:[\\/]*)
22099  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22100  ;;
22101  *)
22102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22103for as_dir in $PATH
22104do
22105  IFS=$as_save_IFS
22106  test -z "$as_dir" && as_dir=.
22107    for ac_exec_ext in '' $ac_executable_extensions; do
22108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22109    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22111    break 2
22112  fi
22113done
22114  done
22115IFS=$as_save_IFS
22116
22117  ;;
22118esac
22119fi
22120TIME=$ac_cv_path_TIME
22121if test -n "$TIME"; then
22122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22123$as_echo "$TIME" >&6; }
22124else
22125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22126$as_echo "no" >&6; }
22127fi
22128
22129
22130  test -n "$TIME" && break
22131done
22132
22133  else
22134    # The variable is set, but is it from the command line or the environment?
22135
22136    # Try to remove the string !TIME! from our list.
22137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22139      # If it failed, the variable was not from the command line. Ignore it,
22140      # but warn the user (except for BASH, which is always set by the calling BASH).
22141      if test "xTIME" != xBASH; then
22142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22143$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22144      fi
22145      # Try to locate tool using the code snippet
22146      for ac_prog in time
22147do
22148  # Extract the first word of "$ac_prog", so it can be a program name with args.
22149set dummy $ac_prog; ac_word=$2
22150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22151$as_echo_n "checking for $ac_word... " >&6; }
22152if ${ac_cv_path_TIME+:} false; then :
22153  $as_echo_n "(cached) " >&6
22154else
22155  case $TIME in
22156  [\\/]* | ?:[\\/]*)
22157  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22158  ;;
22159  *)
22160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22161for as_dir in $PATH
22162do
22163  IFS=$as_save_IFS
22164  test -z "$as_dir" && as_dir=.
22165    for ac_exec_ext in '' $ac_executable_extensions; do
22166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22167    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22169    break 2
22170  fi
22171done
22172  done
22173IFS=$as_save_IFS
22174
22175  ;;
22176esac
22177fi
22178TIME=$ac_cv_path_TIME
22179if test -n "$TIME"; then
22180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22181$as_echo "$TIME" >&6; }
22182else
22183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22184$as_echo "no" >&6; }
22185fi
22186
22187
22188  test -n "$TIME" && break
22189done
22190
22191    else
22192      # If it succeeded, then it was overridden by the user. We will use it
22193      # for the tool.
22194
22195      # First remove it from the list of overridden variables, so we can test
22196      # for unknown variables in the end.
22197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22198
22199      # Check if we try to supply an empty value
22200      if test "x$TIME" = x; then
22201        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22202$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22203        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22204$as_echo_n "checking for TIME... " >&6; }
22205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22206$as_echo "disabled" >&6; }
22207      else
22208        # Check if the provided tool contains a complete path.
22209        tool_specified="$TIME"
22210        tool_basename="${tool_specified##*/}"
22211        if test "x$tool_basename" = "x$tool_specified"; then
22212          # A command without a complete path is provided, search $PATH.
22213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22214$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22215          # Extract the first word of "$tool_basename", so it can be a program name with args.
22216set dummy $tool_basename; ac_word=$2
22217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22218$as_echo_n "checking for $ac_word... " >&6; }
22219if ${ac_cv_path_TIME+:} false; then :
22220  $as_echo_n "(cached) " >&6
22221else
22222  case $TIME in
22223  [\\/]* | ?:[\\/]*)
22224  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22225  ;;
22226  *)
22227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22228for as_dir in $PATH
22229do
22230  IFS=$as_save_IFS
22231  test -z "$as_dir" && as_dir=.
22232    for ac_exec_ext in '' $ac_executable_extensions; do
22233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22234    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22236    break 2
22237  fi
22238done
22239  done
22240IFS=$as_save_IFS
22241
22242  ;;
22243esac
22244fi
22245TIME=$ac_cv_path_TIME
22246if test -n "$TIME"; then
22247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22248$as_echo "$TIME" >&6; }
22249else
22250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22251$as_echo "no" >&6; }
22252fi
22253
22254
22255          if test "x$TIME" = x; then
22256            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22257          fi
22258        else
22259          # Otherwise we believe it is a complete path. Use it as it is.
22260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22261$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22262          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22263$as_echo_n "checking for TIME... " >&6; }
22264          if test ! -x "$tool_specified"; then
22265            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22266$as_echo "not found" >&6; }
22267            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22268          fi
22269          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22270$as_echo "$tool_specified" >&6; }
22271        fi
22272      fi
22273    fi
22274
22275  fi
22276
22277
22278
22279
22280  # Publish this variable in the help.
22281
22282
22283  if [ -z "${DTRACE+x}" ]; then
22284    # The variable is not set by user, try to locate tool using the code snippet
22285    for ac_prog in dtrace
22286do
22287  # Extract the first word of "$ac_prog", so it can be a program name with args.
22288set dummy $ac_prog; ac_word=$2
22289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22290$as_echo_n "checking for $ac_word... " >&6; }
22291if ${ac_cv_path_DTRACE+:} false; then :
22292  $as_echo_n "(cached) " >&6
22293else
22294  case $DTRACE in
22295  [\\/]* | ?:[\\/]*)
22296  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22297  ;;
22298  *)
22299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22300for as_dir in $PATH
22301do
22302  IFS=$as_save_IFS
22303  test -z "$as_dir" && as_dir=.
22304    for ac_exec_ext in '' $ac_executable_extensions; do
22305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22306    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22308    break 2
22309  fi
22310done
22311  done
22312IFS=$as_save_IFS
22313
22314  ;;
22315esac
22316fi
22317DTRACE=$ac_cv_path_DTRACE
22318if test -n "$DTRACE"; then
22319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22320$as_echo "$DTRACE" >&6; }
22321else
22322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22323$as_echo "no" >&6; }
22324fi
22325
22326
22327  test -n "$DTRACE" && break
22328done
22329
22330  else
22331    # The variable is set, but is it from the command line or the environment?
22332
22333    # Try to remove the string !DTRACE! from our list.
22334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22336      # If it failed, the variable was not from the command line. Ignore it,
22337      # but warn the user (except for BASH, which is always set by the calling BASH).
22338      if test "xDTRACE" != xBASH; then
22339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22340$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22341      fi
22342      # Try to locate tool using the code snippet
22343      for ac_prog in dtrace
22344do
22345  # Extract the first word of "$ac_prog", so it can be a program name with args.
22346set dummy $ac_prog; ac_word=$2
22347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22348$as_echo_n "checking for $ac_word... " >&6; }
22349if ${ac_cv_path_DTRACE+:} false; then :
22350  $as_echo_n "(cached) " >&6
22351else
22352  case $DTRACE in
22353  [\\/]* | ?:[\\/]*)
22354  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22355  ;;
22356  *)
22357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22358for as_dir in $PATH
22359do
22360  IFS=$as_save_IFS
22361  test -z "$as_dir" && as_dir=.
22362    for ac_exec_ext in '' $ac_executable_extensions; do
22363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22364    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22366    break 2
22367  fi
22368done
22369  done
22370IFS=$as_save_IFS
22371
22372  ;;
22373esac
22374fi
22375DTRACE=$ac_cv_path_DTRACE
22376if test -n "$DTRACE"; then
22377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22378$as_echo "$DTRACE" >&6; }
22379else
22380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22381$as_echo "no" >&6; }
22382fi
22383
22384
22385  test -n "$DTRACE" && break
22386done
22387
22388    else
22389      # If it succeeded, then it was overridden by the user. We will use it
22390      # for the tool.
22391
22392      # First remove it from the list of overridden variables, so we can test
22393      # for unknown variables in the end.
22394      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22395
22396      # Check if we try to supply an empty value
22397      if test "x$DTRACE" = x; then
22398        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22399$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22400        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22401$as_echo_n "checking for DTRACE... " >&6; }
22402        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22403$as_echo "disabled" >&6; }
22404      else
22405        # Check if the provided tool contains a complete path.
22406        tool_specified="$DTRACE"
22407        tool_basename="${tool_specified##*/}"
22408        if test "x$tool_basename" = "x$tool_specified"; then
22409          # A command without a complete path is provided, search $PATH.
22410          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22411$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22412          # Extract the first word of "$tool_basename", so it can be a program name with args.
22413set dummy $tool_basename; ac_word=$2
22414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22415$as_echo_n "checking for $ac_word... " >&6; }
22416if ${ac_cv_path_DTRACE+:} false; then :
22417  $as_echo_n "(cached) " >&6
22418else
22419  case $DTRACE in
22420  [\\/]* | ?:[\\/]*)
22421  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22422  ;;
22423  *)
22424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22425for as_dir in $PATH
22426do
22427  IFS=$as_save_IFS
22428  test -z "$as_dir" && as_dir=.
22429    for ac_exec_ext in '' $ac_executable_extensions; do
22430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22431    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22433    break 2
22434  fi
22435done
22436  done
22437IFS=$as_save_IFS
22438
22439  ;;
22440esac
22441fi
22442DTRACE=$ac_cv_path_DTRACE
22443if test -n "$DTRACE"; then
22444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22445$as_echo "$DTRACE" >&6; }
22446else
22447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22448$as_echo "no" >&6; }
22449fi
22450
22451
22452          if test "x$DTRACE" = x; then
22453            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22454          fi
22455        else
22456          # Otherwise we believe it is a complete path. Use it as it is.
22457          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22458$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22459          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22460$as_echo_n "checking for DTRACE... " >&6; }
22461          if test ! -x "$tool_specified"; then
22462            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22463$as_echo "not found" >&6; }
22464            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22465          fi
22466          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22467$as_echo "$tool_specified" >&6; }
22468        fi
22469      fi
22470    fi
22471
22472  fi
22473
22474
22475
22476
22477  # Publish this variable in the help.
22478
22479
22480  if [ -z "${PATCH+x}" ]; then
22481    # The variable is not set by user, try to locate tool using the code snippet
22482    for ac_prog in gpatch patch
22483do
22484  # Extract the first word of "$ac_prog", so it can be a program name with args.
22485set dummy $ac_prog; ac_word=$2
22486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22487$as_echo_n "checking for $ac_word... " >&6; }
22488if ${ac_cv_path_PATCH+:} false; then :
22489  $as_echo_n "(cached) " >&6
22490else
22491  case $PATCH in
22492  [\\/]* | ?:[\\/]*)
22493  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22494  ;;
22495  *)
22496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22497for as_dir in $PATH
22498do
22499  IFS=$as_save_IFS
22500  test -z "$as_dir" && as_dir=.
22501    for ac_exec_ext in '' $ac_executable_extensions; do
22502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22503    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22505    break 2
22506  fi
22507done
22508  done
22509IFS=$as_save_IFS
22510
22511  ;;
22512esac
22513fi
22514PATCH=$ac_cv_path_PATCH
22515if test -n "$PATCH"; then
22516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22517$as_echo "$PATCH" >&6; }
22518else
22519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22520$as_echo "no" >&6; }
22521fi
22522
22523
22524  test -n "$PATCH" && break
22525done
22526
22527  else
22528    # The variable is set, but is it from the command line or the environment?
22529
22530    # Try to remove the string !PATCH! from our list.
22531    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22532    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22533      # If it failed, the variable was not from the command line. Ignore it,
22534      # but warn the user (except for BASH, which is always set by the calling BASH).
22535      if test "xPATCH" != xBASH; then
22536        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22537$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22538      fi
22539      # Try to locate tool using the code snippet
22540      for ac_prog in gpatch patch
22541do
22542  # Extract the first word of "$ac_prog", so it can be a program name with args.
22543set dummy $ac_prog; ac_word=$2
22544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22545$as_echo_n "checking for $ac_word... " >&6; }
22546if ${ac_cv_path_PATCH+:} false; then :
22547  $as_echo_n "(cached) " >&6
22548else
22549  case $PATCH in
22550  [\\/]* | ?:[\\/]*)
22551  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22552  ;;
22553  *)
22554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22555for as_dir in $PATH
22556do
22557  IFS=$as_save_IFS
22558  test -z "$as_dir" && as_dir=.
22559    for ac_exec_ext in '' $ac_executable_extensions; do
22560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22561    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22563    break 2
22564  fi
22565done
22566  done
22567IFS=$as_save_IFS
22568
22569  ;;
22570esac
22571fi
22572PATCH=$ac_cv_path_PATCH
22573if test -n "$PATCH"; then
22574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22575$as_echo "$PATCH" >&6; }
22576else
22577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22578$as_echo "no" >&6; }
22579fi
22580
22581
22582  test -n "$PATCH" && break
22583done
22584
22585    else
22586      # If it succeeded, then it was overridden by the user. We will use it
22587      # for the tool.
22588
22589      # First remove it from the list of overridden variables, so we can test
22590      # for unknown variables in the end.
22591      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22592
22593      # Check if we try to supply an empty value
22594      if test "x$PATCH" = x; then
22595        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22596$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22597        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22598$as_echo_n "checking for PATCH... " >&6; }
22599        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22600$as_echo "disabled" >&6; }
22601      else
22602        # Check if the provided tool contains a complete path.
22603        tool_specified="$PATCH"
22604        tool_basename="${tool_specified##*/}"
22605        if test "x$tool_basename" = "x$tool_specified"; then
22606          # A command without a complete path is provided, search $PATH.
22607          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22608$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22609          # Extract the first word of "$tool_basename", so it can be a program name with args.
22610set dummy $tool_basename; ac_word=$2
22611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22612$as_echo_n "checking for $ac_word... " >&6; }
22613if ${ac_cv_path_PATCH+:} false; then :
22614  $as_echo_n "(cached) " >&6
22615else
22616  case $PATCH in
22617  [\\/]* | ?:[\\/]*)
22618  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22619  ;;
22620  *)
22621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22622for as_dir in $PATH
22623do
22624  IFS=$as_save_IFS
22625  test -z "$as_dir" && as_dir=.
22626    for ac_exec_ext in '' $ac_executable_extensions; do
22627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22628    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22630    break 2
22631  fi
22632done
22633  done
22634IFS=$as_save_IFS
22635
22636  ;;
22637esac
22638fi
22639PATCH=$ac_cv_path_PATCH
22640if test -n "$PATCH"; then
22641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22642$as_echo "$PATCH" >&6; }
22643else
22644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22645$as_echo "no" >&6; }
22646fi
22647
22648
22649          if test "x$PATCH" = x; then
22650            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22651          fi
22652        else
22653          # Otherwise we believe it is a complete path. Use it as it is.
22654          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22655$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22656          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22657$as_echo_n "checking for PATCH... " >&6; }
22658          if test ! -x "$tool_specified"; then
22659            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22660$as_echo "not found" >&6; }
22661            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22662          fi
22663          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22664$as_echo "$tool_specified" >&6; }
22665        fi
22666      fi
22667    fi
22668
22669  fi
22670
22671
22672  # Check if it's GNU time
22673  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22674  if test "x$IS_GNU_TIME" != x; then
22675    IS_GNU_TIME=yes
22676  else
22677    IS_GNU_TIME=no
22678  fi
22679
22680
22681  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22682
22683
22684
22685  # Publish this variable in the help.
22686
22687
22688  if [ -z "${DSYMUTIL+x}" ]; then
22689    # The variable is not set by user, try to locate tool using the code snippet
22690    for ac_prog in dsymutil
22691do
22692  # Extract the first word of "$ac_prog", so it can be a program name with args.
22693set dummy $ac_prog; ac_word=$2
22694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22695$as_echo_n "checking for $ac_word... " >&6; }
22696if ${ac_cv_path_DSYMUTIL+:} false; then :
22697  $as_echo_n "(cached) " >&6
22698else
22699  case $DSYMUTIL in
22700  [\\/]* | ?:[\\/]*)
22701  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22702  ;;
22703  *)
22704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22705for as_dir in $PATH
22706do
22707  IFS=$as_save_IFS
22708  test -z "$as_dir" && as_dir=.
22709    for ac_exec_ext in '' $ac_executable_extensions; do
22710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22711    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22713    break 2
22714  fi
22715done
22716  done
22717IFS=$as_save_IFS
22718
22719  ;;
22720esac
22721fi
22722DSYMUTIL=$ac_cv_path_DSYMUTIL
22723if test -n "$DSYMUTIL"; then
22724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22725$as_echo "$DSYMUTIL" >&6; }
22726else
22727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22728$as_echo "no" >&6; }
22729fi
22730
22731
22732  test -n "$DSYMUTIL" && break
22733done
22734
22735  else
22736    # The variable is set, but is it from the command line or the environment?
22737
22738    # Try to remove the string !DSYMUTIL! from our list.
22739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22741      # If it failed, the variable was not from the command line. Ignore it,
22742      # but warn the user (except for BASH, which is always set by the calling BASH).
22743      if test "xDSYMUTIL" != xBASH; then
22744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22745$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22746      fi
22747      # Try to locate tool using the code snippet
22748      for ac_prog in dsymutil
22749do
22750  # Extract the first word of "$ac_prog", so it can be a program name with args.
22751set dummy $ac_prog; ac_word=$2
22752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22753$as_echo_n "checking for $ac_word... " >&6; }
22754if ${ac_cv_path_DSYMUTIL+:} false; then :
22755  $as_echo_n "(cached) " >&6
22756else
22757  case $DSYMUTIL in
22758  [\\/]* | ?:[\\/]*)
22759  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22760  ;;
22761  *)
22762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22763for as_dir in $PATH
22764do
22765  IFS=$as_save_IFS
22766  test -z "$as_dir" && as_dir=.
22767    for ac_exec_ext in '' $ac_executable_extensions; do
22768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22769    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22771    break 2
22772  fi
22773done
22774  done
22775IFS=$as_save_IFS
22776
22777  ;;
22778esac
22779fi
22780DSYMUTIL=$ac_cv_path_DSYMUTIL
22781if test -n "$DSYMUTIL"; then
22782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22783$as_echo "$DSYMUTIL" >&6; }
22784else
22785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22786$as_echo "no" >&6; }
22787fi
22788
22789
22790  test -n "$DSYMUTIL" && break
22791done
22792
22793    else
22794      # If it succeeded, then it was overridden by the user. We will use it
22795      # for the tool.
22796
22797      # First remove it from the list of overridden variables, so we can test
22798      # for unknown variables in the end.
22799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22800
22801      # Check if we try to supply an empty value
22802      if test "x$DSYMUTIL" = x; then
22803        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22804$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22806$as_echo_n "checking for DSYMUTIL... " >&6; }
22807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22808$as_echo "disabled" >&6; }
22809      else
22810        # Check if the provided tool contains a complete path.
22811        tool_specified="$DSYMUTIL"
22812        tool_basename="${tool_specified##*/}"
22813        if test "x$tool_basename" = "x$tool_specified"; then
22814          # A command without a complete path is provided, search $PATH.
22815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22816$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22817          # Extract the first word of "$tool_basename", so it can be a program name with args.
22818set dummy $tool_basename; ac_word=$2
22819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22820$as_echo_n "checking for $ac_word... " >&6; }
22821if ${ac_cv_path_DSYMUTIL+:} false; then :
22822  $as_echo_n "(cached) " >&6
22823else
22824  case $DSYMUTIL in
22825  [\\/]* | ?:[\\/]*)
22826  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22827  ;;
22828  *)
22829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22830for as_dir in $PATH
22831do
22832  IFS=$as_save_IFS
22833  test -z "$as_dir" && as_dir=.
22834    for ac_exec_ext in '' $ac_executable_extensions; do
22835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22836    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22838    break 2
22839  fi
22840done
22841  done
22842IFS=$as_save_IFS
22843
22844  ;;
22845esac
22846fi
22847DSYMUTIL=$ac_cv_path_DSYMUTIL
22848if test -n "$DSYMUTIL"; then
22849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22850$as_echo "$DSYMUTIL" >&6; }
22851else
22852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22853$as_echo "no" >&6; }
22854fi
22855
22856
22857          if test "x$DSYMUTIL" = x; then
22858            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22859          fi
22860        else
22861          # Otherwise we believe it is a complete path. Use it as it is.
22862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22863$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22864          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22865$as_echo_n "checking for DSYMUTIL... " >&6; }
22866          if test ! -x "$tool_specified"; then
22867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22868$as_echo "not found" >&6; }
22869            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22870          fi
22871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22872$as_echo "$tool_specified" >&6; }
22873        fi
22874      fi
22875    fi
22876
22877  fi
22878
22879
22880
22881  if test "x$DSYMUTIL" = x; then
22882    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22883  fi
22884
22885
22886
22887
22888
22889  # Publish this variable in the help.
22890
22891
22892  if [ -z "${XATTR+x}" ]; then
22893    # The variable is not set by user, try to locate tool using the code snippet
22894    for ac_prog in xattr
22895do
22896  # Extract the first word of "$ac_prog", so it can be a program name with args.
22897set dummy $ac_prog; ac_word=$2
22898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22899$as_echo_n "checking for $ac_word... " >&6; }
22900if ${ac_cv_path_XATTR+:} false; then :
22901  $as_echo_n "(cached) " >&6
22902else
22903  case $XATTR in
22904  [\\/]* | ?:[\\/]*)
22905  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22906  ;;
22907  *)
22908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22909for as_dir in $PATH
22910do
22911  IFS=$as_save_IFS
22912  test -z "$as_dir" && as_dir=.
22913    for ac_exec_ext in '' $ac_executable_extensions; do
22914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22915    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22917    break 2
22918  fi
22919done
22920  done
22921IFS=$as_save_IFS
22922
22923  ;;
22924esac
22925fi
22926XATTR=$ac_cv_path_XATTR
22927if test -n "$XATTR"; then
22928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22929$as_echo "$XATTR" >&6; }
22930else
22931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22932$as_echo "no" >&6; }
22933fi
22934
22935
22936  test -n "$XATTR" && break
22937done
22938
22939  else
22940    # The variable is set, but is it from the command line or the environment?
22941
22942    # Try to remove the string !XATTR! from our list.
22943    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22944    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22945      # If it failed, the variable was not from the command line. Ignore it,
22946      # but warn the user (except for BASH, which is always set by the calling BASH).
22947      if test "xXATTR" != xBASH; then
22948        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22949$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22950      fi
22951      # Try to locate tool using the code snippet
22952      for ac_prog in xattr
22953do
22954  # Extract the first word of "$ac_prog", so it can be a program name with args.
22955set dummy $ac_prog; ac_word=$2
22956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22957$as_echo_n "checking for $ac_word... " >&6; }
22958if ${ac_cv_path_XATTR+:} false; then :
22959  $as_echo_n "(cached) " >&6
22960else
22961  case $XATTR in
22962  [\\/]* | ?:[\\/]*)
22963  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22964  ;;
22965  *)
22966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22967for as_dir in $PATH
22968do
22969  IFS=$as_save_IFS
22970  test -z "$as_dir" && as_dir=.
22971    for ac_exec_ext in '' $ac_executable_extensions; do
22972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22973    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22975    break 2
22976  fi
22977done
22978  done
22979IFS=$as_save_IFS
22980
22981  ;;
22982esac
22983fi
22984XATTR=$ac_cv_path_XATTR
22985if test -n "$XATTR"; then
22986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22987$as_echo "$XATTR" >&6; }
22988else
22989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22990$as_echo "no" >&6; }
22991fi
22992
22993
22994  test -n "$XATTR" && break
22995done
22996
22997    else
22998      # If it succeeded, then it was overridden by the user. We will use it
22999      # for the tool.
23000
23001      # First remove it from the list of overridden variables, so we can test
23002      # for unknown variables in the end.
23003      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23004
23005      # Check if we try to supply an empty value
23006      if test "x$XATTR" = x; then
23007        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23008$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23009        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23010$as_echo_n "checking for XATTR... " >&6; }
23011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23012$as_echo "disabled" >&6; }
23013      else
23014        # Check if the provided tool contains a complete path.
23015        tool_specified="$XATTR"
23016        tool_basename="${tool_specified##*/}"
23017        if test "x$tool_basename" = "x$tool_specified"; then
23018          # A command without a complete path is provided, search $PATH.
23019          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23020$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23021          # Extract the first word of "$tool_basename", so it can be a program name with args.
23022set dummy $tool_basename; ac_word=$2
23023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23024$as_echo_n "checking for $ac_word... " >&6; }
23025if ${ac_cv_path_XATTR+:} false; then :
23026  $as_echo_n "(cached) " >&6
23027else
23028  case $XATTR in
23029  [\\/]* | ?:[\\/]*)
23030  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23031  ;;
23032  *)
23033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23034for as_dir in $PATH
23035do
23036  IFS=$as_save_IFS
23037  test -z "$as_dir" && as_dir=.
23038    for ac_exec_ext in '' $ac_executable_extensions; do
23039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23040    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23042    break 2
23043  fi
23044done
23045  done
23046IFS=$as_save_IFS
23047
23048  ;;
23049esac
23050fi
23051XATTR=$ac_cv_path_XATTR
23052if test -n "$XATTR"; then
23053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23054$as_echo "$XATTR" >&6; }
23055else
23056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23057$as_echo "no" >&6; }
23058fi
23059
23060
23061          if test "x$XATTR" = x; then
23062            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23063          fi
23064        else
23065          # Otherwise we believe it is a complete path. Use it as it is.
23066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23067$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23068          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23069$as_echo_n "checking for XATTR... " >&6; }
23070          if test ! -x "$tool_specified"; then
23071            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23072$as_echo "not found" >&6; }
23073            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23074          fi
23075          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23076$as_echo "$tool_specified" >&6; }
23077        fi
23078      fi
23079    fi
23080
23081  fi
23082
23083
23084
23085  if test "x$XATTR" = x; then
23086    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23087  fi
23088
23089
23090
23091
23092  # Publish this variable in the help.
23093
23094
23095  if [ -z "${CODESIGN+x}" ]; then
23096    # The variable is not set by user, try to locate tool using the code snippet
23097    for ac_prog in codesign
23098do
23099  # Extract the first word of "$ac_prog", so it can be a program name with args.
23100set dummy $ac_prog; ac_word=$2
23101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23102$as_echo_n "checking for $ac_word... " >&6; }
23103if ${ac_cv_path_CODESIGN+:} false; then :
23104  $as_echo_n "(cached) " >&6
23105else
23106  case $CODESIGN in
23107  [\\/]* | ?:[\\/]*)
23108  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23109  ;;
23110  *)
23111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23112for as_dir in $PATH
23113do
23114  IFS=$as_save_IFS
23115  test -z "$as_dir" && as_dir=.
23116    for ac_exec_ext in '' $ac_executable_extensions; do
23117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23118    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23120    break 2
23121  fi
23122done
23123  done
23124IFS=$as_save_IFS
23125
23126  ;;
23127esac
23128fi
23129CODESIGN=$ac_cv_path_CODESIGN
23130if test -n "$CODESIGN"; then
23131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23132$as_echo "$CODESIGN" >&6; }
23133else
23134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23135$as_echo "no" >&6; }
23136fi
23137
23138
23139  test -n "$CODESIGN" && break
23140done
23141
23142  else
23143    # The variable is set, but is it from the command line or the environment?
23144
23145    # Try to remove the string !CODESIGN! from our list.
23146    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23147    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23148      # If it failed, the variable was not from the command line. Ignore it,
23149      # but warn the user (except for BASH, which is always set by the calling BASH).
23150      if test "xCODESIGN" != xBASH; then
23151        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23152$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23153      fi
23154      # Try to locate tool using the code snippet
23155      for ac_prog in codesign
23156do
23157  # Extract the first word of "$ac_prog", so it can be a program name with args.
23158set dummy $ac_prog; ac_word=$2
23159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23160$as_echo_n "checking for $ac_word... " >&6; }
23161if ${ac_cv_path_CODESIGN+:} false; then :
23162  $as_echo_n "(cached) " >&6
23163else
23164  case $CODESIGN in
23165  [\\/]* | ?:[\\/]*)
23166  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23167  ;;
23168  *)
23169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23170for as_dir in $PATH
23171do
23172  IFS=$as_save_IFS
23173  test -z "$as_dir" && as_dir=.
23174    for ac_exec_ext in '' $ac_executable_extensions; do
23175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23176    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23178    break 2
23179  fi
23180done
23181  done
23182IFS=$as_save_IFS
23183
23184  ;;
23185esac
23186fi
23187CODESIGN=$ac_cv_path_CODESIGN
23188if test -n "$CODESIGN"; then
23189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23190$as_echo "$CODESIGN" >&6; }
23191else
23192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23193$as_echo "no" >&6; }
23194fi
23195
23196
23197  test -n "$CODESIGN" && break
23198done
23199
23200    else
23201      # If it succeeded, then it was overridden by the user. We will use it
23202      # for the tool.
23203
23204      # First remove it from the list of overridden variables, so we can test
23205      # for unknown variables in the end.
23206      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23207
23208      # Check if we try to supply an empty value
23209      if test "x$CODESIGN" = x; then
23210        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23211$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23212        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23213$as_echo_n "checking for CODESIGN... " >&6; }
23214        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23215$as_echo "disabled" >&6; }
23216      else
23217        # Check if the provided tool contains a complete path.
23218        tool_specified="$CODESIGN"
23219        tool_basename="${tool_specified##*/}"
23220        if test "x$tool_basename" = "x$tool_specified"; then
23221          # A command without a complete path is provided, search $PATH.
23222          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23223$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23224          # Extract the first word of "$tool_basename", so it can be a program name with args.
23225set dummy $tool_basename; ac_word=$2
23226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23227$as_echo_n "checking for $ac_word... " >&6; }
23228if ${ac_cv_path_CODESIGN+:} false; then :
23229  $as_echo_n "(cached) " >&6
23230else
23231  case $CODESIGN in
23232  [\\/]* | ?:[\\/]*)
23233  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23234  ;;
23235  *)
23236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23237for as_dir in $PATH
23238do
23239  IFS=$as_save_IFS
23240  test -z "$as_dir" && as_dir=.
23241    for ac_exec_ext in '' $ac_executable_extensions; do
23242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23243    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23245    break 2
23246  fi
23247done
23248  done
23249IFS=$as_save_IFS
23250
23251  ;;
23252esac
23253fi
23254CODESIGN=$ac_cv_path_CODESIGN
23255if test -n "$CODESIGN"; then
23256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23257$as_echo "$CODESIGN" >&6; }
23258else
23259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23260$as_echo "no" >&6; }
23261fi
23262
23263
23264          if test "x$CODESIGN" = x; then
23265            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23266          fi
23267        else
23268          # Otherwise we believe it is a complete path. Use it as it is.
23269          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23270$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23271          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23272$as_echo_n "checking for CODESIGN... " >&6; }
23273          if test ! -x "$tool_specified"; then
23274            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23275$as_echo "not found" >&6; }
23276            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23277          fi
23278          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23279$as_echo "$tool_specified" >&6; }
23280        fi
23281      fi
23282    fi
23283
23284  fi
23285
23286
23287    if test "x$CODESIGN" != "x"; then
23288      # Verify that the openjdk_codesign certificate is present
23289      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23290$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23291      rm -f codesign-testfile
23292      touch codesign-testfile
23293      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23294      rm -f codesign-testfile
23295      if test "x$CODESIGN" = x; then
23296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23297$as_echo "no" >&6; }
23298      else
23299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23300$as_echo "yes" >&6; }
23301      fi
23302    fi
23303
23304
23305
23306  # Publish this variable in the help.
23307
23308
23309  if [ -z "${SETFILE+x}" ]; then
23310    # The variable is not set by user, try to locate tool using the code snippet
23311    for ac_prog in SetFile
23312do
23313  # Extract the first word of "$ac_prog", so it can be a program name with args.
23314set dummy $ac_prog; ac_word=$2
23315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23316$as_echo_n "checking for $ac_word... " >&6; }
23317if ${ac_cv_path_SETFILE+:} false; then :
23318  $as_echo_n "(cached) " >&6
23319else
23320  case $SETFILE in
23321  [\\/]* | ?:[\\/]*)
23322  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23323  ;;
23324  *)
23325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23326for as_dir in $PATH
23327do
23328  IFS=$as_save_IFS
23329  test -z "$as_dir" && as_dir=.
23330    for ac_exec_ext in '' $ac_executable_extensions; do
23331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23332    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23334    break 2
23335  fi
23336done
23337  done
23338IFS=$as_save_IFS
23339
23340  ;;
23341esac
23342fi
23343SETFILE=$ac_cv_path_SETFILE
23344if test -n "$SETFILE"; then
23345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23346$as_echo "$SETFILE" >&6; }
23347else
23348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23349$as_echo "no" >&6; }
23350fi
23351
23352
23353  test -n "$SETFILE" && break
23354done
23355
23356  else
23357    # The variable is set, but is it from the command line or the environment?
23358
23359    # Try to remove the string !SETFILE! from our list.
23360    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23361    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23362      # If it failed, the variable was not from the command line. Ignore it,
23363      # but warn the user (except for BASH, which is always set by the calling BASH).
23364      if test "xSETFILE" != xBASH; then
23365        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23366$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23367      fi
23368      # Try to locate tool using the code snippet
23369      for ac_prog in SetFile
23370do
23371  # Extract the first word of "$ac_prog", so it can be a program name with args.
23372set dummy $ac_prog; ac_word=$2
23373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23374$as_echo_n "checking for $ac_word... " >&6; }
23375if ${ac_cv_path_SETFILE+:} false; then :
23376  $as_echo_n "(cached) " >&6
23377else
23378  case $SETFILE in
23379  [\\/]* | ?:[\\/]*)
23380  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23381  ;;
23382  *)
23383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23384for as_dir in $PATH
23385do
23386  IFS=$as_save_IFS
23387  test -z "$as_dir" && as_dir=.
23388    for ac_exec_ext in '' $ac_executable_extensions; do
23389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23390    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23392    break 2
23393  fi
23394done
23395  done
23396IFS=$as_save_IFS
23397
23398  ;;
23399esac
23400fi
23401SETFILE=$ac_cv_path_SETFILE
23402if test -n "$SETFILE"; then
23403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23404$as_echo "$SETFILE" >&6; }
23405else
23406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23407$as_echo "no" >&6; }
23408fi
23409
23410
23411  test -n "$SETFILE" && break
23412done
23413
23414    else
23415      # If it succeeded, then it was overridden by the user. We will use it
23416      # for the tool.
23417
23418      # First remove it from the list of overridden variables, so we can test
23419      # for unknown variables in the end.
23420      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23421
23422      # Check if we try to supply an empty value
23423      if test "x$SETFILE" = x; then
23424        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23425$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23426        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23427$as_echo_n "checking for SETFILE... " >&6; }
23428        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23429$as_echo "disabled" >&6; }
23430      else
23431        # Check if the provided tool contains a complete path.
23432        tool_specified="$SETFILE"
23433        tool_basename="${tool_specified##*/}"
23434        if test "x$tool_basename" = "x$tool_specified"; then
23435          # A command without a complete path is provided, search $PATH.
23436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23437$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23438          # Extract the first word of "$tool_basename", so it can be a program name with args.
23439set dummy $tool_basename; ac_word=$2
23440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23441$as_echo_n "checking for $ac_word... " >&6; }
23442if ${ac_cv_path_SETFILE+:} false; then :
23443  $as_echo_n "(cached) " >&6
23444else
23445  case $SETFILE in
23446  [\\/]* | ?:[\\/]*)
23447  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23448  ;;
23449  *)
23450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23451for as_dir in $PATH
23452do
23453  IFS=$as_save_IFS
23454  test -z "$as_dir" && as_dir=.
23455    for ac_exec_ext in '' $ac_executable_extensions; do
23456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23457    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23459    break 2
23460  fi
23461done
23462  done
23463IFS=$as_save_IFS
23464
23465  ;;
23466esac
23467fi
23468SETFILE=$ac_cv_path_SETFILE
23469if test -n "$SETFILE"; then
23470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23471$as_echo "$SETFILE" >&6; }
23472else
23473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23474$as_echo "no" >&6; }
23475fi
23476
23477
23478          if test "x$SETFILE" = x; then
23479            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23480          fi
23481        else
23482          # Otherwise we believe it is a complete path. Use it as it is.
23483          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23484$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23485          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23486$as_echo_n "checking for SETFILE... " >&6; }
23487          if test ! -x "$tool_specified"; then
23488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23489$as_echo "not found" >&6; }
23490            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23491          fi
23492          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23493$as_echo "$tool_specified" >&6; }
23494        fi
23495      fi
23496    fi
23497
23498  fi
23499
23500
23501
23502  if test "x$SETFILE" = x; then
23503    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23504  fi
23505
23506
23507  fi
23508
23509
23510  # Test if bash supports pipefail.
23511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23512$as_echo_n "checking if bash supports pipefail... " >&6; }
23513  if ${BASH} -c 'set -o pipefail'; then
23514    BASH_ARGS="$BASH_ARGS -o pipefail"
23515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23516$as_echo "yes" >&6; }
23517  else
23518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23519$as_echo "no" >&6; }
23520  fi
23521
23522  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23523$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23524  if ${BASH} -e -c 'true'; then
23525    BASH_ARGS="$BASH_ARGS -e"
23526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23527$as_echo "yes" >&6; }
23528  else
23529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23530$as_echo "no" >&6; }
23531  fi
23532
23533
23534
23535
23536# Check if pkg-config is available.
23537
23538
23539if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23540	if test -n "$ac_tool_prefix"; then
23541  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23542set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23544$as_echo_n "checking for $ac_word... " >&6; }
23545if ${ac_cv_path_PKG_CONFIG+:} false; then :
23546  $as_echo_n "(cached) " >&6
23547else
23548  case $PKG_CONFIG in
23549  [\\/]* | ?:[\\/]*)
23550  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23551  ;;
23552  *)
23553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23554for as_dir in $PATH
23555do
23556  IFS=$as_save_IFS
23557  test -z "$as_dir" && as_dir=.
23558    for ac_exec_ext in '' $ac_executable_extensions; do
23559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23560    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23562    break 2
23563  fi
23564done
23565  done
23566IFS=$as_save_IFS
23567
23568  ;;
23569esac
23570fi
23571PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23572if test -n "$PKG_CONFIG"; then
23573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23574$as_echo "$PKG_CONFIG" >&6; }
23575else
23576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23577$as_echo "no" >&6; }
23578fi
23579
23580
23581fi
23582if test -z "$ac_cv_path_PKG_CONFIG"; then
23583  ac_pt_PKG_CONFIG=$PKG_CONFIG
23584  # Extract the first word of "pkg-config", so it can be a program name with args.
23585set dummy pkg-config; ac_word=$2
23586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23587$as_echo_n "checking for $ac_word... " >&6; }
23588if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23589  $as_echo_n "(cached) " >&6
23590else
23591  case $ac_pt_PKG_CONFIG in
23592  [\\/]* | ?:[\\/]*)
23593  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23594  ;;
23595  *)
23596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23597for as_dir in $PATH
23598do
23599  IFS=$as_save_IFS
23600  test -z "$as_dir" && as_dir=.
23601    for ac_exec_ext in '' $ac_executable_extensions; do
23602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23603    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23605    break 2
23606  fi
23607done
23608  done
23609IFS=$as_save_IFS
23610
23611  ;;
23612esac
23613fi
23614ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23615if test -n "$ac_pt_PKG_CONFIG"; then
23616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23617$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23618else
23619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23620$as_echo "no" >&6; }
23621fi
23622
23623  if test "x$ac_pt_PKG_CONFIG" = x; then
23624    PKG_CONFIG=""
23625  else
23626    case $cross_compiling:$ac_tool_warned in
23627yes:)
23628{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23629$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23630ac_tool_warned=yes ;;
23631esac
23632    PKG_CONFIG=$ac_pt_PKG_CONFIG
23633  fi
23634else
23635  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23636fi
23637
23638fi
23639if test -n "$PKG_CONFIG"; then
23640	_pkg_min_version=0.9.0
23641	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23642$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23643	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23644		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23645$as_echo "yes" >&6; }
23646	else
23647		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23648$as_echo "no" >&6; }
23649		PKG_CONFIG=""
23650	fi
23651
23652fi
23653
23654# After basic tools have been setup, we can check build os specific details.
23655
23656  ###############################################################################
23657
23658  # Note that this is the build platform OS version!
23659
23660  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23661  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23662  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23663  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23664
23665
23666
23667
23668
23669# Misc basic settings
23670
23671
23672# Check whether --with-default-make-target was given.
23673if test "${with_default_make_target+set}" = set; then :
23674  withval=$with_default_make_target;
23675fi
23676
23677  if test "x$with_default_make_target" = "x" \
23678      || test "x$with_default_make_target" = "xyes"; then
23679    DEFAULT_MAKE_TARGET="exploded-image"
23680  elif test "x$with_default_make_target" = "xno"; then
23681    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23682  else
23683    DEFAULT_MAKE_TARGET="$with_default_make_target"
23684  fi
23685
23686
23687
23688
23689###############################################################################
23690#
23691# Determine OpenJDK variants, options and version numbers.
23692#
23693###############################################################################
23694
23695# We need build & target for this.
23696
23697  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23698  # We always build headless support.
23699  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23700$as_echo_n "checking headful support... " >&6; }
23701  # Check whether --enable-headful was given.
23702if test "${enable_headful+set}" = set; then :
23703  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23704else
23705  SUPPORT_HEADFUL=yes
23706fi
23707
23708
23709  SUPPORT_HEADLESS=yes
23710  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23711
23712  if test "x$SUPPORT_HEADFUL" = xyes; then
23713    # We are building both headful and headless.
23714    headful_msg="include support for both headful and headless"
23715  fi
23716
23717  if test "x$SUPPORT_HEADFUL" = xno; then
23718    # Thus we are building headless only.
23719    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23720    headful_msg="headless only"
23721  fi
23722
23723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23724$as_echo "$headful_msg" >&6; }
23725
23726
23727
23728
23729
23730  # Choose cacerts source file
23731
23732# Check whether --with-cacerts-file was given.
23733if test "${with_cacerts_file+set}" = set; then :
23734  withval=$with_cacerts_file;
23735fi
23736
23737  if test "x$with_cacerts_file" != x; then
23738    CACERTS_FILE=$with_cacerts_file
23739  fi
23740
23741
23742  # Enable or disable unlimited crypto
23743  # Check whether --enable-unlimited-crypto was given.
23744if test "${enable_unlimited_crypto+set}" = set; then :
23745  enableval=$enable_unlimited_crypto;
23746else
23747  enable_unlimited_crypto=no
23748fi
23749
23750  if test "x$enable_unlimited_crypto" = "xyes"; then
23751    UNLIMITED_CRYPTO=true
23752  else
23753    UNLIMITED_CRYPTO=false
23754  fi
23755
23756
23757  # Should we build the serviceability agent (SA)?
23758  INCLUDE_SA=true
23759  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
23760    INCLUDE_SA=false
23761  fi
23762  if test "x$OPENJDK_TARGET_OS" = xaix ; then
23763    INCLUDE_SA=false
23764  fi
23765  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
23766    INCLUDE_SA=false
23767  fi
23768
23769
23770  # Compress jars
23771  COMPRESS_JARS=false
23772
23773
23774
23775  # Setup default copyright year. Mostly overridden when building close to a new year.
23776
23777# Check whether --with-copyright-year was given.
23778if test "${with_copyright_year+set}" = set; then :
23779  withval=$with_copyright_year;
23780fi
23781
23782  if test "x$with_copyright_year" = xyes; then
23783    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23784  elif test "x$with_copyright_year" != x; then
23785    COPYRIGHT_YEAR="$with_copyright_year"
23786  else
23787    COPYRIGHT_YEAR=`date +'%Y'`
23788  fi
23789
23790
23791
23792  # Check whether --enable-keep-packaged-modules was given.
23793if test "${enable_keep_packaged_modules+set}" = set; then :
23794  enableval=$enable_keep_packaged_modules;
23795fi
23796
23797
23798  if test "x$enable_keep_packaged_modules" = "xyes"; then
23799    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23800$as_echo_n "checking if packaged modules are kept... " >&6; }
23801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23802$as_echo "yes" >&6; }
23803    JLINK_KEEP_PACKAGED_MODULES=true
23804  elif test "x$enable_keep_packaged_modules" = "xno"; then
23805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23806$as_echo_n "checking if packaged modules are kept... " >&6; }
23807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23808$as_echo "no" >&6; }
23809    JLINK_KEEP_PACKAGED_MODULES=false
23810  elif test "x$enable_keep_packaged_modules" = "x"; then
23811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
23812$as_echo "yes (default)" >&6; }
23813    JLINK_KEEP_PACKAGED_MODULES=true
23814  else
23815    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
23816  fi
23817
23818
23819
23820
23821  # Warn user that old version arguments are deprecated.
23822
23823
23824# Check whether --with-milestone was given.
23825if test "${with_milestone+set}" = set; then :
23826  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23827$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23828fi
23829
23830
23831
23832
23833# Check whether --with-update-version was given.
23834if test "${with_update_version+set}" = set; then :
23835  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23836$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23837fi
23838
23839
23840
23841
23842# Check whether --with-user-release-suffix was given.
23843if test "${with_user_release_suffix+set}" = set; then :
23844  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
23845$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23846fi
23847
23848
23849
23850
23851# Check whether --with-build-number was given.
23852if test "${with_build_number+set}" = set; then :
23853  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23854$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23855fi
23856
23857
23858
23859  # Source the version numbers file
23860  . $AUTOCONF_DIR/version-numbers
23861
23862  # Some non-version number information is set in that file
23863
23864
23865
23866
23867
23868
23869
23870
23871
23872  # Override version from arguments
23873
23874  # If --with-version-string is set, process it first. It is possible to
23875  # override parts with more specific flags, since these are processed later.
23876
23877# Check whether --with-version-string was given.
23878if test "${with_version_string+set}" = set; then :
23879  withval=$with_version_string;
23880fi
23881
23882  if test "x$with_version_string" = xyes; then
23883    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23884  elif test "x$with_version_string" != x; then
23885    # Additional [] needed to keep m4 from mangling shell constructs.
23886    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23887      VERSION_MAJOR=${BASH_REMATCH[1]}
23888      VERSION_MINOR=${BASH_REMATCH[3]}
23889      VERSION_SECURITY=${BASH_REMATCH[5]}
23890      VERSION_PATCH=${BASH_REMATCH[7]}
23891      VERSION_PRE=${BASH_REMATCH[9]}
23892      version_plus_separator=${BASH_REMATCH[11]}
23893      VERSION_BUILD=${BASH_REMATCH[12]}
23894      VERSION_OPT=${BASH_REMATCH[14]}
23895      # Unspecified numerical fields are interpreted as 0.
23896      if test "x$VERSION_MINOR" = x; then
23897        VERSION_MINOR=0
23898      fi
23899      if test "x$VERSION_SECURITY" = x; then
23900        VERSION_SECURITY=0
23901      fi
23902      if test "x$VERSION_PATCH" = x; then
23903        VERSION_PATCH=0
23904      fi
23905      if test "x$version_plus_separator" != x \
23906          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23907        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23908      fi
23909      # Stop the version part process from setting default values.
23910      # We still allow them to explicitely override though.
23911      NO_DEFAULT_VERSION_PARTS=true
23912    else
23913      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23914    fi
23915  fi
23916
23917
23918# Check whether --with-version-pre was given.
23919if test "${with_version_pre+set}" = set; then :
23920  withval=$with_version_pre; with_version_pre_present=true
23921else
23922  with_version_pre_present=false
23923fi
23924
23925
23926  if test "x$with_version_pre_present" = xtrue; then
23927    if test "x$with_version_pre" = xyes; then
23928      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23929    elif test "x$with_version_pre" = xno; then
23930      # Interpret --without-* as empty string instead of the literal "no"
23931      VERSION_PRE=
23932    else
23933      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23934       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23935      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23936        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23937$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23938      fi
23939    fi
23940  else
23941    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23942      # Default is to use "internal" as pre
23943      VERSION_PRE="internal"
23944    fi
23945  fi
23946
23947
23948# Check whether --with-version-opt was given.
23949if test "${with_version_opt+set}" = set; then :
23950  withval=$with_version_opt; with_version_opt_present=true
23951else
23952  with_version_opt_present=false
23953fi
23954
23955
23956  if test "x$with_version_opt_present" = xtrue; then
23957    if test "x$with_version_opt" = xyes; then
23958      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23959    elif test "x$with_version_opt" = xno; then
23960      # Interpret --without-* as empty string instead of the literal "no"
23961      VERSION_OPT=
23962    else
23963      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23964       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23965      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23966        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23967$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23968      fi
23969    fi
23970  else
23971    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23972      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23973      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23974      # Outer [ ] to quote m4.
23975       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23976      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
23977    fi
23978  fi
23979
23980
23981# Check whether --with-version-build was given.
23982if test "${with_version_build+set}" = set; then :
23983  withval=$with_version_build; with_version_build_present=true
23984else
23985  with_version_build_present=false
23986fi
23987
23988
23989  if test "x$with_version_build_present" = xtrue; then
23990    if test "x$with_version_build" = xyes; then
23991      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23992    elif test "x$with_version_build" = xno; then
23993      # Interpret --without-* as empty string instead of the literal "no"
23994      VERSION_BUILD=
23995    elif test "x$with_version_build" = x; then
23996      VERSION_BUILD=
23997    else
23998
23999  # Additional [] needed to keep m4 from mangling shell constructs.
24000  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24001    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24002  fi
24003  # Extract the version number without leading zeros.
24004  cleaned_value=${BASH_REMATCH[1]}
24005  if test "x$cleaned_value" = x; then
24006    # Special case for zero
24007    cleaned_value=${BASH_REMATCH[2]}
24008  fi
24009
24010  if test $cleaned_value -gt 255; then
24011    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24012  fi
24013  if test "x$cleaned_value" != "x$with_version_build"; then
24014    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24015$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24016  fi
24017  VERSION_BUILD=$cleaned_value
24018
24019    fi
24020  else
24021    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24022      # Default is to not have a build number.
24023      VERSION_BUILD=""
24024      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24025      VERSION_BUILD=0
24026    fi
24027  fi
24028
24029
24030# Check whether --with-version-major was given.
24031if test "${with_version_major+set}" = set; then :
24032  withval=$with_version_major; with_version_major_present=true
24033else
24034  with_version_major_present=false
24035fi
24036
24037
24038  if test "x$with_version_major_present" = xtrue; then
24039    if test "x$with_version_major" = xyes; then
24040      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24041    else
24042
24043  # Additional [] needed to keep m4 from mangling shell constructs.
24044  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24045    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24046  fi
24047  # Extract the version number without leading zeros.
24048  cleaned_value=${BASH_REMATCH[1]}
24049  if test "x$cleaned_value" = x; then
24050    # Special case for zero
24051    cleaned_value=${BASH_REMATCH[2]}
24052  fi
24053
24054  if test $cleaned_value -gt 255; then
24055    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24056  fi
24057  if test "x$cleaned_value" != "x$with_version_major"; then
24058    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24059$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24060  fi
24061  VERSION_MAJOR=$cleaned_value
24062
24063    fi
24064  else
24065    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24066      # Default is to get value from version-numbers
24067      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24068    fi
24069  fi
24070
24071
24072# Check whether --with-version-minor was given.
24073if test "${with_version_minor+set}" = set; then :
24074  withval=$with_version_minor; with_version_minor_present=true
24075else
24076  with_version_minor_present=false
24077fi
24078
24079
24080  if test "x$with_version_minor_present" = xtrue; then
24081    if test "x$with_version_minor" = xyes; then
24082      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24083    elif test "x$with_version_minor" = xno; then
24084      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24085      VERSION_MINOR=0
24086    elif test "x$with_version_minor" = x; then
24087      VERSION_MINOR=0
24088    else
24089
24090  # Additional [] needed to keep m4 from mangling shell constructs.
24091  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24092    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24093  fi
24094  # Extract the version number without leading zeros.
24095  cleaned_value=${BASH_REMATCH[1]}
24096  if test "x$cleaned_value" = x; then
24097    # Special case for zero
24098    cleaned_value=${BASH_REMATCH[2]}
24099  fi
24100
24101  if test $cleaned_value -gt 255; then
24102    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24103  fi
24104  if test "x$cleaned_value" != "x$with_version_minor"; then
24105    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24106$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24107  fi
24108  VERSION_MINOR=$cleaned_value
24109
24110    fi
24111  else
24112    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24113      # Default is 0, if unspecified
24114      VERSION_MINOR=0
24115    fi
24116  fi
24117
24118
24119# Check whether --with-version-security was given.
24120if test "${with_version_security+set}" = set; then :
24121  withval=$with_version_security; with_version_security_present=true
24122else
24123  with_version_security_present=false
24124fi
24125
24126
24127  if test "x$with_version_security_present" = xtrue; then
24128    if test "x$with_version_security" = xyes; then
24129      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24130    elif test "x$with_version_security" = xno; then
24131      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24132      VERSION_SECURITY=0
24133    elif test "x$with_version_security" = x; then
24134      VERSION_SECURITY=0
24135    else
24136
24137  # Additional [] needed to keep m4 from mangling shell constructs.
24138  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24139    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24140  fi
24141  # Extract the version number without leading zeros.
24142  cleaned_value=${BASH_REMATCH[1]}
24143  if test "x$cleaned_value" = x; then
24144    # Special case for zero
24145    cleaned_value=${BASH_REMATCH[2]}
24146  fi
24147
24148  if test $cleaned_value -gt 255; then
24149    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24150  fi
24151  if test "x$cleaned_value" != "x$with_version_security"; then
24152    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24153$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24154  fi
24155  VERSION_SECURITY=$cleaned_value
24156
24157    fi
24158  else
24159    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24160      # Default is 0, if unspecified
24161      VERSION_SECURITY=0
24162    fi
24163  fi
24164
24165
24166# Check whether --with-version-patch was given.
24167if test "${with_version_patch+set}" = set; then :
24168  withval=$with_version_patch; with_version_patch_present=true
24169else
24170  with_version_patch_present=false
24171fi
24172
24173
24174  if test "x$with_version_patch_present" = xtrue; then
24175    if test "x$with_version_patch" = xyes; then
24176      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24177    elif test "x$with_version_patch" = xno; then
24178      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24179      VERSION_PATCH=0
24180    elif test "x$with_version_patch" = x; then
24181      VERSION_PATCH=0
24182    else
24183
24184  # Additional [] needed to keep m4 from mangling shell constructs.
24185  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24186    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24187  fi
24188  # Extract the version number without leading zeros.
24189  cleaned_value=${BASH_REMATCH[1]}
24190  if test "x$cleaned_value" = x; then
24191    # Special case for zero
24192    cleaned_value=${BASH_REMATCH[2]}
24193  fi
24194
24195  if test $cleaned_value -gt 255; then
24196    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24197  fi
24198  if test "x$cleaned_value" != "x$with_version_patch"; then
24199    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24200$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24201  fi
24202  VERSION_PATCH=$cleaned_value
24203
24204    fi
24205  else
24206    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24207      # Default is 0, if unspecified
24208      VERSION_PATCH=0
24209    fi
24210  fi
24211
24212  # Calculate derived version properties
24213
24214  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24215  if test "x$VERSION_PRE" = x; then
24216    VERSION_IS_GA=true
24217  else
24218    VERSION_IS_GA=false
24219  fi
24220
24221  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24222  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24223
24224  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24225  # Strip trailing zeroes from stripped_version_number
24226  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24227  VERSION_NUMBER=$stripped_version_number
24228
24229  # The complete version string, with additional build information
24230  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24231    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24232  else
24233    # If either build or opt is set, we need a + separator
24234    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24235  fi
24236
24237  # The short version string, just VERSION_NUMBER and PRE, if present.
24238  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24239
24240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24241$as_echo_n "checking for version string... " >&6; }
24242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24243$as_echo "$VERSION_STRING" >&6; }
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259###############################################################################
24260#
24261# Setup BootJDK, used to bootstrap the build.
24262#
24263###############################################################################
24264
24265
24266  BOOT_JDK_FOUND=no
24267
24268# Check whether --with-boot-jdk was given.
24269if test "${with_boot_jdk+set}" = set; then :
24270  withval=$with_boot_jdk;
24271fi
24272
24273
24274  # We look for the Boot JDK through various means, going from more certain to
24275  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24276  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24277  # must check if this is indeed valid; otherwise we'll continue looking.
24278
24279  # Test: Is bootjdk explicitely set by command line arguments?
24280
24281  if test "x$BOOT_JDK_FOUND" = xno; then
24282    # Now execute the test
24283
24284  if test "x$with_boot_jdk" != x; then
24285    BOOT_JDK=$with_boot_jdk
24286    BOOT_JDK_FOUND=maybe
24287    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24288$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24289  fi
24290
24291
24292    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24293    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24294      # Do we have a bin/java?
24295      if test ! -x "$BOOT_JDK/bin/java"; then
24296        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24298        BOOT_JDK_FOUND=no
24299      else
24300        # Do we have a bin/javac?
24301        if test ! -x "$BOOT_JDK/bin/javac"; then
24302          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24304          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24305$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24306          BOOT_JDK_FOUND=no
24307        else
24308          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24309          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24310
24311          # Extra M4 quote needed to protect [] in grep expression.
24312          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24313          if test "x$FOUND_CORRECT_VERSION" = x; then
24314            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24316            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24317$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24318            BOOT_JDK_FOUND=no
24319          else
24320            # We're done! :-)
24321            BOOT_JDK_FOUND=yes
24322
24323  # Only process if variable expands to non-empty
24324
24325  if test "x$BOOT_JDK" != x; then
24326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24327
24328  # Input might be given as Windows format, start by converting to
24329  # unix format.
24330  path="$BOOT_JDK"
24331  new_path=`$CYGPATH -u "$path"`
24332
24333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24336  # "foo.exe" is OK but "foo" is an error.
24337  #
24338  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24339  # It is also a way to make sure we got the proper file name for the real test later on.
24340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24341  if test "x$test_shortpath" = x; then
24342    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24343$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24344    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24345  fi
24346
24347  # Call helper function which possibly converts this using DOS-style short mode.
24348  # If so, the updated path is stored in $new_path.
24349
24350  input_path="$new_path"
24351  # Check if we need to convert this using DOS-style short mode. If the path
24352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24353  # take no chances and rewrite it.
24354  # Note: m4 eats our [], so we need to use [ and ] instead.
24355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24356  if test "x$has_forbidden_chars" != x; then
24357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24361      # Going to short mode and back again did indeed matter. Since short mode is
24362      # case insensitive, let's make it lowercase to improve readability.
24363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24364      # Now convert it back to Unix-style (cygpath)
24365      input_path=`$CYGPATH -u "$shortmode_path"`
24366      new_path="$input_path"
24367    fi
24368  fi
24369
24370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24371  if test "x$test_cygdrive_prefix" = x; then
24372    # As a simple fix, exclude /usr/bin since it's not a real path.
24373    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24375      # a path prefixed by /cygdrive for fixpath to work.
24376      new_path="$CYGWIN_ROOT_PATH$input_path"
24377    fi
24378  fi
24379
24380
24381  if test "x$path" != "x$new_path"; then
24382    BOOT_JDK="$new_path"
24383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24384$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24385  fi
24386
24387    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24388
24389  path="$BOOT_JDK"
24390  has_colon=`$ECHO $path | $GREP ^.:`
24391  new_path="$path"
24392  if test "x$has_colon" = x; then
24393    # Not in mixed or Windows style, start by that.
24394    new_path=`cmd //c echo $path`
24395  fi
24396
24397
24398  input_path="$new_path"
24399  # Check if we need to convert this using DOS-style short mode. If the path
24400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24401  # take no chances and rewrite it.
24402  # Note: m4 eats our [], so we need to use [ and ] instead.
24403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24404  if test "x$has_forbidden_chars" != x; then
24405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24407  fi
24408
24409
24410  windows_path="$new_path"
24411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24412    unix_path=`$CYGPATH -u "$windows_path"`
24413    new_path="$unix_path"
24414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24416    new_path="$unix_path"
24417  fi
24418
24419  if test "x$path" != "x$new_path"; then
24420    BOOT_JDK="$new_path"
24421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24422$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24423  fi
24424
24425  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24426  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24427
24428    else
24429      # We're on a unix platform. Hooray! :)
24430      path="$BOOT_JDK"
24431      has_space=`$ECHO "$path" | $GREP " "`
24432      if test "x$has_space" != x; then
24433        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24434$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24435        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24436      fi
24437
24438      # Use eval to expand a potential ~
24439      eval path="$path"
24440      if test ! -f "$path" && test ! -d "$path"; then
24441        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24442      fi
24443
24444      if test -d "$path"; then
24445        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24446      else
24447        dir="`$DIRNAME "$path"`"
24448        base="`$BASENAME "$path"`"
24449        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24450      fi
24451    fi
24452  fi
24453
24454            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24455$as_echo_n "checking for Boot JDK... " >&6; }
24456            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24457$as_echo "$BOOT_JDK" >&6; }
24458            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24459$as_echo_n "checking Boot JDK version... " >&6; }
24460            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24461            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24462$as_echo "$BOOT_JDK_VERSION" >&6; }
24463          fi # end check jdk version
24464        fi # end check javac
24465      fi # end check java
24466    fi # end check boot jdk found
24467  fi
24468
24469  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24470    # Having specified an argument which is incorrect will produce an instant failure;
24471    # we should not go on looking
24472    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24473  fi
24474
24475  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24476
24477  if test "x$BOOT_JDK_FOUND" = xno; then
24478    # Now execute the test
24479
24480  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24481    # First check at user selected default
24482
24483  if test "x$BOOT_JDK_FOUND" = xno; then
24484    # Now execute the test
24485
24486  if test -x /usr/libexec/java_home; then
24487    BOOT_JDK=`/usr/libexec/java_home `
24488    BOOT_JDK_FOUND=maybe
24489    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24490$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24491  fi
24492
24493
24494    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24495    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24496      # Do we have a bin/java?
24497      if test ! -x "$BOOT_JDK/bin/java"; then
24498        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24500        BOOT_JDK_FOUND=no
24501      else
24502        # Do we have a bin/javac?
24503        if test ! -x "$BOOT_JDK/bin/javac"; then
24504          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24506          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24507$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24508          BOOT_JDK_FOUND=no
24509        else
24510          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24511          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24512
24513          # Extra M4 quote needed to protect [] in grep expression.
24514          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24515          if test "x$FOUND_CORRECT_VERSION" = x; then
24516            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24518            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24519$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24520            BOOT_JDK_FOUND=no
24521          else
24522            # We're done! :-)
24523            BOOT_JDK_FOUND=yes
24524
24525  # Only process if variable expands to non-empty
24526
24527  if test "x$BOOT_JDK" != x; then
24528    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24529
24530  # Input might be given as Windows format, start by converting to
24531  # unix format.
24532  path="$BOOT_JDK"
24533  new_path=`$CYGPATH -u "$path"`
24534
24535  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24536  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24537  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24538  # "foo.exe" is OK but "foo" is an error.
24539  #
24540  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24541  # It is also a way to make sure we got the proper file name for the real test later on.
24542  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24543  if test "x$test_shortpath" = x; then
24544    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24545$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24546    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24547  fi
24548
24549  # Call helper function which possibly converts this using DOS-style short mode.
24550  # If so, the updated path is stored in $new_path.
24551
24552  input_path="$new_path"
24553  # Check if we need to convert this using DOS-style short mode. If the path
24554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24555  # take no chances and rewrite it.
24556  # Note: m4 eats our [], so we need to use [ and ] instead.
24557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24558  if test "x$has_forbidden_chars" != x; then
24559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24560    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24561    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24562    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24563      # Going to short mode and back again did indeed matter. Since short mode is
24564      # case insensitive, let's make it lowercase to improve readability.
24565      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24566      # Now convert it back to Unix-style (cygpath)
24567      input_path=`$CYGPATH -u "$shortmode_path"`
24568      new_path="$input_path"
24569    fi
24570  fi
24571
24572  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24573  if test "x$test_cygdrive_prefix" = x; then
24574    # As a simple fix, exclude /usr/bin since it's not a real path.
24575    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24576      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24577      # a path prefixed by /cygdrive for fixpath to work.
24578      new_path="$CYGWIN_ROOT_PATH$input_path"
24579    fi
24580  fi
24581
24582
24583  if test "x$path" != "x$new_path"; then
24584    BOOT_JDK="$new_path"
24585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24586$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24587  fi
24588
24589    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24590
24591  path="$BOOT_JDK"
24592  has_colon=`$ECHO $path | $GREP ^.:`
24593  new_path="$path"
24594  if test "x$has_colon" = x; then
24595    # Not in mixed or Windows style, start by that.
24596    new_path=`cmd //c echo $path`
24597  fi
24598
24599
24600  input_path="$new_path"
24601  # Check if we need to convert this using DOS-style short mode. If the path
24602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24603  # take no chances and rewrite it.
24604  # Note: m4 eats our [], so we need to use [ and ] instead.
24605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24606  if test "x$has_forbidden_chars" != x; then
24607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24608    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24609  fi
24610
24611
24612  windows_path="$new_path"
24613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24614    unix_path=`$CYGPATH -u "$windows_path"`
24615    new_path="$unix_path"
24616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24618    new_path="$unix_path"
24619  fi
24620
24621  if test "x$path" != "x$new_path"; then
24622    BOOT_JDK="$new_path"
24623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24624$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24625  fi
24626
24627  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24628  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24629
24630    else
24631      # We're on a unix platform. Hooray! :)
24632      path="$BOOT_JDK"
24633      has_space=`$ECHO "$path" | $GREP " "`
24634      if test "x$has_space" != x; then
24635        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24636$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24637        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24638      fi
24639
24640      # Use eval to expand a potential ~
24641      eval path="$path"
24642      if test ! -f "$path" && test ! -d "$path"; then
24643        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24644      fi
24645
24646      if test -d "$path"; then
24647        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24648      else
24649        dir="`$DIRNAME "$path"`"
24650        base="`$BASENAME "$path"`"
24651        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24652      fi
24653    fi
24654  fi
24655
24656            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24657$as_echo_n "checking for Boot JDK... " >&6; }
24658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24659$as_echo "$BOOT_JDK" >&6; }
24660            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24661$as_echo_n "checking Boot JDK version... " >&6; }
24662            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24663            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24664$as_echo "$BOOT_JDK_VERSION" >&6; }
24665          fi # end check jdk version
24666        fi # end check javac
24667      fi # end check java
24668    fi # end check boot jdk found
24669  fi
24670
24671    # If that did not work out (e.g. too old), try explicit versions instead
24672
24673  if test "x$BOOT_JDK_FOUND" = xno; then
24674    # Now execute the test
24675
24676  if test -x /usr/libexec/java_home; then
24677    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24678    BOOT_JDK_FOUND=maybe
24679    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24680$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24681  fi
24682
24683
24684    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24685    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24686      # Do we have a bin/java?
24687      if test ! -x "$BOOT_JDK/bin/java"; then
24688        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24690        BOOT_JDK_FOUND=no
24691      else
24692        # Do we have a bin/javac?
24693        if test ! -x "$BOOT_JDK/bin/javac"; then
24694          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24695$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24696          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24697$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24698          BOOT_JDK_FOUND=no
24699        else
24700          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24701          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24702
24703          # Extra M4 quote needed to protect [] in grep expression.
24704          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24705          if test "x$FOUND_CORRECT_VERSION" = x; then
24706            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24707$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24708            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24709$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24710            BOOT_JDK_FOUND=no
24711          else
24712            # We're done! :-)
24713            BOOT_JDK_FOUND=yes
24714
24715  # Only process if variable expands to non-empty
24716
24717  if test "x$BOOT_JDK" != x; then
24718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24719
24720  # Input might be given as Windows format, start by converting to
24721  # unix format.
24722  path="$BOOT_JDK"
24723  new_path=`$CYGPATH -u "$path"`
24724
24725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24728  # "foo.exe" is OK but "foo" is an error.
24729  #
24730  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24731  # It is also a way to make sure we got the proper file name for the real test later on.
24732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24733  if test "x$test_shortpath" = x; then
24734    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24735$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24736    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24737  fi
24738
24739  # Call helper function which possibly converts this using DOS-style short mode.
24740  # If so, the updated path is stored in $new_path.
24741
24742  input_path="$new_path"
24743  # Check if we need to convert this using DOS-style short mode. If the path
24744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24745  # take no chances and rewrite it.
24746  # Note: m4 eats our [], so we need to use [ and ] instead.
24747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24748  if test "x$has_forbidden_chars" != x; then
24749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24750    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24751    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24752    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24753      # Going to short mode and back again did indeed matter. Since short mode is
24754      # case insensitive, let's make it lowercase to improve readability.
24755      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24756      # Now convert it back to Unix-style (cygpath)
24757      input_path=`$CYGPATH -u "$shortmode_path"`
24758      new_path="$input_path"
24759    fi
24760  fi
24761
24762  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24763  if test "x$test_cygdrive_prefix" = x; then
24764    # As a simple fix, exclude /usr/bin since it's not a real path.
24765    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24766      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24767      # a path prefixed by /cygdrive for fixpath to work.
24768      new_path="$CYGWIN_ROOT_PATH$input_path"
24769    fi
24770  fi
24771
24772
24773  if test "x$path" != "x$new_path"; then
24774    BOOT_JDK="$new_path"
24775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24776$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24777  fi
24778
24779    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24780
24781  path="$BOOT_JDK"
24782  has_colon=`$ECHO $path | $GREP ^.:`
24783  new_path="$path"
24784  if test "x$has_colon" = x; then
24785    # Not in mixed or Windows style, start by that.
24786    new_path=`cmd //c echo $path`
24787  fi
24788
24789
24790  input_path="$new_path"
24791  # Check if we need to convert this using DOS-style short mode. If the path
24792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24793  # take no chances and rewrite it.
24794  # Note: m4 eats our [], so we need to use [ and ] instead.
24795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24796  if test "x$has_forbidden_chars" != x; then
24797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24798    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24799  fi
24800
24801
24802  windows_path="$new_path"
24803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24804    unix_path=`$CYGPATH -u "$windows_path"`
24805    new_path="$unix_path"
24806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24808    new_path="$unix_path"
24809  fi
24810
24811  if test "x$path" != "x$new_path"; then
24812    BOOT_JDK="$new_path"
24813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24814$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24815  fi
24816
24817  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24818  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24819
24820    else
24821      # We're on a unix platform. Hooray! :)
24822      path="$BOOT_JDK"
24823      has_space=`$ECHO "$path" | $GREP " "`
24824      if test "x$has_space" != x; then
24825        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24826$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24827        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24828      fi
24829
24830      # Use eval to expand a potential ~
24831      eval path="$path"
24832      if test ! -f "$path" && test ! -d "$path"; then
24833        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24834      fi
24835
24836      if test -d "$path"; then
24837        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24838      else
24839        dir="`$DIRNAME "$path"`"
24840        base="`$BASENAME "$path"`"
24841        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24842      fi
24843    fi
24844  fi
24845
24846            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24847$as_echo_n "checking for Boot JDK... " >&6; }
24848            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24849$as_echo "$BOOT_JDK" >&6; }
24850            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24851$as_echo_n "checking Boot JDK version... " >&6; }
24852            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24853            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24854$as_echo "$BOOT_JDK_VERSION" >&6; }
24855          fi # end check jdk version
24856        fi # end check javac
24857      fi # end check java
24858    fi # end check boot jdk found
24859  fi
24860
24861
24862  if test "x$BOOT_JDK_FOUND" = xno; then
24863    # Now execute the test
24864
24865  if test -x /usr/libexec/java_home; then
24866    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24867    BOOT_JDK_FOUND=maybe
24868    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24869$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24870  fi
24871
24872
24873    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24874    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24875      # Do we have a bin/java?
24876      if test ! -x "$BOOT_JDK/bin/java"; then
24877        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24879        BOOT_JDK_FOUND=no
24880      else
24881        # Do we have a bin/javac?
24882        if test ! -x "$BOOT_JDK/bin/javac"; then
24883          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24885          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24886$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24887          BOOT_JDK_FOUND=no
24888        else
24889          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24890          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24891
24892          # Extra M4 quote needed to protect [] in grep expression.
24893          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24894          if test "x$FOUND_CORRECT_VERSION" = x; then
24895            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24896$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24897            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24898$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24899            BOOT_JDK_FOUND=no
24900          else
24901            # We're done! :-)
24902            BOOT_JDK_FOUND=yes
24903
24904  # Only process if variable expands to non-empty
24905
24906  if test "x$BOOT_JDK" != x; then
24907    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24908
24909  # Input might be given as Windows format, start by converting to
24910  # unix format.
24911  path="$BOOT_JDK"
24912  new_path=`$CYGPATH -u "$path"`
24913
24914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24917  # "foo.exe" is OK but "foo" is an error.
24918  #
24919  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24920  # It is also a way to make sure we got the proper file name for the real test later on.
24921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24922  if test "x$test_shortpath" = x; then
24923    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24924$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24925    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24926  fi
24927
24928  # Call helper function which possibly converts this using DOS-style short mode.
24929  # If so, the updated path is stored in $new_path.
24930
24931  input_path="$new_path"
24932  # Check if we need to convert this using DOS-style short mode. If the path
24933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24934  # take no chances and rewrite it.
24935  # Note: m4 eats our [], so we need to use [ and ] instead.
24936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24937  if test "x$has_forbidden_chars" != x; then
24938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24942      # Going to short mode and back again did indeed matter. Since short mode is
24943      # case insensitive, let's make it lowercase to improve readability.
24944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24945      # Now convert it back to Unix-style (cygpath)
24946      input_path=`$CYGPATH -u "$shortmode_path"`
24947      new_path="$input_path"
24948    fi
24949  fi
24950
24951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24952  if test "x$test_cygdrive_prefix" = x; then
24953    # As a simple fix, exclude /usr/bin since it's not a real path.
24954    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24956      # a path prefixed by /cygdrive for fixpath to work.
24957      new_path="$CYGWIN_ROOT_PATH$input_path"
24958    fi
24959  fi
24960
24961
24962  if test "x$path" != "x$new_path"; then
24963    BOOT_JDK="$new_path"
24964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24965$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24966  fi
24967
24968    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24969
24970  path="$BOOT_JDK"
24971  has_colon=`$ECHO $path | $GREP ^.:`
24972  new_path="$path"
24973  if test "x$has_colon" = x; then
24974    # Not in mixed or Windows style, start by that.
24975    new_path=`cmd //c echo $path`
24976  fi
24977
24978
24979  input_path="$new_path"
24980  # Check if we need to convert this using DOS-style short mode. If the path
24981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24982  # take no chances and rewrite it.
24983  # Note: m4 eats our [], so we need to use [ and ] instead.
24984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24985  if test "x$has_forbidden_chars" != x; then
24986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24988  fi
24989
24990
24991  windows_path="$new_path"
24992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24993    unix_path=`$CYGPATH -u "$windows_path"`
24994    new_path="$unix_path"
24995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24997    new_path="$unix_path"
24998  fi
24999
25000  if test "x$path" != "x$new_path"; then
25001    BOOT_JDK="$new_path"
25002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25003$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25004  fi
25005
25006  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25007  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25008
25009    else
25010      # We're on a unix platform. Hooray! :)
25011      path="$BOOT_JDK"
25012      has_space=`$ECHO "$path" | $GREP " "`
25013      if test "x$has_space" != x; then
25014        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25015$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25016        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25017      fi
25018
25019      # Use eval to expand a potential ~
25020      eval path="$path"
25021      if test ! -f "$path" && test ! -d "$path"; then
25022        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25023      fi
25024
25025      if test -d "$path"; then
25026        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25027      else
25028        dir="`$DIRNAME "$path"`"
25029        base="`$BASENAME "$path"`"
25030        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25031      fi
25032    fi
25033  fi
25034
25035            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25036$as_echo_n "checking for Boot JDK... " >&6; }
25037            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25038$as_echo "$BOOT_JDK" >&6; }
25039            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25040$as_echo_n "checking Boot JDK version... " >&6; }
25041            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25042            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25043$as_echo "$BOOT_JDK_VERSION" >&6; }
25044          fi # end check jdk version
25045        fi # end check javac
25046      fi # end check java
25047    fi # end check boot jdk found
25048  fi
25049
25050
25051  if test "x$BOOT_JDK_FOUND" = xno; then
25052    # Now execute the test
25053
25054  if test -x /usr/libexec/java_home; then
25055    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25056    BOOT_JDK_FOUND=maybe
25057    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25058$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25059  fi
25060
25061
25062    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25063    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25064      # Do we have a bin/java?
25065      if test ! -x "$BOOT_JDK/bin/java"; then
25066        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25067$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25068        BOOT_JDK_FOUND=no
25069      else
25070        # Do we have a bin/javac?
25071        if test ! -x "$BOOT_JDK/bin/javac"; then
25072          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25073$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25074          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25075$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25076          BOOT_JDK_FOUND=no
25077        else
25078          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25079          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25080
25081          # Extra M4 quote needed to protect [] in grep expression.
25082          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25083          if test "x$FOUND_CORRECT_VERSION" = x; then
25084            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25085$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25086            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25087$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25088            BOOT_JDK_FOUND=no
25089          else
25090            # We're done! :-)
25091            BOOT_JDK_FOUND=yes
25092
25093  # Only process if variable expands to non-empty
25094
25095  if test "x$BOOT_JDK" != x; then
25096    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25097
25098  # Input might be given as Windows format, start by converting to
25099  # unix format.
25100  path="$BOOT_JDK"
25101  new_path=`$CYGPATH -u "$path"`
25102
25103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25106  # "foo.exe" is OK but "foo" is an error.
25107  #
25108  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25109  # It is also a way to make sure we got the proper file name for the real test later on.
25110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25111  if test "x$test_shortpath" = x; then
25112    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25113$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25114    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25115  fi
25116
25117  # Call helper function which possibly converts this using DOS-style short mode.
25118  # If so, the updated path is stored in $new_path.
25119
25120  input_path="$new_path"
25121  # Check if we need to convert this using DOS-style short mode. If the path
25122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25123  # take no chances and rewrite it.
25124  # Note: m4 eats our [], so we need to use [ and ] instead.
25125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25126  if test "x$has_forbidden_chars" != x; then
25127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25131      # Going to short mode and back again did indeed matter. Since short mode is
25132      # case insensitive, let's make it lowercase to improve readability.
25133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25134      # Now convert it back to Unix-style (cygpath)
25135      input_path=`$CYGPATH -u "$shortmode_path"`
25136      new_path="$input_path"
25137    fi
25138  fi
25139
25140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25141  if test "x$test_cygdrive_prefix" = x; then
25142    # As a simple fix, exclude /usr/bin since it's not a real path.
25143    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25145      # a path prefixed by /cygdrive for fixpath to work.
25146      new_path="$CYGWIN_ROOT_PATH$input_path"
25147    fi
25148  fi
25149
25150
25151  if test "x$path" != "x$new_path"; then
25152    BOOT_JDK="$new_path"
25153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25154$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25155  fi
25156
25157    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25158
25159  path="$BOOT_JDK"
25160  has_colon=`$ECHO $path | $GREP ^.:`
25161  new_path="$path"
25162  if test "x$has_colon" = x; then
25163    # Not in mixed or Windows style, start by that.
25164    new_path=`cmd //c echo $path`
25165  fi
25166
25167
25168  input_path="$new_path"
25169  # Check if we need to convert this using DOS-style short mode. If the path
25170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25171  # take no chances and rewrite it.
25172  # Note: m4 eats our [], so we need to use [ and ] instead.
25173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25174  if test "x$has_forbidden_chars" != x; then
25175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25177  fi
25178
25179
25180  windows_path="$new_path"
25181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25182    unix_path=`$CYGPATH -u "$windows_path"`
25183    new_path="$unix_path"
25184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25186    new_path="$unix_path"
25187  fi
25188
25189  if test "x$path" != "x$new_path"; then
25190    BOOT_JDK="$new_path"
25191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25192$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25193  fi
25194
25195  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25196  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25197
25198    else
25199      # We're on a unix platform. Hooray! :)
25200      path="$BOOT_JDK"
25201      has_space=`$ECHO "$path" | $GREP " "`
25202      if test "x$has_space" != x; then
25203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25204$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25205        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25206      fi
25207
25208      # Use eval to expand a potential ~
25209      eval path="$path"
25210      if test ! -f "$path" && test ! -d "$path"; then
25211        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25212      fi
25213
25214      if test -d "$path"; then
25215        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25216      else
25217        dir="`$DIRNAME "$path"`"
25218        base="`$BASENAME "$path"`"
25219        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25220      fi
25221    fi
25222  fi
25223
25224            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25225$as_echo_n "checking for Boot JDK... " >&6; }
25226            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25227$as_echo "$BOOT_JDK" >&6; }
25228            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25229$as_echo_n "checking Boot JDK version... " >&6; }
25230            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25231            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25232$as_echo "$BOOT_JDK_VERSION" >&6; }
25233          fi # end check jdk version
25234        fi # end check javac
25235      fi # end check java
25236    fi # end check boot jdk found
25237  fi
25238
25239  fi
25240
25241
25242    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25243    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25244      # Do we have a bin/java?
25245      if test ! -x "$BOOT_JDK/bin/java"; then
25246        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25248        BOOT_JDK_FOUND=no
25249      else
25250        # Do we have a bin/javac?
25251        if test ! -x "$BOOT_JDK/bin/javac"; then
25252          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25253$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25254          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25255$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25256          BOOT_JDK_FOUND=no
25257        else
25258          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25259          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25260
25261          # Extra M4 quote needed to protect [] in grep expression.
25262          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25263          if test "x$FOUND_CORRECT_VERSION" = x; then
25264            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25266            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25267$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25268            BOOT_JDK_FOUND=no
25269          else
25270            # We're done! :-)
25271            BOOT_JDK_FOUND=yes
25272
25273  # Only process if variable expands to non-empty
25274
25275  if test "x$BOOT_JDK" != x; then
25276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25277
25278  # Input might be given as Windows format, start by converting to
25279  # unix format.
25280  path="$BOOT_JDK"
25281  new_path=`$CYGPATH -u "$path"`
25282
25283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25286  # "foo.exe" is OK but "foo" is an error.
25287  #
25288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25289  # It is also a way to make sure we got the proper file name for the real test later on.
25290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25291  if test "x$test_shortpath" = x; then
25292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25293$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25294    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25295  fi
25296
25297  # Call helper function which possibly converts this using DOS-style short mode.
25298  # If so, the updated path is stored in $new_path.
25299
25300  input_path="$new_path"
25301  # Check if we need to convert this using DOS-style short mode. If the path
25302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25303  # take no chances and rewrite it.
25304  # Note: m4 eats our [], so we need to use [ and ] instead.
25305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25306  if test "x$has_forbidden_chars" != x; then
25307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25311      # Going to short mode and back again did indeed matter. Since short mode is
25312      # case insensitive, let's make it lowercase to improve readability.
25313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25314      # Now convert it back to Unix-style (cygpath)
25315      input_path=`$CYGPATH -u "$shortmode_path"`
25316      new_path="$input_path"
25317    fi
25318  fi
25319
25320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25321  if test "x$test_cygdrive_prefix" = x; then
25322    # As a simple fix, exclude /usr/bin since it's not a real path.
25323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25325      # a path prefixed by /cygdrive for fixpath to work.
25326      new_path="$CYGWIN_ROOT_PATH$input_path"
25327    fi
25328  fi
25329
25330
25331  if test "x$path" != "x$new_path"; then
25332    BOOT_JDK="$new_path"
25333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25334$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25335  fi
25336
25337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25338
25339  path="$BOOT_JDK"
25340  has_colon=`$ECHO $path | $GREP ^.:`
25341  new_path="$path"
25342  if test "x$has_colon" = x; then
25343    # Not in mixed or Windows style, start by that.
25344    new_path=`cmd //c echo $path`
25345  fi
25346
25347
25348  input_path="$new_path"
25349  # Check if we need to convert this using DOS-style short mode. If the path
25350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25351  # take no chances and rewrite it.
25352  # Note: m4 eats our [], so we need to use [ and ] instead.
25353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25354  if test "x$has_forbidden_chars" != x; then
25355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25357  fi
25358
25359
25360  windows_path="$new_path"
25361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25362    unix_path=`$CYGPATH -u "$windows_path"`
25363    new_path="$unix_path"
25364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25366    new_path="$unix_path"
25367  fi
25368
25369  if test "x$path" != "x$new_path"; then
25370    BOOT_JDK="$new_path"
25371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25372$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25373  fi
25374
25375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25377
25378    else
25379      # We're on a unix platform. Hooray! :)
25380      path="$BOOT_JDK"
25381      has_space=`$ECHO "$path" | $GREP " "`
25382      if test "x$has_space" != x; then
25383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25385        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25386      fi
25387
25388      # Use eval to expand a potential ~
25389      eval path="$path"
25390      if test ! -f "$path" && test ! -d "$path"; then
25391        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25392      fi
25393
25394      if test -d "$path"; then
25395        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25396      else
25397        dir="`$DIRNAME "$path"`"
25398        base="`$BASENAME "$path"`"
25399        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25400      fi
25401    fi
25402  fi
25403
25404            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25405$as_echo_n "checking for Boot JDK... " >&6; }
25406            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25407$as_echo "$BOOT_JDK" >&6; }
25408            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25409$as_echo_n "checking Boot JDK version... " >&6; }
25410            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25411            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25412$as_echo "$BOOT_JDK_VERSION" >&6; }
25413          fi # end check jdk version
25414        fi # end check javac
25415      fi # end check java
25416    fi # end check boot jdk found
25417  fi
25418
25419
25420  # Test: Is $JAVA_HOME set?
25421
25422  if test "x$BOOT_JDK_FOUND" = xno; then
25423    # Now execute the test
25424
25425  if test "x$JAVA_HOME" != x; then
25426    JAVA_HOME_PROCESSED="$JAVA_HOME"
25427
25428  # Only process if variable expands to non-empty
25429
25430  if test "x$JAVA_HOME_PROCESSED" != x; then
25431    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25432
25433  # Input might be given as Windows format, start by converting to
25434  # unix format.
25435  path="$JAVA_HOME_PROCESSED"
25436  new_path=`$CYGPATH -u "$path"`
25437
25438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25441  # "foo.exe" is OK but "foo" is an error.
25442  #
25443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25444  # It is also a way to make sure we got the proper file name for the real test later on.
25445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25446  if test "x$test_shortpath" = x; then
25447    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25448$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25449    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25450  fi
25451
25452  # Call helper function which possibly converts this using DOS-style short mode.
25453  # If so, the updated path is stored in $new_path.
25454
25455  input_path="$new_path"
25456  # Check if we need to convert this using DOS-style short mode. If the path
25457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25458  # take no chances and rewrite it.
25459  # Note: m4 eats our [], so we need to use [ and ] instead.
25460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25461  if test "x$has_forbidden_chars" != x; then
25462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25466      # Going to short mode and back again did indeed matter. Since short mode is
25467      # case insensitive, let's make it lowercase to improve readability.
25468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25469      # Now convert it back to Unix-style (cygpath)
25470      input_path=`$CYGPATH -u "$shortmode_path"`
25471      new_path="$input_path"
25472    fi
25473  fi
25474
25475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25476  if test "x$test_cygdrive_prefix" = x; then
25477    # As a simple fix, exclude /usr/bin since it's not a real path.
25478    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25480      # a path prefixed by /cygdrive for fixpath to work.
25481      new_path="$CYGWIN_ROOT_PATH$input_path"
25482    fi
25483  fi
25484
25485
25486  if test "x$path" != "x$new_path"; then
25487    JAVA_HOME_PROCESSED="$new_path"
25488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25489$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25490  fi
25491
25492    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25493
25494  path="$JAVA_HOME_PROCESSED"
25495  has_colon=`$ECHO $path | $GREP ^.:`
25496  new_path="$path"
25497  if test "x$has_colon" = x; then
25498    # Not in mixed or Windows style, start by that.
25499    new_path=`cmd //c echo $path`
25500  fi
25501
25502
25503  input_path="$new_path"
25504  # Check if we need to convert this using DOS-style short mode. If the path
25505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25506  # take no chances and rewrite it.
25507  # Note: m4 eats our [], so we need to use [ and ] instead.
25508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25509  if test "x$has_forbidden_chars" != x; then
25510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25512  fi
25513
25514
25515  windows_path="$new_path"
25516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25517    unix_path=`$CYGPATH -u "$windows_path"`
25518    new_path="$unix_path"
25519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25521    new_path="$unix_path"
25522  fi
25523
25524  if test "x$path" != "x$new_path"; then
25525    JAVA_HOME_PROCESSED="$new_path"
25526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25527$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25528  fi
25529
25530  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25531  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25532
25533    else
25534      # We're on a unix platform. Hooray! :)
25535      path="$JAVA_HOME_PROCESSED"
25536      has_space=`$ECHO "$path" | $GREP " "`
25537      if test "x$has_space" != x; then
25538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25539$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25540        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25541      fi
25542
25543      # Use eval to expand a potential ~
25544      eval path="$path"
25545      if test ! -f "$path" && test ! -d "$path"; then
25546        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25547      fi
25548
25549      if test -d "$path"; then
25550        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25551      else
25552        dir="`$DIRNAME "$path"`"
25553        base="`$BASENAME "$path"`"
25554        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25555      fi
25556    fi
25557  fi
25558
25559    if test ! -d "$JAVA_HOME_PROCESSED"; then
25560      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25561$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25562    else
25563      # Aha, the user has set a JAVA_HOME
25564      # let us use that as the Boot JDK.
25565      BOOT_JDK="$JAVA_HOME_PROCESSED"
25566      BOOT_JDK_FOUND=maybe
25567      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25568$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25569    fi
25570  fi
25571
25572
25573    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25574    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25575      # Do we have a bin/java?
25576      if test ! -x "$BOOT_JDK/bin/java"; then
25577        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25578$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25579        BOOT_JDK_FOUND=no
25580      else
25581        # Do we have a bin/javac?
25582        if test ! -x "$BOOT_JDK/bin/javac"; then
25583          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25584$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25585          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25586$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25587          BOOT_JDK_FOUND=no
25588        else
25589          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25590          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25591
25592          # Extra M4 quote needed to protect [] in grep expression.
25593          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25594          if test "x$FOUND_CORRECT_VERSION" = x; then
25595            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25597            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25598$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25599            BOOT_JDK_FOUND=no
25600          else
25601            # We're done! :-)
25602            BOOT_JDK_FOUND=yes
25603
25604  # Only process if variable expands to non-empty
25605
25606  if test "x$BOOT_JDK" != x; then
25607    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25608
25609  # Input might be given as Windows format, start by converting to
25610  # unix format.
25611  path="$BOOT_JDK"
25612  new_path=`$CYGPATH -u "$path"`
25613
25614  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25615  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25616  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25617  # "foo.exe" is OK but "foo" is an error.
25618  #
25619  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25620  # It is also a way to make sure we got the proper file name for the real test later on.
25621  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25622  if test "x$test_shortpath" = x; then
25623    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25624$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25625    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25626  fi
25627
25628  # Call helper function which possibly converts this using DOS-style short mode.
25629  # If so, the updated path is stored in $new_path.
25630
25631  input_path="$new_path"
25632  # Check if we need to convert this using DOS-style short mode. If the path
25633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25634  # take no chances and rewrite it.
25635  # Note: m4 eats our [], so we need to use [ and ] instead.
25636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25637  if test "x$has_forbidden_chars" != x; then
25638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25639    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25640    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25641    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25642      # Going to short mode and back again did indeed matter. Since short mode is
25643      # case insensitive, let's make it lowercase to improve readability.
25644      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25645      # Now convert it back to Unix-style (cygpath)
25646      input_path=`$CYGPATH -u "$shortmode_path"`
25647      new_path="$input_path"
25648    fi
25649  fi
25650
25651  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25652  if test "x$test_cygdrive_prefix" = x; then
25653    # As a simple fix, exclude /usr/bin since it's not a real path.
25654    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25655      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25656      # a path prefixed by /cygdrive for fixpath to work.
25657      new_path="$CYGWIN_ROOT_PATH$input_path"
25658    fi
25659  fi
25660
25661
25662  if test "x$path" != "x$new_path"; then
25663    BOOT_JDK="$new_path"
25664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25665$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25666  fi
25667
25668    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25669
25670  path="$BOOT_JDK"
25671  has_colon=`$ECHO $path | $GREP ^.:`
25672  new_path="$path"
25673  if test "x$has_colon" = x; then
25674    # Not in mixed or Windows style, start by that.
25675    new_path=`cmd //c echo $path`
25676  fi
25677
25678
25679  input_path="$new_path"
25680  # Check if we need to convert this using DOS-style short mode. If the path
25681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25682  # take no chances and rewrite it.
25683  # Note: m4 eats our [], so we need to use [ and ] instead.
25684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25685  if test "x$has_forbidden_chars" != x; then
25686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25688  fi
25689
25690
25691  windows_path="$new_path"
25692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25693    unix_path=`$CYGPATH -u "$windows_path"`
25694    new_path="$unix_path"
25695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25697    new_path="$unix_path"
25698  fi
25699
25700  if test "x$path" != "x$new_path"; then
25701    BOOT_JDK="$new_path"
25702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25703$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25704  fi
25705
25706  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25707  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25708
25709    else
25710      # We're on a unix platform. Hooray! :)
25711      path="$BOOT_JDK"
25712      has_space=`$ECHO "$path" | $GREP " "`
25713      if test "x$has_space" != x; then
25714        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25715$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25716        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25717      fi
25718
25719      # Use eval to expand a potential ~
25720      eval path="$path"
25721      if test ! -f "$path" && test ! -d "$path"; then
25722        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25723      fi
25724
25725      if test -d "$path"; then
25726        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25727      else
25728        dir="`$DIRNAME "$path"`"
25729        base="`$BASENAME "$path"`"
25730        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25731      fi
25732    fi
25733  fi
25734
25735            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25736$as_echo_n "checking for Boot JDK... " >&6; }
25737            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25738$as_echo "$BOOT_JDK" >&6; }
25739            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25740$as_echo_n "checking Boot JDK version... " >&6; }
25741            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25742            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25743$as_echo "$BOOT_JDK_VERSION" >&6; }
25744          fi # end check jdk version
25745        fi # end check javac
25746      fi # end check java
25747    fi # end check boot jdk found
25748  fi
25749
25750
25751  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25752
25753  if test "x$BOOT_JDK_FOUND" = xno; then
25754    # Now execute the test
25755
25756  # Extract the first word of "javac", so it can be a program name with args.
25757set dummy javac; ac_word=$2
25758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25759$as_echo_n "checking for $ac_word... " >&6; }
25760if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25761  $as_echo_n "(cached) " >&6
25762else
25763  case $JAVAC_CHECK in
25764  [\\/]* | ?:[\\/]*)
25765  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25766  ;;
25767  *)
25768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25769for as_dir in $PATH
25770do
25771  IFS=$as_save_IFS
25772  test -z "$as_dir" && as_dir=.
25773    for ac_exec_ext in '' $ac_executable_extensions; do
25774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25775    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25777    break 2
25778  fi
25779done
25780  done
25781IFS=$as_save_IFS
25782
25783  ;;
25784esac
25785fi
25786JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25787if test -n "$JAVAC_CHECK"; then
25788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25789$as_echo "$JAVAC_CHECK" >&6; }
25790else
25791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25792$as_echo "no" >&6; }
25793fi
25794
25795
25796  # Extract the first word of "java", so it can be a program name with args.
25797set dummy java; ac_word=$2
25798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25799$as_echo_n "checking for $ac_word... " >&6; }
25800if ${ac_cv_path_JAVA_CHECK+:} false; then :
25801  $as_echo_n "(cached) " >&6
25802else
25803  case $JAVA_CHECK in
25804  [\\/]* | ?:[\\/]*)
25805  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25806  ;;
25807  *)
25808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25809for as_dir in $PATH
25810do
25811  IFS=$as_save_IFS
25812  test -z "$as_dir" && as_dir=.
25813    for ac_exec_ext in '' $ac_executable_extensions; do
25814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25815    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25817    break 2
25818  fi
25819done
25820  done
25821IFS=$as_save_IFS
25822
25823  ;;
25824esac
25825fi
25826JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25827if test -n "$JAVA_CHECK"; then
25828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25829$as_echo "$JAVA_CHECK" >&6; }
25830else
25831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25832$as_echo "no" >&6; }
25833fi
25834
25835
25836  BINARY="$JAVAC_CHECK"
25837  if test "x$JAVAC_CHECK" = x; then
25838    BINARY="$JAVA_CHECK"
25839  fi
25840  if test "x$BINARY" != x; then
25841    # So there is a java(c) binary, it might be part of a JDK.
25842    # Lets find the JDK/JRE directory by following symbolic links.
25843    # Linux/GNU systems often have links from /usr/bin/java to
25844    # /etc/alternatives/java to the real JDK binary.
25845
25846  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25847    # Follow a chain of symbolic links. Use readlink
25848    # where it exists, else fall back to horribly
25849    # complicated shell code.
25850    if test "x$READLINK_TESTED" != yes; then
25851      # On MacOSX there is a readlink tool with a different
25852      # purpose than the GNU readlink tool. Check the found readlink.
25853      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25854      if test "x$ISGNU" = x; then
25855        # A readlink that we do not know how to use.
25856        # Are there other non-GNU readlinks out there?
25857        READLINK_TESTED=yes
25858        READLINK=
25859      fi
25860    fi
25861
25862    if test "x$READLINK" != x; then
25863      BINARY=`$READLINK -f $BINARY`
25864    else
25865      # Save the current directory for restoring afterwards
25866      STARTDIR=$PWD
25867      COUNTER=0
25868      sym_link_dir=`$DIRNAME $BINARY`
25869      sym_link_file=`$BASENAME $BINARY`
25870      cd $sym_link_dir
25871      # Use -P flag to resolve symlinks in directories.
25872      cd `$THEPWDCMD -P`
25873      sym_link_dir=`$THEPWDCMD -P`
25874      # Resolve file symlinks
25875      while test $COUNTER -lt 20; do
25876        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25877        if test "x$ISLINK" == x; then
25878          # This is not a symbolic link! We are done!
25879          break
25880        fi
25881        # Again resolve directory symlinks since the target of the just found
25882        # link could be in a different directory
25883        cd `$DIRNAME $ISLINK`
25884        sym_link_dir=`$THEPWDCMD -P`
25885        sym_link_file=`$BASENAME $ISLINK`
25886        let COUNTER=COUNTER+1
25887      done
25888      cd $STARTDIR
25889      BINARY=$sym_link_dir/$sym_link_file
25890    fi
25891  fi
25892
25893    BOOT_JDK=`dirname "$BINARY"`
25894    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25895    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25896      # Looks like we found ourselves an JDK
25897      BOOT_JDK_FOUND=maybe
25898      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25899$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25900    fi
25901  fi
25902
25903
25904    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25905    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25906      # Do we have a bin/java?
25907      if test ! -x "$BOOT_JDK/bin/java"; then
25908        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25910        BOOT_JDK_FOUND=no
25911      else
25912        # Do we have a bin/javac?
25913        if test ! -x "$BOOT_JDK/bin/javac"; then
25914          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25915$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25916          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25917$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25918          BOOT_JDK_FOUND=no
25919        else
25920          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25921          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25922
25923          # Extra M4 quote needed to protect [] in grep expression.
25924          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25925          if test "x$FOUND_CORRECT_VERSION" = x; then
25926            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25928            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25929$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25930            BOOT_JDK_FOUND=no
25931          else
25932            # We're done! :-)
25933            BOOT_JDK_FOUND=yes
25934
25935  # Only process if variable expands to non-empty
25936
25937  if test "x$BOOT_JDK" != x; then
25938    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25939
25940  # Input might be given as Windows format, start by converting to
25941  # unix format.
25942  path="$BOOT_JDK"
25943  new_path=`$CYGPATH -u "$path"`
25944
25945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25948  # "foo.exe" is OK but "foo" is an error.
25949  #
25950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25951  # It is also a way to make sure we got the proper file name for the real test later on.
25952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25953  if test "x$test_shortpath" = x; then
25954    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25955$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25956    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25957  fi
25958
25959  # Call helper function which possibly converts this using DOS-style short mode.
25960  # If so, the updated path is stored in $new_path.
25961
25962  input_path="$new_path"
25963  # Check if we need to convert this using DOS-style short mode. If the path
25964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25965  # take no chances and rewrite it.
25966  # Note: m4 eats our [], so we need to use [ and ] instead.
25967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25968  if test "x$has_forbidden_chars" != x; then
25969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25973      # Going to short mode and back again did indeed matter. Since short mode is
25974      # case insensitive, let's make it lowercase to improve readability.
25975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25976      # Now convert it back to Unix-style (cygpath)
25977      input_path=`$CYGPATH -u "$shortmode_path"`
25978      new_path="$input_path"
25979    fi
25980  fi
25981
25982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25983  if test "x$test_cygdrive_prefix" = x; then
25984    # As a simple fix, exclude /usr/bin since it's not a real path.
25985    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25987      # a path prefixed by /cygdrive for fixpath to work.
25988      new_path="$CYGWIN_ROOT_PATH$input_path"
25989    fi
25990  fi
25991
25992
25993  if test "x$path" != "x$new_path"; then
25994    BOOT_JDK="$new_path"
25995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25996$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25997  fi
25998
25999    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26000
26001  path="$BOOT_JDK"
26002  has_colon=`$ECHO $path | $GREP ^.:`
26003  new_path="$path"
26004  if test "x$has_colon" = x; then
26005    # Not in mixed or Windows style, start by that.
26006    new_path=`cmd //c echo $path`
26007  fi
26008
26009
26010  input_path="$new_path"
26011  # Check if we need to convert this using DOS-style short mode. If the path
26012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26013  # take no chances and rewrite it.
26014  # Note: m4 eats our [], so we need to use [ and ] instead.
26015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26016  if test "x$has_forbidden_chars" != x; then
26017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26019  fi
26020
26021
26022  windows_path="$new_path"
26023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26024    unix_path=`$CYGPATH -u "$windows_path"`
26025    new_path="$unix_path"
26026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26028    new_path="$unix_path"
26029  fi
26030
26031  if test "x$path" != "x$new_path"; then
26032    BOOT_JDK="$new_path"
26033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26034$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26035  fi
26036
26037  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26038  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26039
26040    else
26041      # We're on a unix platform. Hooray! :)
26042      path="$BOOT_JDK"
26043      has_space=`$ECHO "$path" | $GREP " "`
26044      if test "x$has_space" != x; then
26045        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26046$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26047        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26048      fi
26049
26050      # Use eval to expand a potential ~
26051      eval path="$path"
26052      if test ! -f "$path" && test ! -d "$path"; then
26053        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26054      fi
26055
26056      if test -d "$path"; then
26057        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26058      else
26059        dir="`$DIRNAME "$path"`"
26060        base="`$BASENAME "$path"`"
26061        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26062      fi
26063    fi
26064  fi
26065
26066            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26067$as_echo_n "checking for Boot JDK... " >&6; }
26068            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26069$as_echo "$BOOT_JDK" >&6; }
26070            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26071$as_echo_n "checking Boot JDK version... " >&6; }
26072            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26074$as_echo "$BOOT_JDK_VERSION" >&6; }
26075          fi # end check jdk version
26076        fi # end check javac
26077      fi # end check java
26078    fi # end check boot jdk found
26079  fi
26080
26081
26082  # Test: Is there a JDK installed in default, well-known locations?
26083
26084  if test "x$BOOT_JDK_FOUND" = xno; then
26085    # Now execute the test
26086
26087  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26088
26089  if test "x$BOOT_JDK_FOUND" = xno; then
26090    # Now execute the test
26091
26092  if test "x$ProgramW6432" != x; then
26093    VIRTUAL_DIR="$ProgramW6432/Java"
26094
26095  windows_path="$VIRTUAL_DIR"
26096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26097    unix_path=`$CYGPATH -u "$windows_path"`
26098    VIRTUAL_DIR="$unix_path"
26099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26101    VIRTUAL_DIR="$unix_path"
26102  fi
26103
26104
26105  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26106  BOOT_JDK_SUFFIX=""
26107  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26108  if test "x$ALL_JDKS_FOUND" != x; then
26109    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26110
26111  if test "x$BOOT_JDK_FOUND" = xno; then
26112    # Now execute the test
26113
26114        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26115        if test -d "$BOOT_JDK"; then
26116          BOOT_JDK_FOUND=maybe
26117          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26118$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26119        fi
26120
26121
26122    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26123    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26124      # Do we have a bin/java?
26125      if test ! -x "$BOOT_JDK/bin/java"; then
26126        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26127$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26128        BOOT_JDK_FOUND=no
26129      else
26130        # Do we have a bin/javac?
26131        if test ! -x "$BOOT_JDK/bin/javac"; then
26132          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26133$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26134          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26135$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26136          BOOT_JDK_FOUND=no
26137        else
26138          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26139          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26140
26141          # Extra M4 quote needed to protect [] in grep expression.
26142          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26143          if test "x$FOUND_CORRECT_VERSION" = x; then
26144            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26146            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26147$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26148            BOOT_JDK_FOUND=no
26149          else
26150            # We're done! :-)
26151            BOOT_JDK_FOUND=yes
26152
26153  # Only process if variable expands to non-empty
26154
26155  if test "x$BOOT_JDK" != x; then
26156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26157
26158  # Input might be given as Windows format, start by converting to
26159  # unix format.
26160  path="$BOOT_JDK"
26161  new_path=`$CYGPATH -u "$path"`
26162
26163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26166  # "foo.exe" is OK but "foo" is an error.
26167  #
26168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26169  # It is also a way to make sure we got the proper file name for the real test later on.
26170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26171  if test "x$test_shortpath" = x; then
26172    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26173$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26174    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26175  fi
26176
26177  # Call helper function which possibly converts this using DOS-style short mode.
26178  # If so, the updated path is stored in $new_path.
26179
26180  input_path="$new_path"
26181  # Check if we need to convert this using DOS-style short mode. If the path
26182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26183  # take no chances and rewrite it.
26184  # Note: m4 eats our [], so we need to use [ and ] instead.
26185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26186  if test "x$has_forbidden_chars" != x; then
26187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26191      # Going to short mode and back again did indeed matter. Since short mode is
26192      # case insensitive, let's make it lowercase to improve readability.
26193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26194      # Now convert it back to Unix-style (cygpath)
26195      input_path=`$CYGPATH -u "$shortmode_path"`
26196      new_path="$input_path"
26197    fi
26198  fi
26199
26200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26201  if test "x$test_cygdrive_prefix" = x; then
26202    # As a simple fix, exclude /usr/bin since it's not a real path.
26203    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26205      # a path prefixed by /cygdrive for fixpath to work.
26206      new_path="$CYGWIN_ROOT_PATH$input_path"
26207    fi
26208  fi
26209
26210
26211  if test "x$path" != "x$new_path"; then
26212    BOOT_JDK="$new_path"
26213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26214$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26215  fi
26216
26217    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26218
26219  path="$BOOT_JDK"
26220  has_colon=`$ECHO $path | $GREP ^.:`
26221  new_path="$path"
26222  if test "x$has_colon" = x; then
26223    # Not in mixed or Windows style, start by that.
26224    new_path=`cmd //c echo $path`
26225  fi
26226
26227
26228  input_path="$new_path"
26229  # Check if we need to convert this using DOS-style short mode. If the path
26230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26231  # take no chances and rewrite it.
26232  # Note: m4 eats our [], so we need to use [ and ] instead.
26233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26234  if test "x$has_forbidden_chars" != x; then
26235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26237  fi
26238
26239
26240  windows_path="$new_path"
26241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26242    unix_path=`$CYGPATH -u "$windows_path"`
26243    new_path="$unix_path"
26244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26246    new_path="$unix_path"
26247  fi
26248
26249  if test "x$path" != "x$new_path"; then
26250    BOOT_JDK="$new_path"
26251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26252$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26253  fi
26254
26255  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26256  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26257
26258    else
26259      # We're on a unix platform. Hooray! :)
26260      path="$BOOT_JDK"
26261      has_space=`$ECHO "$path" | $GREP " "`
26262      if test "x$has_space" != x; then
26263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26264$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26265        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26266      fi
26267
26268      # Use eval to expand a potential ~
26269      eval path="$path"
26270      if test ! -f "$path" && test ! -d "$path"; then
26271        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26272      fi
26273
26274      if test -d "$path"; then
26275        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26276      else
26277        dir="`$DIRNAME "$path"`"
26278        base="`$BASENAME "$path"`"
26279        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26280      fi
26281    fi
26282  fi
26283
26284            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26285$as_echo_n "checking for Boot JDK... " >&6; }
26286            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26287$as_echo "$BOOT_JDK" >&6; }
26288            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26289$as_echo_n "checking Boot JDK version... " >&6; }
26290            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26292$as_echo "$BOOT_JDK_VERSION" >&6; }
26293          fi # end check jdk version
26294        fi # end check javac
26295      fi # end check java
26296    fi # end check boot jdk found
26297  fi
26298
26299    done
26300  fi
26301
26302  fi
26303
26304
26305    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26306    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26307      # Do we have a bin/java?
26308      if test ! -x "$BOOT_JDK/bin/java"; then
26309        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26310$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26311        BOOT_JDK_FOUND=no
26312      else
26313        # Do we have a bin/javac?
26314        if test ! -x "$BOOT_JDK/bin/javac"; then
26315          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26316$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26317          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26318$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26319          BOOT_JDK_FOUND=no
26320        else
26321          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26322          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26323
26324          # Extra M4 quote needed to protect [] in grep expression.
26325          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26326          if test "x$FOUND_CORRECT_VERSION" = x; then
26327            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26329            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26330$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26331            BOOT_JDK_FOUND=no
26332          else
26333            # We're done! :-)
26334            BOOT_JDK_FOUND=yes
26335
26336  # Only process if variable expands to non-empty
26337
26338  if test "x$BOOT_JDK" != x; then
26339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26340
26341  # Input might be given as Windows format, start by converting to
26342  # unix format.
26343  path="$BOOT_JDK"
26344  new_path=`$CYGPATH -u "$path"`
26345
26346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26349  # "foo.exe" is OK but "foo" is an error.
26350  #
26351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26352  # It is also a way to make sure we got the proper file name for the real test later on.
26353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26354  if test "x$test_shortpath" = x; then
26355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26356$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26357    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26358  fi
26359
26360  # Call helper function which possibly converts this using DOS-style short mode.
26361  # If so, the updated path is stored in $new_path.
26362
26363  input_path="$new_path"
26364  # Check if we need to convert this using DOS-style short mode. If the path
26365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26366  # take no chances and rewrite it.
26367  # Note: m4 eats our [], so we need to use [ and ] instead.
26368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26369  if test "x$has_forbidden_chars" != x; then
26370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26374      # Going to short mode and back again did indeed matter. Since short mode is
26375      # case insensitive, let's make it lowercase to improve readability.
26376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26377      # Now convert it back to Unix-style (cygpath)
26378      input_path=`$CYGPATH -u "$shortmode_path"`
26379      new_path="$input_path"
26380    fi
26381  fi
26382
26383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26384  if test "x$test_cygdrive_prefix" = x; then
26385    # As a simple fix, exclude /usr/bin since it's not a real path.
26386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26388      # a path prefixed by /cygdrive for fixpath to work.
26389      new_path="$CYGWIN_ROOT_PATH$input_path"
26390    fi
26391  fi
26392
26393
26394  if test "x$path" != "x$new_path"; then
26395    BOOT_JDK="$new_path"
26396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26397$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26398  fi
26399
26400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26401
26402  path="$BOOT_JDK"
26403  has_colon=`$ECHO $path | $GREP ^.:`
26404  new_path="$path"
26405  if test "x$has_colon" = x; then
26406    # Not in mixed or Windows style, start by that.
26407    new_path=`cmd //c echo $path`
26408  fi
26409
26410
26411  input_path="$new_path"
26412  # Check if we need to convert this using DOS-style short mode. If the path
26413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26414  # take no chances and rewrite it.
26415  # Note: m4 eats our [], so we need to use [ and ] instead.
26416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26417  if test "x$has_forbidden_chars" != x; then
26418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26420  fi
26421
26422
26423  windows_path="$new_path"
26424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26425    unix_path=`$CYGPATH -u "$windows_path"`
26426    new_path="$unix_path"
26427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26429    new_path="$unix_path"
26430  fi
26431
26432  if test "x$path" != "x$new_path"; then
26433    BOOT_JDK="$new_path"
26434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26436  fi
26437
26438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26440
26441    else
26442      # We're on a unix platform. Hooray! :)
26443      path="$BOOT_JDK"
26444      has_space=`$ECHO "$path" | $GREP " "`
26445      if test "x$has_space" != x; then
26446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26447$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26448        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26449      fi
26450
26451      # Use eval to expand a potential ~
26452      eval path="$path"
26453      if test ! -f "$path" && test ! -d "$path"; then
26454        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26455      fi
26456
26457      if test -d "$path"; then
26458        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26459      else
26460        dir="`$DIRNAME "$path"`"
26461        base="`$BASENAME "$path"`"
26462        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26463      fi
26464    fi
26465  fi
26466
26467            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26468$as_echo_n "checking for Boot JDK... " >&6; }
26469            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26470$as_echo "$BOOT_JDK" >&6; }
26471            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26472$as_echo_n "checking Boot JDK version... " >&6; }
26473            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26474            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26475$as_echo "$BOOT_JDK_VERSION" >&6; }
26476          fi # end check jdk version
26477        fi # end check javac
26478      fi # end check java
26479    fi # end check boot jdk found
26480  fi
26481
26482
26483  if test "x$BOOT_JDK_FOUND" = xno; then
26484    # Now execute the test
26485
26486  if test "x$PROGRAMW6432" != x; then
26487    VIRTUAL_DIR="$PROGRAMW6432/Java"
26488
26489  windows_path="$VIRTUAL_DIR"
26490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26491    unix_path=`$CYGPATH -u "$windows_path"`
26492    VIRTUAL_DIR="$unix_path"
26493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26495    VIRTUAL_DIR="$unix_path"
26496  fi
26497
26498
26499  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26500  BOOT_JDK_SUFFIX=""
26501  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26502  if test "x$ALL_JDKS_FOUND" != x; then
26503    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26504
26505  if test "x$BOOT_JDK_FOUND" = xno; then
26506    # Now execute the test
26507
26508        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26509        if test -d "$BOOT_JDK"; then
26510          BOOT_JDK_FOUND=maybe
26511          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26512$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26513        fi
26514
26515
26516    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26517    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26518      # Do we have a bin/java?
26519      if test ! -x "$BOOT_JDK/bin/java"; then
26520        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26522        BOOT_JDK_FOUND=no
26523      else
26524        # Do we have a bin/javac?
26525        if test ! -x "$BOOT_JDK/bin/javac"; then
26526          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26528          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26529$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26530          BOOT_JDK_FOUND=no
26531        else
26532          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26533          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26534
26535          # Extra M4 quote needed to protect [] in grep expression.
26536          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26537          if test "x$FOUND_CORRECT_VERSION" = x; then
26538            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26540            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26541$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26542            BOOT_JDK_FOUND=no
26543          else
26544            # We're done! :-)
26545            BOOT_JDK_FOUND=yes
26546
26547  # Only process if variable expands to non-empty
26548
26549  if test "x$BOOT_JDK" != x; then
26550    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26551
26552  # Input might be given as Windows format, start by converting to
26553  # unix format.
26554  path="$BOOT_JDK"
26555  new_path=`$CYGPATH -u "$path"`
26556
26557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26560  # "foo.exe" is OK but "foo" is an error.
26561  #
26562  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26563  # It is also a way to make sure we got the proper file name for the real test later on.
26564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26565  if test "x$test_shortpath" = x; then
26566    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26567$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26568    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26569  fi
26570
26571  # Call helper function which possibly converts this using DOS-style short mode.
26572  # If so, the updated path is stored in $new_path.
26573
26574  input_path="$new_path"
26575  # Check if we need to convert this using DOS-style short mode. If the path
26576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26577  # take no chances and rewrite it.
26578  # Note: m4 eats our [], so we need to use [ and ] instead.
26579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26580  if test "x$has_forbidden_chars" != x; then
26581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26582    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26583    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26584    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26585      # Going to short mode and back again did indeed matter. Since short mode is
26586      # case insensitive, let's make it lowercase to improve readability.
26587      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26588      # Now convert it back to Unix-style (cygpath)
26589      input_path=`$CYGPATH -u "$shortmode_path"`
26590      new_path="$input_path"
26591    fi
26592  fi
26593
26594  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26595  if test "x$test_cygdrive_prefix" = x; then
26596    # As a simple fix, exclude /usr/bin since it's not a real path.
26597    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26598      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26599      # a path prefixed by /cygdrive for fixpath to work.
26600      new_path="$CYGWIN_ROOT_PATH$input_path"
26601    fi
26602  fi
26603
26604
26605  if test "x$path" != "x$new_path"; then
26606    BOOT_JDK="$new_path"
26607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26608$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26609  fi
26610
26611    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26612
26613  path="$BOOT_JDK"
26614  has_colon=`$ECHO $path | $GREP ^.:`
26615  new_path="$path"
26616  if test "x$has_colon" = x; then
26617    # Not in mixed or Windows style, start by that.
26618    new_path=`cmd //c echo $path`
26619  fi
26620
26621
26622  input_path="$new_path"
26623  # Check if we need to convert this using DOS-style short mode. If the path
26624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26625  # take no chances and rewrite it.
26626  # Note: m4 eats our [], so we need to use [ and ] instead.
26627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26628  if test "x$has_forbidden_chars" != x; then
26629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26630    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26631  fi
26632
26633
26634  windows_path="$new_path"
26635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26636    unix_path=`$CYGPATH -u "$windows_path"`
26637    new_path="$unix_path"
26638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26640    new_path="$unix_path"
26641  fi
26642
26643  if test "x$path" != "x$new_path"; then
26644    BOOT_JDK="$new_path"
26645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26646$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26647  fi
26648
26649  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26650  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26651
26652    else
26653      # We're on a unix platform. Hooray! :)
26654      path="$BOOT_JDK"
26655      has_space=`$ECHO "$path" | $GREP " "`
26656      if test "x$has_space" != x; then
26657        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26658$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26659        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26660      fi
26661
26662      # Use eval to expand a potential ~
26663      eval path="$path"
26664      if test ! -f "$path" && test ! -d "$path"; then
26665        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26666      fi
26667
26668      if test -d "$path"; then
26669        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26670      else
26671        dir="`$DIRNAME "$path"`"
26672        base="`$BASENAME "$path"`"
26673        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26674      fi
26675    fi
26676  fi
26677
26678            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26679$as_echo_n "checking for Boot JDK... " >&6; }
26680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26681$as_echo "$BOOT_JDK" >&6; }
26682            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26683$as_echo_n "checking Boot JDK version... " >&6; }
26684            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26686$as_echo "$BOOT_JDK_VERSION" >&6; }
26687          fi # end check jdk version
26688        fi # end check javac
26689      fi # end check java
26690    fi # end check boot jdk found
26691  fi
26692
26693    done
26694  fi
26695
26696  fi
26697
26698
26699    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26700    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26701      # Do we have a bin/java?
26702      if test ! -x "$BOOT_JDK/bin/java"; then
26703        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26705        BOOT_JDK_FOUND=no
26706      else
26707        # Do we have a bin/javac?
26708        if test ! -x "$BOOT_JDK/bin/javac"; then
26709          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26711          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26712$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26713          BOOT_JDK_FOUND=no
26714        else
26715          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26716          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26717
26718          # Extra M4 quote needed to protect [] in grep expression.
26719          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26720          if test "x$FOUND_CORRECT_VERSION" = x; then
26721            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26722$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26723            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26724$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26725            BOOT_JDK_FOUND=no
26726          else
26727            # We're done! :-)
26728            BOOT_JDK_FOUND=yes
26729
26730  # Only process if variable expands to non-empty
26731
26732  if test "x$BOOT_JDK" != x; then
26733    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26734
26735  # Input might be given as Windows format, start by converting to
26736  # unix format.
26737  path="$BOOT_JDK"
26738  new_path=`$CYGPATH -u "$path"`
26739
26740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26743  # "foo.exe" is OK but "foo" is an error.
26744  #
26745  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26746  # It is also a way to make sure we got the proper file name for the real test later on.
26747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26748  if test "x$test_shortpath" = x; then
26749    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26750$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26751    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26752  fi
26753
26754  # Call helper function which possibly converts this using DOS-style short mode.
26755  # If so, the updated path is stored in $new_path.
26756
26757  input_path="$new_path"
26758  # Check if we need to convert this using DOS-style short mode. If the path
26759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26760  # take no chances and rewrite it.
26761  # Note: m4 eats our [], so we need to use [ and ] instead.
26762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26763  if test "x$has_forbidden_chars" != x; then
26764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26765    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26766    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26767    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26768      # Going to short mode and back again did indeed matter. Since short mode is
26769      # case insensitive, let's make it lowercase to improve readability.
26770      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26771      # Now convert it back to Unix-style (cygpath)
26772      input_path=`$CYGPATH -u "$shortmode_path"`
26773      new_path="$input_path"
26774    fi
26775  fi
26776
26777  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26778  if test "x$test_cygdrive_prefix" = x; then
26779    # As a simple fix, exclude /usr/bin since it's not a real path.
26780    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26781      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26782      # a path prefixed by /cygdrive for fixpath to work.
26783      new_path="$CYGWIN_ROOT_PATH$input_path"
26784    fi
26785  fi
26786
26787
26788  if test "x$path" != "x$new_path"; then
26789    BOOT_JDK="$new_path"
26790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26791$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26792  fi
26793
26794    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26795
26796  path="$BOOT_JDK"
26797  has_colon=`$ECHO $path | $GREP ^.:`
26798  new_path="$path"
26799  if test "x$has_colon" = x; then
26800    # Not in mixed or Windows style, start by that.
26801    new_path=`cmd //c echo $path`
26802  fi
26803
26804
26805  input_path="$new_path"
26806  # Check if we need to convert this using DOS-style short mode. If the path
26807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26808  # take no chances and rewrite it.
26809  # Note: m4 eats our [], so we need to use [ and ] instead.
26810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26811  if test "x$has_forbidden_chars" != x; then
26812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26813    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26814  fi
26815
26816
26817  windows_path="$new_path"
26818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26819    unix_path=`$CYGPATH -u "$windows_path"`
26820    new_path="$unix_path"
26821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26823    new_path="$unix_path"
26824  fi
26825
26826  if test "x$path" != "x$new_path"; then
26827    BOOT_JDK="$new_path"
26828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26829$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26830  fi
26831
26832  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26833  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26834
26835    else
26836      # We're on a unix platform. Hooray! :)
26837      path="$BOOT_JDK"
26838      has_space=`$ECHO "$path" | $GREP " "`
26839      if test "x$has_space" != x; then
26840        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26841$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26842        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26843      fi
26844
26845      # Use eval to expand a potential ~
26846      eval path="$path"
26847      if test ! -f "$path" && test ! -d "$path"; then
26848        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26849      fi
26850
26851      if test -d "$path"; then
26852        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26853      else
26854        dir="`$DIRNAME "$path"`"
26855        base="`$BASENAME "$path"`"
26856        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26857      fi
26858    fi
26859  fi
26860
26861            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26862$as_echo_n "checking for Boot JDK... " >&6; }
26863            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26864$as_echo "$BOOT_JDK" >&6; }
26865            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26866$as_echo_n "checking Boot JDK version... " >&6; }
26867            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26868            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26869$as_echo "$BOOT_JDK_VERSION" >&6; }
26870          fi # end check jdk version
26871        fi # end check javac
26872      fi # end check java
26873    fi # end check boot jdk found
26874  fi
26875
26876
26877  if test "x$BOOT_JDK_FOUND" = xno; then
26878    # Now execute the test
26879
26880  if test "x$PROGRAMFILES" != x; then
26881    VIRTUAL_DIR="$PROGRAMFILES/Java"
26882
26883  windows_path="$VIRTUAL_DIR"
26884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26885    unix_path=`$CYGPATH -u "$windows_path"`
26886    VIRTUAL_DIR="$unix_path"
26887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26889    VIRTUAL_DIR="$unix_path"
26890  fi
26891
26892
26893  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26894  BOOT_JDK_SUFFIX=""
26895  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26896  if test "x$ALL_JDKS_FOUND" != x; then
26897    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26898
26899  if test "x$BOOT_JDK_FOUND" = xno; then
26900    # Now execute the test
26901
26902        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26903        if test -d "$BOOT_JDK"; then
26904          BOOT_JDK_FOUND=maybe
26905          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26906$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26907        fi
26908
26909
26910    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26911    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26912      # Do we have a bin/java?
26913      if test ! -x "$BOOT_JDK/bin/java"; then
26914        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26915$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26916        BOOT_JDK_FOUND=no
26917      else
26918        # Do we have a bin/javac?
26919        if test ! -x "$BOOT_JDK/bin/javac"; then
26920          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26921$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26922          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26923$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26924          BOOT_JDK_FOUND=no
26925        else
26926          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26927          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26928
26929          # Extra M4 quote needed to protect [] in grep expression.
26930          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26931          if test "x$FOUND_CORRECT_VERSION" = x; then
26932            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26934            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26935$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26936            BOOT_JDK_FOUND=no
26937          else
26938            # We're done! :-)
26939            BOOT_JDK_FOUND=yes
26940
26941  # Only process if variable expands to non-empty
26942
26943  if test "x$BOOT_JDK" != x; then
26944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26945
26946  # Input might be given as Windows format, start by converting to
26947  # unix format.
26948  path="$BOOT_JDK"
26949  new_path=`$CYGPATH -u "$path"`
26950
26951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26954  # "foo.exe" is OK but "foo" is an error.
26955  #
26956  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26957  # It is also a way to make sure we got the proper file name for the real test later on.
26958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26959  if test "x$test_shortpath" = x; then
26960    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26961$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26962    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26963  fi
26964
26965  # Call helper function which possibly converts this using DOS-style short mode.
26966  # If so, the updated path is stored in $new_path.
26967
26968  input_path="$new_path"
26969  # Check if we need to convert this using DOS-style short mode. If the path
26970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26971  # take no chances and rewrite it.
26972  # Note: m4 eats our [], so we need to use [ and ] instead.
26973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26974  if test "x$has_forbidden_chars" != x; then
26975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26979      # Going to short mode and back again did indeed matter. Since short mode is
26980      # case insensitive, let's make it lowercase to improve readability.
26981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26982      # Now convert it back to Unix-style (cygpath)
26983      input_path=`$CYGPATH -u "$shortmode_path"`
26984      new_path="$input_path"
26985    fi
26986  fi
26987
26988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26989  if test "x$test_cygdrive_prefix" = x; then
26990    # As a simple fix, exclude /usr/bin since it's not a real path.
26991    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26993      # a path prefixed by /cygdrive for fixpath to work.
26994      new_path="$CYGWIN_ROOT_PATH$input_path"
26995    fi
26996  fi
26997
26998
26999  if test "x$path" != "x$new_path"; then
27000    BOOT_JDK="$new_path"
27001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27002$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27003  fi
27004
27005    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27006
27007  path="$BOOT_JDK"
27008  has_colon=`$ECHO $path | $GREP ^.:`
27009  new_path="$path"
27010  if test "x$has_colon" = x; then
27011    # Not in mixed or Windows style, start by that.
27012    new_path=`cmd //c echo $path`
27013  fi
27014
27015
27016  input_path="$new_path"
27017  # Check if we need to convert this using DOS-style short mode. If the path
27018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27019  # take no chances and rewrite it.
27020  # Note: m4 eats our [], so we need to use [ and ] instead.
27021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27022  if test "x$has_forbidden_chars" != x; then
27023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27025  fi
27026
27027
27028  windows_path="$new_path"
27029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27030    unix_path=`$CYGPATH -u "$windows_path"`
27031    new_path="$unix_path"
27032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27034    new_path="$unix_path"
27035  fi
27036
27037  if test "x$path" != "x$new_path"; then
27038    BOOT_JDK="$new_path"
27039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27040$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27041  fi
27042
27043  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27044  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27045
27046    else
27047      # We're on a unix platform. Hooray! :)
27048      path="$BOOT_JDK"
27049      has_space=`$ECHO "$path" | $GREP " "`
27050      if test "x$has_space" != x; then
27051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27052$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27053        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27054      fi
27055
27056      # Use eval to expand a potential ~
27057      eval path="$path"
27058      if test ! -f "$path" && test ! -d "$path"; then
27059        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27060      fi
27061
27062      if test -d "$path"; then
27063        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27064      else
27065        dir="`$DIRNAME "$path"`"
27066        base="`$BASENAME "$path"`"
27067        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27068      fi
27069    fi
27070  fi
27071
27072            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27073$as_echo_n "checking for Boot JDK... " >&6; }
27074            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27075$as_echo "$BOOT_JDK" >&6; }
27076            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27077$as_echo_n "checking Boot JDK version... " >&6; }
27078            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27079            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27080$as_echo "$BOOT_JDK_VERSION" >&6; }
27081          fi # end check jdk version
27082        fi # end check javac
27083      fi # end check java
27084    fi # end check boot jdk found
27085  fi
27086
27087    done
27088  fi
27089
27090  fi
27091
27092
27093    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27094    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27095      # Do we have a bin/java?
27096      if test ! -x "$BOOT_JDK/bin/java"; then
27097        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27098$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27099        BOOT_JDK_FOUND=no
27100      else
27101        # Do we have a bin/javac?
27102        if test ! -x "$BOOT_JDK/bin/javac"; then
27103          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27104$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27105          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27106$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27107          BOOT_JDK_FOUND=no
27108        else
27109          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27110          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27111
27112          # Extra M4 quote needed to protect [] in grep expression.
27113          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27114          if test "x$FOUND_CORRECT_VERSION" = x; then
27115            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27116$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27117            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27118$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27119            BOOT_JDK_FOUND=no
27120          else
27121            # We're done! :-)
27122            BOOT_JDK_FOUND=yes
27123
27124  # Only process if variable expands to non-empty
27125
27126  if test "x$BOOT_JDK" != x; then
27127    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27128
27129  # Input might be given as Windows format, start by converting to
27130  # unix format.
27131  path="$BOOT_JDK"
27132  new_path=`$CYGPATH -u "$path"`
27133
27134  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27135  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27136  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27137  # "foo.exe" is OK but "foo" is an error.
27138  #
27139  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27140  # It is also a way to make sure we got the proper file name for the real test later on.
27141  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27142  if test "x$test_shortpath" = x; then
27143    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27144$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27145    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27146  fi
27147
27148  # Call helper function which possibly converts this using DOS-style short mode.
27149  # If so, the updated path is stored in $new_path.
27150
27151  input_path="$new_path"
27152  # Check if we need to convert this using DOS-style short mode. If the path
27153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27154  # take no chances and rewrite it.
27155  # Note: m4 eats our [], so we need to use [ and ] instead.
27156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27157  if test "x$has_forbidden_chars" != x; then
27158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27159    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27160    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27161    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27162      # Going to short mode and back again did indeed matter. Since short mode is
27163      # case insensitive, let's make it lowercase to improve readability.
27164      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27165      # Now convert it back to Unix-style (cygpath)
27166      input_path=`$CYGPATH -u "$shortmode_path"`
27167      new_path="$input_path"
27168    fi
27169  fi
27170
27171  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27172  if test "x$test_cygdrive_prefix" = x; then
27173    # As a simple fix, exclude /usr/bin since it's not a real path.
27174    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27175      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27176      # a path prefixed by /cygdrive for fixpath to work.
27177      new_path="$CYGWIN_ROOT_PATH$input_path"
27178    fi
27179  fi
27180
27181
27182  if test "x$path" != "x$new_path"; then
27183    BOOT_JDK="$new_path"
27184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27185$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27186  fi
27187
27188    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27189
27190  path="$BOOT_JDK"
27191  has_colon=`$ECHO $path | $GREP ^.:`
27192  new_path="$path"
27193  if test "x$has_colon" = x; then
27194    # Not in mixed or Windows style, start by that.
27195    new_path=`cmd //c echo $path`
27196  fi
27197
27198
27199  input_path="$new_path"
27200  # Check if we need to convert this using DOS-style short mode. If the path
27201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27202  # take no chances and rewrite it.
27203  # Note: m4 eats our [], so we need to use [ and ] instead.
27204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27205  if test "x$has_forbidden_chars" != x; then
27206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27208  fi
27209
27210
27211  windows_path="$new_path"
27212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27213    unix_path=`$CYGPATH -u "$windows_path"`
27214    new_path="$unix_path"
27215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27217    new_path="$unix_path"
27218  fi
27219
27220  if test "x$path" != "x$new_path"; then
27221    BOOT_JDK="$new_path"
27222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27223$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27224  fi
27225
27226  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27227  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27228
27229    else
27230      # We're on a unix platform. Hooray! :)
27231      path="$BOOT_JDK"
27232      has_space=`$ECHO "$path" | $GREP " "`
27233      if test "x$has_space" != x; then
27234        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27235$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27236        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27237      fi
27238
27239      # Use eval to expand a potential ~
27240      eval path="$path"
27241      if test ! -f "$path" && test ! -d "$path"; then
27242        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27243      fi
27244
27245      if test -d "$path"; then
27246        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27247      else
27248        dir="`$DIRNAME "$path"`"
27249        base="`$BASENAME "$path"`"
27250        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27251      fi
27252    fi
27253  fi
27254
27255            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27256$as_echo_n "checking for Boot JDK... " >&6; }
27257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27258$as_echo "$BOOT_JDK" >&6; }
27259            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27260$as_echo_n "checking Boot JDK version... " >&6; }
27261            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27263$as_echo "$BOOT_JDK_VERSION" >&6; }
27264          fi # end check jdk version
27265        fi # end check javac
27266      fi # end check java
27267    fi # end check boot jdk found
27268  fi
27269
27270
27271  if test "x$BOOT_JDK_FOUND" = xno; then
27272    # Now execute the test
27273
27274  if test "x$ProgramFiles" != x; then
27275    VIRTUAL_DIR="$ProgramFiles/Java"
27276
27277  windows_path="$VIRTUAL_DIR"
27278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27279    unix_path=`$CYGPATH -u "$windows_path"`
27280    VIRTUAL_DIR="$unix_path"
27281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27283    VIRTUAL_DIR="$unix_path"
27284  fi
27285
27286
27287  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27288  BOOT_JDK_SUFFIX=""
27289  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27290  if test "x$ALL_JDKS_FOUND" != x; then
27291    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27292
27293  if test "x$BOOT_JDK_FOUND" = xno; then
27294    # Now execute the test
27295
27296        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27297        if test -d "$BOOT_JDK"; then
27298          BOOT_JDK_FOUND=maybe
27299          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27300$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27301        fi
27302
27303
27304    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27305    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27306      # Do we have a bin/java?
27307      if test ! -x "$BOOT_JDK/bin/java"; then
27308        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27310        BOOT_JDK_FOUND=no
27311      else
27312        # Do we have a bin/javac?
27313        if test ! -x "$BOOT_JDK/bin/javac"; then
27314          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27316          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27317$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27318          BOOT_JDK_FOUND=no
27319        else
27320          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27321          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27322
27323          # Extra M4 quote needed to protect [] in grep expression.
27324          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27325          if test "x$FOUND_CORRECT_VERSION" = x; then
27326            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27327$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27328            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27329$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27330            BOOT_JDK_FOUND=no
27331          else
27332            # We're done! :-)
27333            BOOT_JDK_FOUND=yes
27334
27335  # Only process if variable expands to non-empty
27336
27337  if test "x$BOOT_JDK" != x; then
27338    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27339
27340  # Input might be given as Windows format, start by converting to
27341  # unix format.
27342  path="$BOOT_JDK"
27343  new_path=`$CYGPATH -u "$path"`
27344
27345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27348  # "foo.exe" is OK but "foo" is an error.
27349  #
27350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27351  # It is also a way to make sure we got the proper file name for the real test later on.
27352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27353  if test "x$test_shortpath" = x; then
27354    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27355$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27356    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27357  fi
27358
27359  # Call helper function which possibly converts this using DOS-style short mode.
27360  # If so, the updated path is stored in $new_path.
27361
27362  input_path="$new_path"
27363  # Check if we need to convert this using DOS-style short mode. If the path
27364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27365  # take no chances and rewrite it.
27366  # Note: m4 eats our [], so we need to use [ and ] instead.
27367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27368  if test "x$has_forbidden_chars" != x; then
27369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27373      # Going to short mode and back again did indeed matter. Since short mode is
27374      # case insensitive, let's make it lowercase to improve readability.
27375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27376      # Now convert it back to Unix-style (cygpath)
27377      input_path=`$CYGPATH -u "$shortmode_path"`
27378      new_path="$input_path"
27379    fi
27380  fi
27381
27382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27383  if test "x$test_cygdrive_prefix" = x; then
27384    # As a simple fix, exclude /usr/bin since it's not a real path.
27385    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27387      # a path prefixed by /cygdrive for fixpath to work.
27388      new_path="$CYGWIN_ROOT_PATH$input_path"
27389    fi
27390  fi
27391
27392
27393  if test "x$path" != "x$new_path"; then
27394    BOOT_JDK="$new_path"
27395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27396$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27397  fi
27398
27399    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27400
27401  path="$BOOT_JDK"
27402  has_colon=`$ECHO $path | $GREP ^.:`
27403  new_path="$path"
27404  if test "x$has_colon" = x; then
27405    # Not in mixed or Windows style, start by that.
27406    new_path=`cmd //c echo $path`
27407  fi
27408
27409
27410  input_path="$new_path"
27411  # Check if we need to convert this using DOS-style short mode. If the path
27412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27413  # take no chances and rewrite it.
27414  # Note: m4 eats our [], so we need to use [ and ] instead.
27415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27416  if test "x$has_forbidden_chars" != x; then
27417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27419  fi
27420
27421
27422  windows_path="$new_path"
27423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27424    unix_path=`$CYGPATH -u "$windows_path"`
27425    new_path="$unix_path"
27426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27428    new_path="$unix_path"
27429  fi
27430
27431  if test "x$path" != "x$new_path"; then
27432    BOOT_JDK="$new_path"
27433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27434$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27435  fi
27436
27437  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27438  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27439
27440    else
27441      # We're on a unix platform. Hooray! :)
27442      path="$BOOT_JDK"
27443      has_space=`$ECHO "$path" | $GREP " "`
27444      if test "x$has_space" != x; then
27445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27446$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27447        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27448      fi
27449
27450      # Use eval to expand a potential ~
27451      eval path="$path"
27452      if test ! -f "$path" && test ! -d "$path"; then
27453        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27454      fi
27455
27456      if test -d "$path"; then
27457        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27458      else
27459        dir="`$DIRNAME "$path"`"
27460        base="`$BASENAME "$path"`"
27461        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27462      fi
27463    fi
27464  fi
27465
27466            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27467$as_echo_n "checking for Boot JDK... " >&6; }
27468            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27469$as_echo "$BOOT_JDK" >&6; }
27470            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27471$as_echo_n "checking Boot JDK version... " >&6; }
27472            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27473            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27474$as_echo "$BOOT_JDK_VERSION" >&6; }
27475          fi # end check jdk version
27476        fi # end check javac
27477      fi # end check java
27478    fi # end check boot jdk found
27479  fi
27480
27481    done
27482  fi
27483
27484  fi
27485
27486
27487    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27488    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27489      # Do we have a bin/java?
27490      if test ! -x "$BOOT_JDK/bin/java"; then
27491        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27493        BOOT_JDK_FOUND=no
27494      else
27495        # Do we have a bin/javac?
27496        if test ! -x "$BOOT_JDK/bin/javac"; then
27497          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27499          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27500$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27501          BOOT_JDK_FOUND=no
27502        else
27503          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27504          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27505
27506          # Extra M4 quote needed to protect [] in grep expression.
27507          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27508          if test "x$FOUND_CORRECT_VERSION" = x; then
27509            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27511            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27512$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27513            BOOT_JDK_FOUND=no
27514          else
27515            # We're done! :-)
27516            BOOT_JDK_FOUND=yes
27517
27518  # Only process if variable expands to non-empty
27519
27520  if test "x$BOOT_JDK" != x; then
27521    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27522
27523  # Input might be given as Windows format, start by converting to
27524  # unix format.
27525  path="$BOOT_JDK"
27526  new_path=`$CYGPATH -u "$path"`
27527
27528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27531  # "foo.exe" is OK but "foo" is an error.
27532  #
27533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27534  # It is also a way to make sure we got the proper file name for the real test later on.
27535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27536  if test "x$test_shortpath" = x; then
27537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27538$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27539    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27540  fi
27541
27542  # Call helper function which possibly converts this using DOS-style short mode.
27543  # If so, the updated path is stored in $new_path.
27544
27545  input_path="$new_path"
27546  # Check if we need to convert this using DOS-style short mode. If the path
27547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27548  # take no chances and rewrite it.
27549  # Note: m4 eats our [], so we need to use [ and ] instead.
27550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27551  if test "x$has_forbidden_chars" != x; then
27552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27556      # Going to short mode and back again did indeed matter. Since short mode is
27557      # case insensitive, let's make it lowercase to improve readability.
27558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27559      # Now convert it back to Unix-style (cygpath)
27560      input_path=`$CYGPATH -u "$shortmode_path"`
27561      new_path="$input_path"
27562    fi
27563  fi
27564
27565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27566  if test "x$test_cygdrive_prefix" = x; then
27567    # As a simple fix, exclude /usr/bin since it's not a real path.
27568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27570      # a path prefixed by /cygdrive for fixpath to work.
27571      new_path="$CYGWIN_ROOT_PATH$input_path"
27572    fi
27573  fi
27574
27575
27576  if test "x$path" != "x$new_path"; then
27577    BOOT_JDK="$new_path"
27578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27579$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27580  fi
27581
27582    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27583
27584  path="$BOOT_JDK"
27585  has_colon=`$ECHO $path | $GREP ^.:`
27586  new_path="$path"
27587  if test "x$has_colon" = x; then
27588    # Not in mixed or Windows style, start by that.
27589    new_path=`cmd //c echo $path`
27590  fi
27591
27592
27593  input_path="$new_path"
27594  # Check if we need to convert this using DOS-style short mode. If the path
27595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27596  # take no chances and rewrite it.
27597  # Note: m4 eats our [], so we need to use [ and ] instead.
27598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27599  if test "x$has_forbidden_chars" != x; then
27600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27602  fi
27603
27604
27605  windows_path="$new_path"
27606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27607    unix_path=`$CYGPATH -u "$windows_path"`
27608    new_path="$unix_path"
27609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27611    new_path="$unix_path"
27612  fi
27613
27614  if test "x$path" != "x$new_path"; then
27615    BOOT_JDK="$new_path"
27616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27617$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27618  fi
27619
27620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27622
27623    else
27624      # We're on a unix platform. Hooray! :)
27625      path="$BOOT_JDK"
27626      has_space=`$ECHO "$path" | $GREP " "`
27627      if test "x$has_space" != x; then
27628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27629$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27630        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27631      fi
27632
27633      # Use eval to expand a potential ~
27634      eval path="$path"
27635      if test ! -f "$path" && test ! -d "$path"; then
27636        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27637      fi
27638
27639      if test -d "$path"; then
27640        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27641      else
27642        dir="`$DIRNAME "$path"`"
27643        base="`$BASENAME "$path"`"
27644        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27645      fi
27646    fi
27647  fi
27648
27649            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27650$as_echo_n "checking for Boot JDK... " >&6; }
27651            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27652$as_echo "$BOOT_JDK" >&6; }
27653            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27654$as_echo_n "checking Boot JDK version... " >&6; }
27655            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27656            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27657$as_echo "$BOOT_JDK_VERSION" >&6; }
27658          fi # end check jdk version
27659        fi # end check javac
27660      fi # end check java
27661    fi # end check boot jdk found
27662  fi
27663
27664
27665  if test "x$BOOT_JDK_FOUND" = xno; then
27666    # Now execute the test
27667
27668  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27669  BOOT_JDK_SUFFIX=""
27670  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27671  if test "x$ALL_JDKS_FOUND" != x; then
27672    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27673
27674  if test "x$BOOT_JDK_FOUND" = xno; then
27675    # Now execute the test
27676
27677        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27678        if test -d "$BOOT_JDK"; then
27679          BOOT_JDK_FOUND=maybe
27680          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27681$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27682        fi
27683
27684
27685    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27686    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27687      # Do we have a bin/java?
27688      if test ! -x "$BOOT_JDK/bin/java"; then
27689        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27691        BOOT_JDK_FOUND=no
27692      else
27693        # Do we have a bin/javac?
27694        if test ! -x "$BOOT_JDK/bin/javac"; then
27695          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27696$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27697          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27698$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27699          BOOT_JDK_FOUND=no
27700        else
27701          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27702          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27703
27704          # Extra M4 quote needed to protect [] in grep expression.
27705          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27706          if test "x$FOUND_CORRECT_VERSION" = x; then
27707            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27709            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27710$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27711            BOOT_JDK_FOUND=no
27712          else
27713            # We're done! :-)
27714            BOOT_JDK_FOUND=yes
27715
27716  # Only process if variable expands to non-empty
27717
27718  if test "x$BOOT_JDK" != x; then
27719    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27720
27721  # Input might be given as Windows format, start by converting to
27722  # unix format.
27723  path="$BOOT_JDK"
27724  new_path=`$CYGPATH -u "$path"`
27725
27726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27729  # "foo.exe" is OK but "foo" is an error.
27730  #
27731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27732  # It is also a way to make sure we got the proper file name for the real test later on.
27733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27734  if test "x$test_shortpath" = x; then
27735    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27736$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27737    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27738  fi
27739
27740  # Call helper function which possibly converts this using DOS-style short mode.
27741  # If so, the updated path is stored in $new_path.
27742
27743  input_path="$new_path"
27744  # Check if we need to convert this using DOS-style short mode. If the path
27745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27746  # take no chances and rewrite it.
27747  # Note: m4 eats our [], so we need to use [ and ] instead.
27748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27749  if test "x$has_forbidden_chars" != x; then
27750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27754      # Going to short mode and back again did indeed matter. Since short mode is
27755      # case insensitive, let's make it lowercase to improve readability.
27756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27757      # Now convert it back to Unix-style (cygpath)
27758      input_path=`$CYGPATH -u "$shortmode_path"`
27759      new_path="$input_path"
27760    fi
27761  fi
27762
27763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27764  if test "x$test_cygdrive_prefix" = x; then
27765    # As a simple fix, exclude /usr/bin since it's not a real path.
27766    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27768      # a path prefixed by /cygdrive for fixpath to work.
27769      new_path="$CYGWIN_ROOT_PATH$input_path"
27770    fi
27771  fi
27772
27773
27774  if test "x$path" != "x$new_path"; then
27775    BOOT_JDK="$new_path"
27776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27777$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27778  fi
27779
27780    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27781
27782  path="$BOOT_JDK"
27783  has_colon=`$ECHO $path | $GREP ^.:`
27784  new_path="$path"
27785  if test "x$has_colon" = x; then
27786    # Not in mixed or Windows style, start by that.
27787    new_path=`cmd //c echo $path`
27788  fi
27789
27790
27791  input_path="$new_path"
27792  # Check if we need to convert this using DOS-style short mode. If the path
27793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27794  # take no chances and rewrite it.
27795  # Note: m4 eats our [], so we need to use [ and ] instead.
27796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27797  if test "x$has_forbidden_chars" != x; then
27798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27800  fi
27801
27802
27803  windows_path="$new_path"
27804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27805    unix_path=`$CYGPATH -u "$windows_path"`
27806    new_path="$unix_path"
27807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27809    new_path="$unix_path"
27810  fi
27811
27812  if test "x$path" != "x$new_path"; then
27813    BOOT_JDK="$new_path"
27814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27815$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27816  fi
27817
27818  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27819  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27820
27821    else
27822      # We're on a unix platform. Hooray! :)
27823      path="$BOOT_JDK"
27824      has_space=`$ECHO "$path" | $GREP " "`
27825      if test "x$has_space" != x; then
27826        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27827$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27828        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27829      fi
27830
27831      # Use eval to expand a potential ~
27832      eval path="$path"
27833      if test ! -f "$path" && test ! -d "$path"; then
27834        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27835      fi
27836
27837      if test -d "$path"; then
27838        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27839      else
27840        dir="`$DIRNAME "$path"`"
27841        base="`$BASENAME "$path"`"
27842        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27843      fi
27844    fi
27845  fi
27846
27847            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27848$as_echo_n "checking for Boot JDK... " >&6; }
27849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27850$as_echo "$BOOT_JDK" >&6; }
27851            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27852$as_echo_n "checking Boot JDK version... " >&6; }
27853            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27854            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27855$as_echo "$BOOT_JDK_VERSION" >&6; }
27856          fi # end check jdk version
27857        fi # end check javac
27858      fi # end check java
27859    fi # end check boot jdk found
27860  fi
27861
27862    done
27863  fi
27864
27865
27866    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27867    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27868      # Do we have a bin/java?
27869      if test ! -x "$BOOT_JDK/bin/java"; then
27870        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27871$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27872        BOOT_JDK_FOUND=no
27873      else
27874        # Do we have a bin/javac?
27875        if test ! -x "$BOOT_JDK/bin/javac"; then
27876          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27877$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27878          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27879$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27880          BOOT_JDK_FOUND=no
27881        else
27882          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27883          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27884
27885          # Extra M4 quote needed to protect [] in grep expression.
27886          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27887          if test "x$FOUND_CORRECT_VERSION" = x; then
27888            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27889$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27890            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27891$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27892            BOOT_JDK_FOUND=no
27893          else
27894            # We're done! :-)
27895            BOOT_JDK_FOUND=yes
27896
27897  # Only process if variable expands to non-empty
27898
27899  if test "x$BOOT_JDK" != x; then
27900    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27901
27902  # Input might be given as Windows format, start by converting to
27903  # unix format.
27904  path="$BOOT_JDK"
27905  new_path=`$CYGPATH -u "$path"`
27906
27907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27910  # "foo.exe" is OK but "foo" is an error.
27911  #
27912  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27913  # It is also a way to make sure we got the proper file name for the real test later on.
27914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27915  if test "x$test_shortpath" = x; then
27916    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27917$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27918    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27919  fi
27920
27921  # Call helper function which possibly converts this using DOS-style short mode.
27922  # If so, the updated path is stored in $new_path.
27923
27924  input_path="$new_path"
27925  # Check if we need to convert this using DOS-style short mode. If the path
27926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27927  # take no chances and rewrite it.
27928  # Note: m4 eats our [], so we need to use [ and ] instead.
27929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27930  if test "x$has_forbidden_chars" != x; then
27931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27932    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27933    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27934    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27935      # Going to short mode and back again did indeed matter. Since short mode is
27936      # case insensitive, let's make it lowercase to improve readability.
27937      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27938      # Now convert it back to Unix-style (cygpath)
27939      input_path=`$CYGPATH -u "$shortmode_path"`
27940      new_path="$input_path"
27941    fi
27942  fi
27943
27944  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27945  if test "x$test_cygdrive_prefix" = x; then
27946    # As a simple fix, exclude /usr/bin since it's not a real path.
27947    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27948      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27949      # a path prefixed by /cygdrive for fixpath to work.
27950      new_path="$CYGWIN_ROOT_PATH$input_path"
27951    fi
27952  fi
27953
27954
27955  if test "x$path" != "x$new_path"; then
27956    BOOT_JDK="$new_path"
27957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27958$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27959  fi
27960
27961    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27962
27963  path="$BOOT_JDK"
27964  has_colon=`$ECHO $path | $GREP ^.:`
27965  new_path="$path"
27966  if test "x$has_colon" = x; then
27967    # Not in mixed or Windows style, start by that.
27968    new_path=`cmd //c echo $path`
27969  fi
27970
27971
27972  input_path="$new_path"
27973  # Check if we need to convert this using DOS-style short mode. If the path
27974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27975  # take no chances and rewrite it.
27976  # Note: m4 eats our [], so we need to use [ and ] instead.
27977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27978  if test "x$has_forbidden_chars" != x; then
27979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27980    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27981  fi
27982
27983
27984  windows_path="$new_path"
27985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27986    unix_path=`$CYGPATH -u "$windows_path"`
27987    new_path="$unix_path"
27988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27990    new_path="$unix_path"
27991  fi
27992
27993  if test "x$path" != "x$new_path"; then
27994    BOOT_JDK="$new_path"
27995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27996$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27997  fi
27998
27999  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28000  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28001
28002    else
28003      # We're on a unix platform. Hooray! :)
28004      path="$BOOT_JDK"
28005      has_space=`$ECHO "$path" | $GREP " "`
28006      if test "x$has_space" != x; then
28007        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28008$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28009        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28010      fi
28011
28012      # Use eval to expand a potential ~
28013      eval path="$path"
28014      if test ! -f "$path" && test ! -d "$path"; then
28015        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28016      fi
28017
28018      if test -d "$path"; then
28019        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28020      else
28021        dir="`$DIRNAME "$path"`"
28022        base="`$BASENAME "$path"`"
28023        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28024      fi
28025    fi
28026  fi
28027
28028            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28029$as_echo_n "checking for Boot JDK... " >&6; }
28030            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28031$as_echo "$BOOT_JDK" >&6; }
28032            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28033$as_echo_n "checking Boot JDK version... " >&6; }
28034            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28035            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28036$as_echo "$BOOT_JDK_VERSION" >&6; }
28037          fi # end check jdk version
28038        fi # end check javac
28039      fi # end check java
28040    fi # end check boot jdk found
28041  fi
28042
28043  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28044
28045  if test "x$BOOT_JDK_FOUND" = xno; then
28046    # Now execute the test
28047
28048  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28049  BOOT_JDK_SUFFIX="/Contents/Home"
28050  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28051  if test "x$ALL_JDKS_FOUND" != x; then
28052    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28053
28054  if test "x$BOOT_JDK_FOUND" = xno; then
28055    # Now execute the test
28056
28057        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28058        if test -d "$BOOT_JDK"; then
28059          BOOT_JDK_FOUND=maybe
28060          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28061$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28062        fi
28063
28064
28065    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28066    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28067      # Do we have a bin/java?
28068      if test ! -x "$BOOT_JDK/bin/java"; then
28069        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28071        BOOT_JDK_FOUND=no
28072      else
28073        # Do we have a bin/javac?
28074        if test ! -x "$BOOT_JDK/bin/javac"; then
28075          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28077          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28078$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28079          BOOT_JDK_FOUND=no
28080        else
28081          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28082          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28083
28084          # Extra M4 quote needed to protect [] in grep expression.
28085          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28086          if test "x$FOUND_CORRECT_VERSION" = x; then
28087            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28088$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28089            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28090$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28091            BOOT_JDK_FOUND=no
28092          else
28093            # We're done! :-)
28094            BOOT_JDK_FOUND=yes
28095
28096  # Only process if variable expands to non-empty
28097
28098  if test "x$BOOT_JDK" != x; then
28099    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28100
28101  # Input might be given as Windows format, start by converting to
28102  # unix format.
28103  path="$BOOT_JDK"
28104  new_path=`$CYGPATH -u "$path"`
28105
28106  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28107  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28108  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28109  # "foo.exe" is OK but "foo" is an error.
28110  #
28111  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28112  # It is also a way to make sure we got the proper file name for the real test later on.
28113  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28114  if test "x$test_shortpath" = x; then
28115    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28116$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28117    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28118  fi
28119
28120  # Call helper function which possibly converts this using DOS-style short mode.
28121  # If so, the updated path is stored in $new_path.
28122
28123  input_path="$new_path"
28124  # Check if we need to convert this using DOS-style short mode. If the path
28125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28126  # take no chances and rewrite it.
28127  # Note: m4 eats our [], so we need to use [ and ] instead.
28128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28129  if test "x$has_forbidden_chars" != x; then
28130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28131    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28132    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28133    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28134      # Going to short mode and back again did indeed matter. Since short mode is
28135      # case insensitive, let's make it lowercase to improve readability.
28136      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28137      # Now convert it back to Unix-style (cygpath)
28138      input_path=`$CYGPATH -u "$shortmode_path"`
28139      new_path="$input_path"
28140    fi
28141  fi
28142
28143  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28144  if test "x$test_cygdrive_prefix" = x; then
28145    # As a simple fix, exclude /usr/bin since it's not a real path.
28146    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28147      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28148      # a path prefixed by /cygdrive for fixpath to work.
28149      new_path="$CYGWIN_ROOT_PATH$input_path"
28150    fi
28151  fi
28152
28153
28154  if test "x$path" != "x$new_path"; then
28155    BOOT_JDK="$new_path"
28156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28157$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28158  fi
28159
28160    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28161
28162  path="$BOOT_JDK"
28163  has_colon=`$ECHO $path | $GREP ^.:`
28164  new_path="$path"
28165  if test "x$has_colon" = x; then
28166    # Not in mixed or Windows style, start by that.
28167    new_path=`cmd //c echo $path`
28168  fi
28169
28170
28171  input_path="$new_path"
28172  # Check if we need to convert this using DOS-style short mode. If the path
28173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28174  # take no chances and rewrite it.
28175  # Note: m4 eats our [], so we need to use [ and ] instead.
28176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28177  if test "x$has_forbidden_chars" != x; then
28178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28180  fi
28181
28182
28183  windows_path="$new_path"
28184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28185    unix_path=`$CYGPATH -u "$windows_path"`
28186    new_path="$unix_path"
28187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28189    new_path="$unix_path"
28190  fi
28191
28192  if test "x$path" != "x$new_path"; then
28193    BOOT_JDK="$new_path"
28194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28195$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28196  fi
28197
28198  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28199  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28200
28201    else
28202      # We're on a unix platform. Hooray! :)
28203      path="$BOOT_JDK"
28204      has_space=`$ECHO "$path" | $GREP " "`
28205      if test "x$has_space" != x; then
28206        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28207$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28208        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28209      fi
28210
28211      # Use eval to expand a potential ~
28212      eval path="$path"
28213      if test ! -f "$path" && test ! -d "$path"; then
28214        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28215      fi
28216
28217      if test -d "$path"; then
28218        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28219      else
28220        dir="`$DIRNAME "$path"`"
28221        base="`$BASENAME "$path"`"
28222        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28223      fi
28224    fi
28225  fi
28226
28227            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28228$as_echo_n "checking for Boot JDK... " >&6; }
28229            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28230$as_echo "$BOOT_JDK" >&6; }
28231            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28232$as_echo_n "checking Boot JDK version... " >&6; }
28233            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28234            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28235$as_echo "$BOOT_JDK_VERSION" >&6; }
28236          fi # end check jdk version
28237        fi # end check javac
28238      fi # end check java
28239    fi # end check boot jdk found
28240  fi
28241
28242    done
28243  fi
28244
28245
28246    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28247    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28248      # Do we have a bin/java?
28249      if test ! -x "$BOOT_JDK/bin/java"; then
28250        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28252        BOOT_JDK_FOUND=no
28253      else
28254        # Do we have a bin/javac?
28255        if test ! -x "$BOOT_JDK/bin/javac"; then
28256          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28258          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28259$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28260          BOOT_JDK_FOUND=no
28261        else
28262          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28263          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28264
28265          # Extra M4 quote needed to protect [] in grep expression.
28266          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28267          if test "x$FOUND_CORRECT_VERSION" = x; then
28268            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28270            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28271$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28272            BOOT_JDK_FOUND=no
28273          else
28274            # We're done! :-)
28275            BOOT_JDK_FOUND=yes
28276
28277  # Only process if variable expands to non-empty
28278
28279  if test "x$BOOT_JDK" != x; then
28280    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28281
28282  # Input might be given as Windows format, start by converting to
28283  # unix format.
28284  path="$BOOT_JDK"
28285  new_path=`$CYGPATH -u "$path"`
28286
28287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28290  # "foo.exe" is OK but "foo" is an error.
28291  #
28292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28293  # It is also a way to make sure we got the proper file name for the real test later on.
28294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28295  if test "x$test_shortpath" = x; then
28296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28297$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28298    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28299  fi
28300
28301  # Call helper function which possibly converts this using DOS-style short mode.
28302  # If so, the updated path is stored in $new_path.
28303
28304  input_path="$new_path"
28305  # Check if we need to convert this using DOS-style short mode. If the path
28306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28307  # take no chances and rewrite it.
28308  # Note: m4 eats our [], so we need to use [ and ] instead.
28309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28310  if test "x$has_forbidden_chars" != x; then
28311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28315      # Going to short mode and back again did indeed matter. Since short mode is
28316      # case insensitive, let's make it lowercase to improve readability.
28317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28318      # Now convert it back to Unix-style (cygpath)
28319      input_path=`$CYGPATH -u "$shortmode_path"`
28320      new_path="$input_path"
28321    fi
28322  fi
28323
28324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28325  if test "x$test_cygdrive_prefix" = x; then
28326    # As a simple fix, exclude /usr/bin since it's not a real path.
28327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28329      # a path prefixed by /cygdrive for fixpath to work.
28330      new_path="$CYGWIN_ROOT_PATH$input_path"
28331    fi
28332  fi
28333
28334
28335  if test "x$path" != "x$new_path"; then
28336    BOOT_JDK="$new_path"
28337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28338$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28339  fi
28340
28341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28342
28343  path="$BOOT_JDK"
28344  has_colon=`$ECHO $path | $GREP ^.:`
28345  new_path="$path"
28346  if test "x$has_colon" = x; then
28347    # Not in mixed or Windows style, start by that.
28348    new_path=`cmd //c echo $path`
28349  fi
28350
28351
28352  input_path="$new_path"
28353  # Check if we need to convert this using DOS-style short mode. If the path
28354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28355  # take no chances and rewrite it.
28356  # Note: m4 eats our [], so we need to use [ and ] instead.
28357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28358  if test "x$has_forbidden_chars" != x; then
28359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28361  fi
28362
28363
28364  windows_path="$new_path"
28365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28366    unix_path=`$CYGPATH -u "$windows_path"`
28367    new_path="$unix_path"
28368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28370    new_path="$unix_path"
28371  fi
28372
28373  if test "x$path" != "x$new_path"; then
28374    BOOT_JDK="$new_path"
28375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28376$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28377  fi
28378
28379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28381
28382    else
28383      # We're on a unix platform. Hooray! :)
28384      path="$BOOT_JDK"
28385      has_space=`$ECHO "$path" | $GREP " "`
28386      if test "x$has_space" != x; then
28387        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28388$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28389        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28390      fi
28391
28392      # Use eval to expand a potential ~
28393      eval path="$path"
28394      if test ! -f "$path" && test ! -d "$path"; then
28395        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28396      fi
28397
28398      if test -d "$path"; then
28399        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28400      else
28401        dir="`$DIRNAME "$path"`"
28402        base="`$BASENAME "$path"`"
28403        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28404      fi
28405    fi
28406  fi
28407
28408            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28409$as_echo_n "checking for Boot JDK... " >&6; }
28410            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28411$as_echo "$BOOT_JDK" >&6; }
28412            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28413$as_echo_n "checking Boot JDK version... " >&6; }
28414            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28415            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28416$as_echo "$BOOT_JDK_VERSION" >&6; }
28417          fi # end check jdk version
28418        fi # end check javac
28419      fi # end check java
28420    fi # end check boot jdk found
28421  fi
28422
28423
28424  if test "x$BOOT_JDK_FOUND" = xno; then
28425    # Now execute the test
28426
28427  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28428  BOOT_JDK_SUFFIX="/Contents/Home"
28429  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28430  if test "x$ALL_JDKS_FOUND" != x; then
28431    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28432
28433  if test "x$BOOT_JDK_FOUND" = xno; then
28434    # Now execute the test
28435
28436        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28437        if test -d "$BOOT_JDK"; then
28438          BOOT_JDK_FOUND=maybe
28439          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28440$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28441        fi
28442
28443
28444    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28445    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28446      # Do we have a bin/java?
28447      if test ! -x "$BOOT_JDK/bin/java"; then
28448        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28449$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28450        BOOT_JDK_FOUND=no
28451      else
28452        # Do we have a bin/javac?
28453        if test ! -x "$BOOT_JDK/bin/javac"; then
28454          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28456          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28457$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28458          BOOT_JDK_FOUND=no
28459        else
28460          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28461          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28462
28463          # Extra M4 quote needed to protect [] in grep expression.
28464          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28465          if test "x$FOUND_CORRECT_VERSION" = x; then
28466            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28467$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28468            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28469$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28470            BOOT_JDK_FOUND=no
28471          else
28472            # We're done! :-)
28473            BOOT_JDK_FOUND=yes
28474
28475  # Only process if variable expands to non-empty
28476
28477  if test "x$BOOT_JDK" != x; then
28478    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28479
28480  # Input might be given as Windows format, start by converting to
28481  # unix format.
28482  path="$BOOT_JDK"
28483  new_path=`$CYGPATH -u "$path"`
28484
28485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28488  # "foo.exe" is OK but "foo" is an error.
28489  #
28490  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28491  # It is also a way to make sure we got the proper file name for the real test later on.
28492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28493  if test "x$test_shortpath" = x; then
28494    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28495$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28496    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28497  fi
28498
28499  # Call helper function which possibly converts this using DOS-style short mode.
28500  # If so, the updated path is stored in $new_path.
28501
28502  input_path="$new_path"
28503  # Check if we need to convert this using DOS-style short mode. If the path
28504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28505  # take no chances and rewrite it.
28506  # Note: m4 eats our [], so we need to use [ and ] instead.
28507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28508  if test "x$has_forbidden_chars" != x; then
28509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28513      # Going to short mode and back again did indeed matter. Since short mode is
28514      # case insensitive, let's make it lowercase to improve readability.
28515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28516      # Now convert it back to Unix-style (cygpath)
28517      input_path=`$CYGPATH -u "$shortmode_path"`
28518      new_path="$input_path"
28519    fi
28520  fi
28521
28522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28523  if test "x$test_cygdrive_prefix" = x; then
28524    # As a simple fix, exclude /usr/bin since it's not a real path.
28525    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28527      # a path prefixed by /cygdrive for fixpath to work.
28528      new_path="$CYGWIN_ROOT_PATH$input_path"
28529    fi
28530  fi
28531
28532
28533  if test "x$path" != "x$new_path"; then
28534    BOOT_JDK="$new_path"
28535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28536$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28537  fi
28538
28539    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28540
28541  path="$BOOT_JDK"
28542  has_colon=`$ECHO $path | $GREP ^.:`
28543  new_path="$path"
28544  if test "x$has_colon" = x; then
28545    # Not in mixed or Windows style, start by that.
28546    new_path=`cmd //c echo $path`
28547  fi
28548
28549
28550  input_path="$new_path"
28551  # Check if we need to convert this using DOS-style short mode. If the path
28552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28553  # take no chances and rewrite it.
28554  # Note: m4 eats our [], so we need to use [ and ] instead.
28555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28556  if test "x$has_forbidden_chars" != x; then
28557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28559  fi
28560
28561
28562  windows_path="$new_path"
28563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28564    unix_path=`$CYGPATH -u "$windows_path"`
28565    new_path="$unix_path"
28566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28568    new_path="$unix_path"
28569  fi
28570
28571  if test "x$path" != "x$new_path"; then
28572    BOOT_JDK="$new_path"
28573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28574$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28575  fi
28576
28577  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28578  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28579
28580    else
28581      # We're on a unix platform. Hooray! :)
28582      path="$BOOT_JDK"
28583      has_space=`$ECHO "$path" | $GREP " "`
28584      if test "x$has_space" != x; then
28585        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28586$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28587        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28588      fi
28589
28590      # Use eval to expand a potential ~
28591      eval path="$path"
28592      if test ! -f "$path" && test ! -d "$path"; then
28593        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28594      fi
28595
28596      if test -d "$path"; then
28597        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28598      else
28599        dir="`$DIRNAME "$path"`"
28600        base="`$BASENAME "$path"`"
28601        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28602      fi
28603    fi
28604  fi
28605
28606            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28607$as_echo_n "checking for Boot JDK... " >&6; }
28608            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28609$as_echo "$BOOT_JDK" >&6; }
28610            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28611$as_echo_n "checking Boot JDK version... " >&6; }
28612            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28613            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28614$as_echo "$BOOT_JDK_VERSION" >&6; }
28615          fi # end check jdk version
28616        fi # end check javac
28617      fi # end check java
28618    fi # end check boot jdk found
28619  fi
28620
28621    done
28622  fi
28623
28624
28625    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28626    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28627      # Do we have a bin/java?
28628      if test ! -x "$BOOT_JDK/bin/java"; then
28629        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28631        BOOT_JDK_FOUND=no
28632      else
28633        # Do we have a bin/javac?
28634        if test ! -x "$BOOT_JDK/bin/javac"; then
28635          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28637          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28638$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28639          BOOT_JDK_FOUND=no
28640        else
28641          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28642          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28643
28644          # Extra M4 quote needed to protect [] in grep expression.
28645          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28646          if test "x$FOUND_CORRECT_VERSION" = x; then
28647            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28648$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28649            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28650$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28651            BOOT_JDK_FOUND=no
28652          else
28653            # We're done! :-)
28654            BOOT_JDK_FOUND=yes
28655
28656  # Only process if variable expands to non-empty
28657
28658  if test "x$BOOT_JDK" != x; then
28659    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28660
28661  # Input might be given as Windows format, start by converting to
28662  # unix format.
28663  path="$BOOT_JDK"
28664  new_path=`$CYGPATH -u "$path"`
28665
28666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28669  # "foo.exe" is OK but "foo" is an error.
28670  #
28671  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28672  # It is also a way to make sure we got the proper file name for the real test later on.
28673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28674  if test "x$test_shortpath" = x; then
28675    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28676$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28677    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28678  fi
28679
28680  # Call helper function which possibly converts this using DOS-style short mode.
28681  # If so, the updated path is stored in $new_path.
28682
28683  input_path="$new_path"
28684  # Check if we need to convert this using DOS-style short mode. If the path
28685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28686  # take no chances and rewrite it.
28687  # Note: m4 eats our [], so we need to use [ and ] instead.
28688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28689  if test "x$has_forbidden_chars" != x; then
28690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28691    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28692    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28693    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28694      # Going to short mode and back again did indeed matter. Since short mode is
28695      # case insensitive, let's make it lowercase to improve readability.
28696      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28697      # Now convert it back to Unix-style (cygpath)
28698      input_path=`$CYGPATH -u "$shortmode_path"`
28699      new_path="$input_path"
28700    fi
28701  fi
28702
28703  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28704  if test "x$test_cygdrive_prefix" = x; then
28705    # As a simple fix, exclude /usr/bin since it's not a real path.
28706    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28707      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28708      # a path prefixed by /cygdrive for fixpath to work.
28709      new_path="$CYGWIN_ROOT_PATH$input_path"
28710    fi
28711  fi
28712
28713
28714  if test "x$path" != "x$new_path"; then
28715    BOOT_JDK="$new_path"
28716    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28717$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28718  fi
28719
28720    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28721
28722  path="$BOOT_JDK"
28723  has_colon=`$ECHO $path | $GREP ^.:`
28724  new_path="$path"
28725  if test "x$has_colon" = x; then
28726    # Not in mixed or Windows style, start by that.
28727    new_path=`cmd //c echo $path`
28728  fi
28729
28730
28731  input_path="$new_path"
28732  # Check if we need to convert this using DOS-style short mode. If the path
28733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28734  # take no chances and rewrite it.
28735  # Note: m4 eats our [], so we need to use [ and ] instead.
28736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28737  if test "x$has_forbidden_chars" != x; then
28738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28740  fi
28741
28742
28743  windows_path="$new_path"
28744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28745    unix_path=`$CYGPATH -u "$windows_path"`
28746    new_path="$unix_path"
28747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28749    new_path="$unix_path"
28750  fi
28751
28752  if test "x$path" != "x$new_path"; then
28753    BOOT_JDK="$new_path"
28754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28755$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28756  fi
28757
28758  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28759  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28760
28761    else
28762      # We're on a unix platform. Hooray! :)
28763      path="$BOOT_JDK"
28764      has_space=`$ECHO "$path" | $GREP " "`
28765      if test "x$has_space" != x; then
28766        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28767$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28768        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28769      fi
28770
28771      # Use eval to expand a potential ~
28772      eval path="$path"
28773      if test ! -f "$path" && test ! -d "$path"; then
28774        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28775      fi
28776
28777      if test -d "$path"; then
28778        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28779      else
28780        dir="`$DIRNAME "$path"`"
28781        base="`$BASENAME "$path"`"
28782        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28783      fi
28784    fi
28785  fi
28786
28787            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28788$as_echo_n "checking for Boot JDK... " >&6; }
28789            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28790$as_echo "$BOOT_JDK" >&6; }
28791            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28792$as_echo_n "checking Boot JDK version... " >&6; }
28793            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28794            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28795$as_echo "$BOOT_JDK_VERSION" >&6; }
28796          fi # end check jdk version
28797        fi # end check javac
28798      fi # end check java
28799    fi # end check boot jdk found
28800  fi
28801
28802  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28803
28804  if test "x$BOOT_JDK_FOUND" = xno; then
28805    # Now execute the test
28806
28807  BOOT_JDK_PREFIX="/usr/lib/jvm"
28808  BOOT_JDK_SUFFIX=""
28809  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28810  if test "x$ALL_JDKS_FOUND" != x; then
28811    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28812
28813  if test "x$BOOT_JDK_FOUND" = xno; then
28814    # Now execute the test
28815
28816        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28817        if test -d "$BOOT_JDK"; then
28818          BOOT_JDK_FOUND=maybe
28819          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28820$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28821        fi
28822
28823
28824    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28825    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28826      # Do we have a bin/java?
28827      if test ! -x "$BOOT_JDK/bin/java"; then
28828        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28830        BOOT_JDK_FOUND=no
28831      else
28832        # Do we have a bin/javac?
28833        if test ! -x "$BOOT_JDK/bin/javac"; then
28834          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28835$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28836          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28837$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28838          BOOT_JDK_FOUND=no
28839        else
28840          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28841          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28842
28843          # Extra M4 quote needed to protect [] in grep expression.
28844          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28845          if test "x$FOUND_CORRECT_VERSION" = x; then
28846            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28847$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28848            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28849$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28850            BOOT_JDK_FOUND=no
28851          else
28852            # We're done! :-)
28853            BOOT_JDK_FOUND=yes
28854
28855  # Only process if variable expands to non-empty
28856
28857  if test "x$BOOT_JDK" != x; then
28858    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28859
28860  # Input might be given as Windows format, start by converting to
28861  # unix format.
28862  path="$BOOT_JDK"
28863  new_path=`$CYGPATH -u "$path"`
28864
28865  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28866  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28867  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28868  # "foo.exe" is OK but "foo" is an error.
28869  #
28870  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28871  # It is also a way to make sure we got the proper file name for the real test later on.
28872  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28873  if test "x$test_shortpath" = x; then
28874    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28875$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28876    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28877  fi
28878
28879  # Call helper function which possibly converts this using DOS-style short mode.
28880  # If so, the updated path is stored in $new_path.
28881
28882  input_path="$new_path"
28883  # Check if we need to convert this using DOS-style short mode. If the path
28884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28885  # take no chances and rewrite it.
28886  # Note: m4 eats our [], so we need to use [ and ] instead.
28887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28888  if test "x$has_forbidden_chars" != x; then
28889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28893      # Going to short mode and back again did indeed matter. Since short mode is
28894      # case insensitive, let's make it lowercase to improve readability.
28895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28896      # Now convert it back to Unix-style (cygpath)
28897      input_path=`$CYGPATH -u "$shortmode_path"`
28898      new_path="$input_path"
28899    fi
28900  fi
28901
28902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28903  if test "x$test_cygdrive_prefix" = x; then
28904    # As a simple fix, exclude /usr/bin since it's not a real path.
28905    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28907      # a path prefixed by /cygdrive for fixpath to work.
28908      new_path="$CYGWIN_ROOT_PATH$input_path"
28909    fi
28910  fi
28911
28912
28913  if test "x$path" != "x$new_path"; then
28914    BOOT_JDK="$new_path"
28915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28917  fi
28918
28919    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28920
28921  path="$BOOT_JDK"
28922  has_colon=`$ECHO $path | $GREP ^.:`
28923  new_path="$path"
28924  if test "x$has_colon" = x; then
28925    # Not in mixed or Windows style, start by that.
28926    new_path=`cmd //c echo $path`
28927  fi
28928
28929
28930  input_path="$new_path"
28931  # Check if we need to convert this using DOS-style short mode. If the path
28932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28933  # take no chances and rewrite it.
28934  # Note: m4 eats our [], so we need to use [ and ] instead.
28935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28936  if test "x$has_forbidden_chars" != x; then
28937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28939  fi
28940
28941
28942  windows_path="$new_path"
28943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28944    unix_path=`$CYGPATH -u "$windows_path"`
28945    new_path="$unix_path"
28946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28948    new_path="$unix_path"
28949  fi
28950
28951  if test "x$path" != "x$new_path"; then
28952    BOOT_JDK="$new_path"
28953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28954$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28955  fi
28956
28957  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28958  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28959
28960    else
28961      # We're on a unix platform. Hooray! :)
28962      path="$BOOT_JDK"
28963      has_space=`$ECHO "$path" | $GREP " "`
28964      if test "x$has_space" != x; then
28965        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28966$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28967        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28968      fi
28969
28970      # Use eval to expand a potential ~
28971      eval path="$path"
28972      if test ! -f "$path" && test ! -d "$path"; then
28973        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28974      fi
28975
28976      if test -d "$path"; then
28977        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28978      else
28979        dir="`$DIRNAME "$path"`"
28980        base="`$BASENAME "$path"`"
28981        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28982      fi
28983    fi
28984  fi
28985
28986            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28987$as_echo_n "checking for Boot JDK... " >&6; }
28988            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28989$as_echo "$BOOT_JDK" >&6; }
28990            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28991$as_echo_n "checking Boot JDK version... " >&6; }
28992            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28993            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28994$as_echo "$BOOT_JDK_VERSION" >&6; }
28995          fi # end check jdk version
28996        fi # end check javac
28997      fi # end check java
28998    fi # end check boot jdk found
28999  fi
29000
29001    done
29002  fi
29003
29004
29005    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29006    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29007      # Do we have a bin/java?
29008      if test ! -x "$BOOT_JDK/bin/java"; then
29009        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29011        BOOT_JDK_FOUND=no
29012      else
29013        # Do we have a bin/javac?
29014        if test ! -x "$BOOT_JDK/bin/javac"; then
29015          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29016$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29017          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29018$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29019          BOOT_JDK_FOUND=no
29020        else
29021          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29022          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29023
29024          # Extra M4 quote needed to protect [] in grep expression.
29025          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29026          if test "x$FOUND_CORRECT_VERSION" = x; then
29027            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29028$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29029            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29030$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29031            BOOT_JDK_FOUND=no
29032          else
29033            # We're done! :-)
29034            BOOT_JDK_FOUND=yes
29035
29036  # Only process if variable expands to non-empty
29037
29038  if test "x$BOOT_JDK" != x; then
29039    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29040
29041  # Input might be given as Windows format, start by converting to
29042  # unix format.
29043  path="$BOOT_JDK"
29044  new_path=`$CYGPATH -u "$path"`
29045
29046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29049  # "foo.exe" is OK but "foo" is an error.
29050  #
29051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29052  # It is also a way to make sure we got the proper file name for the real test later on.
29053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29054  if test "x$test_shortpath" = x; then
29055    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29056$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29057    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29058  fi
29059
29060  # Call helper function which possibly converts this using DOS-style short mode.
29061  # If so, the updated path is stored in $new_path.
29062
29063  input_path="$new_path"
29064  # Check if we need to convert this using DOS-style short mode. If the path
29065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29066  # take no chances and rewrite it.
29067  # Note: m4 eats our [], so we need to use [ and ] instead.
29068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29069  if test "x$has_forbidden_chars" != x; then
29070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29074      # Going to short mode and back again did indeed matter. Since short mode is
29075      # case insensitive, let's make it lowercase to improve readability.
29076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29077      # Now convert it back to Unix-style (cygpath)
29078      input_path=`$CYGPATH -u "$shortmode_path"`
29079      new_path="$input_path"
29080    fi
29081  fi
29082
29083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29084  if test "x$test_cygdrive_prefix" = x; then
29085    # As a simple fix, exclude /usr/bin since it's not a real path.
29086    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29088      # a path prefixed by /cygdrive for fixpath to work.
29089      new_path="$CYGWIN_ROOT_PATH$input_path"
29090    fi
29091  fi
29092
29093
29094  if test "x$path" != "x$new_path"; then
29095    BOOT_JDK="$new_path"
29096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29097$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29098  fi
29099
29100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29101
29102  path="$BOOT_JDK"
29103  has_colon=`$ECHO $path | $GREP ^.:`
29104  new_path="$path"
29105  if test "x$has_colon" = x; then
29106    # Not in mixed or Windows style, start by that.
29107    new_path=`cmd //c echo $path`
29108  fi
29109
29110
29111  input_path="$new_path"
29112  # Check if we need to convert this using DOS-style short mode. If the path
29113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29114  # take no chances and rewrite it.
29115  # Note: m4 eats our [], so we need to use [ and ] instead.
29116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29117  if test "x$has_forbidden_chars" != x; then
29118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29120  fi
29121
29122
29123  windows_path="$new_path"
29124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29125    unix_path=`$CYGPATH -u "$windows_path"`
29126    new_path="$unix_path"
29127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29129    new_path="$unix_path"
29130  fi
29131
29132  if test "x$path" != "x$new_path"; then
29133    BOOT_JDK="$new_path"
29134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29135$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29136  fi
29137
29138  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29139  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29140
29141    else
29142      # We're on a unix platform. Hooray! :)
29143      path="$BOOT_JDK"
29144      has_space=`$ECHO "$path" | $GREP " "`
29145      if test "x$has_space" != x; then
29146        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29147$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29148        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29149      fi
29150
29151      # Use eval to expand a potential ~
29152      eval path="$path"
29153      if test ! -f "$path" && test ! -d "$path"; then
29154        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29155      fi
29156
29157      if test -d "$path"; then
29158        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29159      else
29160        dir="`$DIRNAME "$path"`"
29161        base="`$BASENAME "$path"`"
29162        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29163      fi
29164    fi
29165  fi
29166
29167            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29168$as_echo_n "checking for Boot JDK... " >&6; }
29169            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29170$as_echo "$BOOT_JDK" >&6; }
29171            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29172$as_echo_n "checking Boot JDK version... " >&6; }
29173            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29174            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29175$as_echo "$BOOT_JDK_VERSION" >&6; }
29176          fi # end check jdk version
29177        fi # end check javac
29178      fi # end check java
29179    fi # end check boot jdk found
29180  fi
29181
29182  fi
29183
29184
29185    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29186    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29187      # Do we have a bin/java?
29188      if test ! -x "$BOOT_JDK/bin/java"; then
29189        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29191        BOOT_JDK_FOUND=no
29192      else
29193        # Do we have a bin/javac?
29194        if test ! -x "$BOOT_JDK/bin/javac"; then
29195          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29197          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29198$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29199          BOOT_JDK_FOUND=no
29200        else
29201          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29202          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29203
29204          # Extra M4 quote needed to protect [] in grep expression.
29205          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29206          if test "x$FOUND_CORRECT_VERSION" = x; then
29207            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29208$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29209            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29210$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29211            BOOT_JDK_FOUND=no
29212          else
29213            # We're done! :-)
29214            BOOT_JDK_FOUND=yes
29215
29216  # Only process if variable expands to non-empty
29217
29218  if test "x$BOOT_JDK" != x; then
29219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29220
29221  # Input might be given as Windows format, start by converting to
29222  # unix format.
29223  path="$BOOT_JDK"
29224  new_path=`$CYGPATH -u "$path"`
29225
29226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29229  # "foo.exe" is OK but "foo" is an error.
29230  #
29231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29232  # It is also a way to make sure we got the proper file name for the real test later on.
29233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29234  if test "x$test_shortpath" = x; then
29235    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29236$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29237    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29238  fi
29239
29240  # Call helper function which possibly converts this using DOS-style short mode.
29241  # If so, the updated path is stored in $new_path.
29242
29243  input_path="$new_path"
29244  # Check if we need to convert this using DOS-style short mode. If the path
29245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29246  # take no chances and rewrite it.
29247  # Note: m4 eats our [], so we need to use [ and ] instead.
29248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29249  if test "x$has_forbidden_chars" != x; then
29250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29254      # Going to short mode and back again did indeed matter. Since short mode is
29255      # case insensitive, let's make it lowercase to improve readability.
29256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29257      # Now convert it back to Unix-style (cygpath)
29258      input_path=`$CYGPATH -u "$shortmode_path"`
29259      new_path="$input_path"
29260    fi
29261  fi
29262
29263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29264  if test "x$test_cygdrive_prefix" = x; then
29265    # As a simple fix, exclude /usr/bin since it's not a real path.
29266    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29268      # a path prefixed by /cygdrive for fixpath to work.
29269      new_path="$CYGWIN_ROOT_PATH$input_path"
29270    fi
29271  fi
29272
29273
29274  if test "x$path" != "x$new_path"; then
29275    BOOT_JDK="$new_path"
29276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29277$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29278  fi
29279
29280    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29281
29282  path="$BOOT_JDK"
29283  has_colon=`$ECHO $path | $GREP ^.:`
29284  new_path="$path"
29285  if test "x$has_colon" = x; then
29286    # Not in mixed or Windows style, start by that.
29287    new_path=`cmd //c echo $path`
29288  fi
29289
29290
29291  input_path="$new_path"
29292  # Check if we need to convert this using DOS-style short mode. If the path
29293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29294  # take no chances and rewrite it.
29295  # Note: m4 eats our [], so we need to use [ and ] instead.
29296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29297  if test "x$has_forbidden_chars" != x; then
29298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29300  fi
29301
29302
29303  windows_path="$new_path"
29304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29305    unix_path=`$CYGPATH -u "$windows_path"`
29306    new_path="$unix_path"
29307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29309    new_path="$unix_path"
29310  fi
29311
29312  if test "x$path" != "x$new_path"; then
29313    BOOT_JDK="$new_path"
29314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29315$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29316  fi
29317
29318  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29319  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29320
29321    else
29322      # We're on a unix platform. Hooray! :)
29323      path="$BOOT_JDK"
29324      has_space=`$ECHO "$path" | $GREP " "`
29325      if test "x$has_space" != x; then
29326        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29327$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29328        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29329      fi
29330
29331      # Use eval to expand a potential ~
29332      eval path="$path"
29333      if test ! -f "$path" && test ! -d "$path"; then
29334        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29335      fi
29336
29337      if test -d "$path"; then
29338        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29339      else
29340        dir="`$DIRNAME "$path"`"
29341        base="`$BASENAME "$path"`"
29342        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29343      fi
29344    fi
29345  fi
29346
29347            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29348$as_echo_n "checking for Boot JDK... " >&6; }
29349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29350$as_echo "$BOOT_JDK" >&6; }
29351            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29352$as_echo_n "checking Boot JDK version... " >&6; }
29353            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29354            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29355$as_echo "$BOOT_JDK_VERSION" >&6; }
29356          fi # end check jdk version
29357        fi # end check javac
29358      fi # end check java
29359    fi # end check boot jdk found
29360  fi
29361
29362
29363  # If we haven't found anything yet, we've truly lost. Give up.
29364  if test "x$BOOT_JDK_FOUND" = xno; then
29365
29366  # Print a helpful message on how to acquire the necessary build dependency.
29367  # openjdk is the help tag: freetype, cups, alsa etc
29368  MISSING_DEPENDENCY=openjdk
29369
29370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29371    cygwin_help $MISSING_DEPENDENCY
29372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29373    msys_help $MISSING_DEPENDENCY
29374  else
29375    PKGHANDLER_COMMAND=
29376
29377    case $PKGHANDLER in
29378      apt-get)
29379        apt_help     $MISSING_DEPENDENCY ;;
29380      yum)
29381        yum_help     $MISSING_DEPENDENCY ;;
29382      port)
29383        port_help    $MISSING_DEPENDENCY ;;
29384      pkgutil)
29385        pkgutil_help $MISSING_DEPENDENCY ;;
29386      pkgadd)
29387        pkgadd_help  $MISSING_DEPENDENCY ;;
29388    esac
29389
29390    if test "x$PKGHANDLER_COMMAND" != x; then
29391      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29392    fi
29393  fi
29394
29395    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29396$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29397    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29398$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29399    as_fn_error $? "Cannot continue" "$LINENO" 5
29400  fi
29401
29402
29403
29404  # Setup tools from the Boot JDK.
29405
29406  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29407
29408  # Publish this variable in the help.
29409
29410
29411  if [ -z "${JAVA+x}" ]; then
29412    # The variable is not set by user, try to locate tool using the code snippet
29413
29414      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29415$as_echo_n "checking for java in Boot JDK... " >&6; }
29416      JAVA=$BOOT_JDK/bin/java
29417      if test ! -x $JAVA; then
29418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29419$as_echo "not found" >&6; }
29420        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29421$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29422        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29423      fi
29424      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29425$as_echo "ok" >&6; }
29426
29427
29428  else
29429    # The variable is set, but is it from the command line or the environment?
29430
29431    # Try to remove the string !JAVA! from our list.
29432    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29433    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29434      # If it failed, the variable was not from the command line. Ignore it,
29435      # but warn the user (except for BASH, which is always set by the calling BASH).
29436      if test "xJAVA" != xBASH; then
29437        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29438$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29439      fi
29440      # Try to locate tool using the code snippet
29441
29442      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29443$as_echo_n "checking for java in Boot JDK... " >&6; }
29444      JAVA=$BOOT_JDK/bin/java
29445      if test ! -x $JAVA; then
29446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29447$as_echo "not found" >&6; }
29448        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29449$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29450        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29451      fi
29452      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29453$as_echo "ok" >&6; }
29454
29455
29456    else
29457      # If it succeeded, then it was overridden by the user. We will use it
29458      # for the tool.
29459
29460      # First remove it from the list of overridden variables, so we can test
29461      # for unknown variables in the end.
29462      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29463
29464      # Check if we try to supply an empty value
29465      if test "x$JAVA" = x; then
29466        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29467$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29468        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29469$as_echo_n "checking for JAVA... " >&6; }
29470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29471$as_echo "disabled" >&6; }
29472      else
29473        # Check if the provided tool contains a complete path.
29474        tool_specified="$JAVA"
29475        tool_basename="${tool_specified##*/}"
29476        if test "x$tool_basename" = "x$tool_specified"; then
29477          # A command without a complete path is provided, search $PATH.
29478          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29479$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29480          # Extract the first word of "$tool_basename", so it can be a program name with args.
29481set dummy $tool_basename; ac_word=$2
29482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29483$as_echo_n "checking for $ac_word... " >&6; }
29484if ${ac_cv_path_JAVA+:} false; then :
29485  $as_echo_n "(cached) " >&6
29486else
29487  case $JAVA in
29488  [\\/]* | ?:[\\/]*)
29489  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29490  ;;
29491  *)
29492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29493for as_dir in $PATH
29494do
29495  IFS=$as_save_IFS
29496  test -z "$as_dir" && as_dir=.
29497    for ac_exec_ext in '' $ac_executable_extensions; do
29498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29499    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29501    break 2
29502  fi
29503done
29504  done
29505IFS=$as_save_IFS
29506
29507  ;;
29508esac
29509fi
29510JAVA=$ac_cv_path_JAVA
29511if test -n "$JAVA"; then
29512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29513$as_echo "$JAVA" >&6; }
29514else
29515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29516$as_echo "no" >&6; }
29517fi
29518
29519
29520          if test "x$JAVA" = x; then
29521            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29522          fi
29523        else
29524          # Otherwise we believe it is a complete path. Use it as it is.
29525          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29526$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29527          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29528$as_echo_n "checking for JAVA... " >&6; }
29529          if test ! -x "$tool_specified"; then
29530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29531$as_echo "not found" >&6; }
29532            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29533          fi
29534          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29535$as_echo "$tool_specified" >&6; }
29536        fi
29537      fi
29538    fi
29539
29540  fi
29541
29542
29543
29544  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29545
29546  # Publish this variable in the help.
29547
29548
29549  if [ -z "${JAVAC+x}" ]; then
29550    # The variable is not set by user, try to locate tool using the code snippet
29551
29552      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29553$as_echo_n "checking for javac in Boot JDK... " >&6; }
29554      JAVAC=$BOOT_JDK/bin/javac
29555      if test ! -x $JAVAC; then
29556        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29557$as_echo "not found" >&6; }
29558        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29559$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29560        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29561      fi
29562      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29563$as_echo "ok" >&6; }
29564
29565
29566  else
29567    # The variable is set, but is it from the command line or the environment?
29568
29569    # Try to remove the string !JAVAC! from our list.
29570    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29571    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29572      # If it failed, the variable was not from the command line. Ignore it,
29573      # but warn the user (except for BASH, which is always set by the calling BASH).
29574      if test "xJAVAC" != xBASH; then
29575        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29576$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29577      fi
29578      # Try to locate tool using the code snippet
29579
29580      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29581$as_echo_n "checking for javac in Boot JDK... " >&6; }
29582      JAVAC=$BOOT_JDK/bin/javac
29583      if test ! -x $JAVAC; then
29584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29585$as_echo "not found" >&6; }
29586        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29587$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29588        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29589      fi
29590      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29591$as_echo "ok" >&6; }
29592
29593
29594    else
29595      # If it succeeded, then it was overridden by the user. We will use it
29596      # for the tool.
29597
29598      # First remove it from the list of overridden variables, so we can test
29599      # for unknown variables in the end.
29600      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29601
29602      # Check if we try to supply an empty value
29603      if test "x$JAVAC" = x; then
29604        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29605$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29606        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29607$as_echo_n "checking for JAVAC... " >&6; }
29608        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29609$as_echo "disabled" >&6; }
29610      else
29611        # Check if the provided tool contains a complete path.
29612        tool_specified="$JAVAC"
29613        tool_basename="${tool_specified##*/}"
29614        if test "x$tool_basename" = "x$tool_specified"; then
29615          # A command without a complete path is provided, search $PATH.
29616          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29617$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29618          # Extract the first word of "$tool_basename", so it can be a program name with args.
29619set dummy $tool_basename; ac_word=$2
29620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29621$as_echo_n "checking for $ac_word... " >&6; }
29622if ${ac_cv_path_JAVAC+:} false; then :
29623  $as_echo_n "(cached) " >&6
29624else
29625  case $JAVAC in
29626  [\\/]* | ?:[\\/]*)
29627  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29628  ;;
29629  *)
29630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29631for as_dir in $PATH
29632do
29633  IFS=$as_save_IFS
29634  test -z "$as_dir" && as_dir=.
29635    for ac_exec_ext in '' $ac_executable_extensions; do
29636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29637    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29639    break 2
29640  fi
29641done
29642  done
29643IFS=$as_save_IFS
29644
29645  ;;
29646esac
29647fi
29648JAVAC=$ac_cv_path_JAVAC
29649if test -n "$JAVAC"; then
29650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29651$as_echo "$JAVAC" >&6; }
29652else
29653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29654$as_echo "no" >&6; }
29655fi
29656
29657
29658          if test "x$JAVAC" = x; then
29659            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29660          fi
29661        else
29662          # Otherwise we believe it is a complete path. Use it as it is.
29663          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29664$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29665          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29666$as_echo_n "checking for JAVAC... " >&6; }
29667          if test ! -x "$tool_specified"; then
29668            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29669$as_echo "not found" >&6; }
29670            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29671          fi
29672          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29673$as_echo "$tool_specified" >&6; }
29674        fi
29675      fi
29676    fi
29677
29678  fi
29679
29680
29681
29682  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29683
29684  # Publish this variable in the help.
29685
29686
29687  if [ -z "${JAVAH+x}" ]; then
29688    # The variable is not set by user, try to locate tool using the code snippet
29689
29690      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29691$as_echo_n "checking for javah in Boot JDK... " >&6; }
29692      JAVAH=$BOOT_JDK/bin/javah
29693      if test ! -x $JAVAH; then
29694        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29695$as_echo "not found" >&6; }
29696        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29697$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29698        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29699      fi
29700      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29701$as_echo "ok" >&6; }
29702
29703
29704  else
29705    # The variable is set, but is it from the command line or the environment?
29706
29707    # Try to remove the string !JAVAH! from our list.
29708    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29709    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29710      # If it failed, the variable was not from the command line. Ignore it,
29711      # but warn the user (except for BASH, which is always set by the calling BASH).
29712      if test "xJAVAH" != xBASH; then
29713        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29714$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29715      fi
29716      # Try to locate tool using the code snippet
29717
29718      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29719$as_echo_n "checking for javah in Boot JDK... " >&6; }
29720      JAVAH=$BOOT_JDK/bin/javah
29721      if test ! -x $JAVAH; then
29722        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29723$as_echo "not found" >&6; }
29724        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29725$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29726        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29727      fi
29728      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29729$as_echo "ok" >&6; }
29730
29731
29732    else
29733      # If it succeeded, then it was overridden by the user. We will use it
29734      # for the tool.
29735
29736      # First remove it from the list of overridden variables, so we can test
29737      # for unknown variables in the end.
29738      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29739
29740      # Check if we try to supply an empty value
29741      if test "x$JAVAH" = x; then
29742        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29743$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29745$as_echo_n "checking for JAVAH... " >&6; }
29746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29747$as_echo "disabled" >&6; }
29748      else
29749        # Check if the provided tool contains a complete path.
29750        tool_specified="$JAVAH"
29751        tool_basename="${tool_specified##*/}"
29752        if test "x$tool_basename" = "x$tool_specified"; then
29753          # A command without a complete path is provided, search $PATH.
29754          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29755$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29756          # Extract the first word of "$tool_basename", so it can be a program name with args.
29757set dummy $tool_basename; ac_word=$2
29758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29759$as_echo_n "checking for $ac_word... " >&6; }
29760if ${ac_cv_path_JAVAH+:} false; then :
29761  $as_echo_n "(cached) " >&6
29762else
29763  case $JAVAH in
29764  [\\/]* | ?:[\\/]*)
29765  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29766  ;;
29767  *)
29768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29769for as_dir in $PATH
29770do
29771  IFS=$as_save_IFS
29772  test -z "$as_dir" && as_dir=.
29773    for ac_exec_ext in '' $ac_executable_extensions; do
29774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29775    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29777    break 2
29778  fi
29779done
29780  done
29781IFS=$as_save_IFS
29782
29783  ;;
29784esac
29785fi
29786JAVAH=$ac_cv_path_JAVAH
29787if test -n "$JAVAH"; then
29788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29789$as_echo "$JAVAH" >&6; }
29790else
29791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29792$as_echo "no" >&6; }
29793fi
29794
29795
29796          if test "x$JAVAH" = x; then
29797            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29798          fi
29799        else
29800          # Otherwise we believe it is a complete path. Use it as it is.
29801          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29802$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29803          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29804$as_echo_n "checking for JAVAH... " >&6; }
29805          if test ! -x "$tool_specified"; then
29806            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29807$as_echo "not found" >&6; }
29808            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29809          fi
29810          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29811$as_echo "$tool_specified" >&6; }
29812        fi
29813      fi
29814    fi
29815
29816  fi
29817
29818
29819
29820  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29821
29822  # Publish this variable in the help.
29823
29824
29825  if [ -z "${JAR+x}" ]; then
29826    # The variable is not set by user, try to locate tool using the code snippet
29827
29828      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29829$as_echo_n "checking for jar in Boot JDK... " >&6; }
29830      JAR=$BOOT_JDK/bin/jar
29831      if test ! -x $JAR; then
29832        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29833$as_echo "not found" >&6; }
29834        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29835$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29836        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29837      fi
29838      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29839$as_echo "ok" >&6; }
29840
29841
29842  else
29843    # The variable is set, but is it from the command line or the environment?
29844
29845    # Try to remove the string !JAR! from our list.
29846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29848      # If it failed, the variable was not from the command line. Ignore it,
29849      # but warn the user (except for BASH, which is always set by the calling BASH).
29850      if test "xJAR" != xBASH; then
29851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29852$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29853      fi
29854      # Try to locate tool using the code snippet
29855
29856      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29857$as_echo_n "checking for jar in Boot JDK... " >&6; }
29858      JAR=$BOOT_JDK/bin/jar
29859      if test ! -x $JAR; then
29860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29861$as_echo "not found" >&6; }
29862        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29863$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29864        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29865      fi
29866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29867$as_echo "ok" >&6; }
29868
29869
29870    else
29871      # If it succeeded, then it was overridden by the user. We will use it
29872      # for the tool.
29873
29874      # First remove it from the list of overridden variables, so we can test
29875      # for unknown variables in the end.
29876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29877
29878      # Check if we try to supply an empty value
29879      if test "x$JAR" = x; then
29880        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29881$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29882        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29883$as_echo_n "checking for JAR... " >&6; }
29884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29885$as_echo "disabled" >&6; }
29886      else
29887        # Check if the provided tool contains a complete path.
29888        tool_specified="$JAR"
29889        tool_basename="${tool_specified##*/}"
29890        if test "x$tool_basename" = "x$tool_specified"; then
29891          # A command without a complete path is provided, search $PATH.
29892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29893$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29894          # Extract the first word of "$tool_basename", so it can be a program name with args.
29895set dummy $tool_basename; ac_word=$2
29896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29897$as_echo_n "checking for $ac_word... " >&6; }
29898if ${ac_cv_path_JAR+:} false; then :
29899  $as_echo_n "(cached) " >&6
29900else
29901  case $JAR in
29902  [\\/]* | ?:[\\/]*)
29903  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29904  ;;
29905  *)
29906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29907for as_dir in $PATH
29908do
29909  IFS=$as_save_IFS
29910  test -z "$as_dir" && as_dir=.
29911    for ac_exec_ext in '' $ac_executable_extensions; do
29912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29913    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29915    break 2
29916  fi
29917done
29918  done
29919IFS=$as_save_IFS
29920
29921  ;;
29922esac
29923fi
29924JAR=$ac_cv_path_JAR
29925if test -n "$JAR"; then
29926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29927$as_echo "$JAR" >&6; }
29928else
29929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29930$as_echo "no" >&6; }
29931fi
29932
29933
29934          if test "x$JAR" = x; then
29935            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29936          fi
29937        else
29938          # Otherwise we believe it is a complete path. Use it as it is.
29939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29940$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29941          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29942$as_echo_n "checking for JAR... " >&6; }
29943          if test ! -x "$tool_specified"; then
29944            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29945$as_echo "not found" >&6; }
29946            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29947          fi
29948          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29949$as_echo "$tool_specified" >&6; }
29950        fi
29951      fi
29952    fi
29953
29954  fi
29955
29956
29957
29958  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29959
29960  # Publish this variable in the help.
29961
29962
29963  if [ -z "${JARSIGNER+x}" ]; then
29964    # The variable is not set by user, try to locate tool using the code snippet
29965
29966      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29967$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29968      JARSIGNER=$BOOT_JDK/bin/jarsigner
29969      if test ! -x $JARSIGNER; then
29970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29971$as_echo "not found" >&6; }
29972        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29973$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29974        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29975      fi
29976      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29977$as_echo "ok" >&6; }
29978
29979
29980  else
29981    # The variable is set, but is it from the command line or the environment?
29982
29983    # Try to remove the string !JARSIGNER! from our list.
29984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29986      # If it failed, the variable was not from the command line. Ignore it,
29987      # but warn the user (except for BASH, which is always set by the calling BASH).
29988      if test "xJARSIGNER" != xBASH; then
29989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29990$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29991      fi
29992      # Try to locate tool using the code snippet
29993
29994      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29995$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29996      JARSIGNER=$BOOT_JDK/bin/jarsigner
29997      if test ! -x $JARSIGNER; then
29998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29999$as_echo "not found" >&6; }
30000        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30001$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30002        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30003      fi
30004      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30005$as_echo "ok" >&6; }
30006
30007
30008    else
30009      # If it succeeded, then it was overridden by the user. We will use it
30010      # for the tool.
30011
30012      # First remove it from the list of overridden variables, so we can test
30013      # for unknown variables in the end.
30014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30015
30016      # Check if we try to supply an empty value
30017      if test "x$JARSIGNER" = x; then
30018        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30019$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30020        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30021$as_echo_n "checking for JARSIGNER... " >&6; }
30022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30023$as_echo "disabled" >&6; }
30024      else
30025        # Check if the provided tool contains a complete path.
30026        tool_specified="$JARSIGNER"
30027        tool_basename="${tool_specified##*/}"
30028        if test "x$tool_basename" = "x$tool_specified"; then
30029          # A command without a complete path is provided, search $PATH.
30030          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30031$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30032          # Extract the first word of "$tool_basename", so it can be a program name with args.
30033set dummy $tool_basename; ac_word=$2
30034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30035$as_echo_n "checking for $ac_word... " >&6; }
30036if ${ac_cv_path_JARSIGNER+:} false; then :
30037  $as_echo_n "(cached) " >&6
30038else
30039  case $JARSIGNER in
30040  [\\/]* | ?:[\\/]*)
30041  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30042  ;;
30043  *)
30044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30045for as_dir in $PATH
30046do
30047  IFS=$as_save_IFS
30048  test -z "$as_dir" && as_dir=.
30049    for ac_exec_ext in '' $ac_executable_extensions; do
30050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30051    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30053    break 2
30054  fi
30055done
30056  done
30057IFS=$as_save_IFS
30058
30059  ;;
30060esac
30061fi
30062JARSIGNER=$ac_cv_path_JARSIGNER
30063if test -n "$JARSIGNER"; then
30064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30065$as_echo "$JARSIGNER" >&6; }
30066else
30067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30068$as_echo "no" >&6; }
30069fi
30070
30071
30072          if test "x$JARSIGNER" = x; then
30073            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30074          fi
30075        else
30076          # Otherwise we believe it is a complete path. Use it as it is.
30077          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30078$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30079          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30080$as_echo_n "checking for JARSIGNER... " >&6; }
30081          if test ! -x "$tool_specified"; then
30082            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30083$as_echo "not found" >&6; }
30084            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30085          fi
30086          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30087$as_echo "$tool_specified" >&6; }
30088        fi
30089      fi
30090    fi
30091
30092  fi
30093
30094
30095
30096  # Finally, set some other options...
30097
30098  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30099  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30100
30101
30102
30103  $ECHO "Check if jvm arg is ok: -Xpatch:" >&5
30104  $ECHO "Command: $JAVA -Xpatch: -version" >&5
30105  OUTPUT=`$JAVA -Xpatch: -version 2>&1`
30106  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
30107  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
30108  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30109    dummy="$dummy -Xpatch:"
30110    JVM_ARG_OK=true
30111  else
30112    $ECHO "Arg failed:" >&5
30113    $ECHO "$OUTPUT" >&5
30114    JVM_ARG_OK=false
30115  fi
30116
30117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30118$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30119  if test "x$JVM_ARG_OK" = "xtrue"; then
30120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30121$as_echo "yes" >&6; }
30122    BOOT_JDK_MODULAR="true"
30123  else
30124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30125$as_echo "no" >&6; }
30126    BOOT_JDK_MODULAR="false"
30127  fi
30128
30129
30130
30131
30132  # Check if the boot jdk is 32 or 64 bit
30133  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30134    BOOT_JDK_BITS="64"
30135  else
30136    BOOT_JDK_BITS="32"
30137  fi
30138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30139$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30141$as_echo "$BOOT_JDK_BITS" >&6; }
30142
30143
30144
30145
30146# Check whether --with-build-jdk was given.
30147if test "${with_build_jdk+set}" = set; then :
30148  withval=$with_build_jdk;
30149fi
30150
30151
30152  CREATE_BUILDJDK_FOR_HOST=false
30153  BUILD_JDK_FOUND="no"
30154  if test "x$with_build_jdk" != "x"; then
30155
30156  if test "x$BUILD_JDK_FOUND" = xno; then
30157    # Execute the test
30158
30159       if test "x$with_build_jdk" != x; then
30160         BUILD_JDK=$with_build_jdk
30161         BUILD_JDK_FOUND=maybe
30162         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30163$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30164       fi
30165
30166    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30167    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30168      # Do we have a bin/java?
30169      if test ! -x "$BUILD_JDK/bin/java"; then
30170        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30171$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30172        BUILD_JDK_FOUND=no
30173      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30174        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30175$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30176        BUILD_JDK_FOUND=no
30177      elif test ! -x "$BUILD_JDK/bin/javac"; then
30178        # Do we have a bin/javac?
30179        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30180$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30181        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30182$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30183        BUILD_JDK_FOUND=no
30184      else
30185        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30186        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
30187
30188        # Extra M4 quote needed to protect [] in grep expression.
30189        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | grep  '\"1\.[9]\.'`
30190        if test "x$FOUND_CORRECT_VERSION" = x; then
30191          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30192$as_echo "$as_me: Potential Boot JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30193          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30194$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30195          BUILD_JDK_FOUND=no
30196        else
30197          # We're done!
30198          BUILD_JDK_FOUND=yes
30199
30200  # Only process if variable expands to non-empty
30201
30202  if test "x$BUILD_JDK" != x; then
30203    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30204
30205  # Input might be given as Windows format, start by converting to
30206  # unix format.
30207  path="$BUILD_JDK"
30208  new_path=`$CYGPATH -u "$path"`
30209
30210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30213  # "foo.exe" is OK but "foo" is an error.
30214  #
30215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30216  # It is also a way to make sure we got the proper file name for the real test later on.
30217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30218  if test "x$test_shortpath" = x; then
30219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30220$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30221    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30222  fi
30223
30224  # Call helper function which possibly converts this using DOS-style short mode.
30225  # If so, the updated path is stored in $new_path.
30226
30227  input_path="$new_path"
30228  # Check if we need to convert this using DOS-style short mode. If the path
30229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30230  # take no chances and rewrite it.
30231  # Note: m4 eats our [], so we need to use [ and ] instead.
30232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30233  if test "x$has_forbidden_chars" != x; then
30234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30238      # Going to short mode and back again did indeed matter. Since short mode is
30239      # case insensitive, let's make it lowercase to improve readability.
30240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30241      # Now convert it back to Unix-style (cygpath)
30242      input_path=`$CYGPATH -u "$shortmode_path"`
30243      new_path="$input_path"
30244    fi
30245  fi
30246
30247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30248  if test "x$test_cygdrive_prefix" = x; then
30249    # As a simple fix, exclude /usr/bin since it's not a real path.
30250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30252      # a path prefixed by /cygdrive for fixpath to work.
30253      new_path="$CYGWIN_ROOT_PATH$input_path"
30254    fi
30255  fi
30256
30257
30258  if test "x$path" != "x$new_path"; then
30259    BUILD_JDK="$new_path"
30260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30261$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30262  fi
30263
30264    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30265
30266  path="$BUILD_JDK"
30267  has_colon=`$ECHO $path | $GREP ^.:`
30268  new_path="$path"
30269  if test "x$has_colon" = x; then
30270    # Not in mixed or Windows style, start by that.
30271    new_path=`cmd //c echo $path`
30272  fi
30273
30274
30275  input_path="$new_path"
30276  # Check if we need to convert this using DOS-style short mode. If the path
30277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30278  # take no chances and rewrite it.
30279  # Note: m4 eats our [], so we need to use [ and ] instead.
30280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30281  if test "x$has_forbidden_chars" != x; then
30282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30284  fi
30285
30286
30287  windows_path="$new_path"
30288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30289    unix_path=`$CYGPATH -u "$windows_path"`
30290    new_path="$unix_path"
30291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30293    new_path="$unix_path"
30294  fi
30295
30296  if test "x$path" != "x$new_path"; then
30297    BUILD_JDK="$new_path"
30298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30299$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30300  fi
30301
30302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30304
30305    else
30306      # We're on a unix platform. Hooray! :)
30307      path="$BUILD_JDK"
30308      has_space=`$ECHO "$path" | $GREP " "`
30309      if test "x$has_space" != x; then
30310        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30311$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30312        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30313      fi
30314
30315      # Use eval to expand a potential ~
30316      eval path="$path"
30317      if test ! -f "$path" && test ! -d "$path"; then
30318        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30319      fi
30320
30321      if test -d "$path"; then
30322        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30323      else
30324        dir="`$DIRNAME "$path"`"
30325        base="`$BASENAME "$path"`"
30326        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30327      fi
30328    fi
30329  fi
30330
30331          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30332$as_echo_n "checking for Build JDK... " >&6; }
30333          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30334$as_echo "$BUILD_JDK" >&6; }
30335          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30336$as_echo_n "checking Build JDK version... " >&6; }
30337          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30338          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30339$as_echo "$BUILD_JDK_VERSION" >&6; }
30340        fi # end check jdk version
30341      fi # end check java
30342    fi # end check build jdk found
30343  fi
30344
30345  else
30346    if test "x$COMPILE_TYPE" = "xcross"; then
30347      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30348      BUILD_JDK_FOUND=yes
30349      CREATE_BUILDJDK=true
30350      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30351$as_echo_n "checking for Build JDK... " >&6; }
30352      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30353$as_echo "yes, will build it for the host platform" >&6; }
30354    else
30355      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30356      BUILD_JDK_FOUND=yes
30357      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30358$as_echo_n "checking for Build JDK... " >&6; }
30359      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30360$as_echo "yes, will use output dir" >&6; }
30361    fi
30362  fi
30363
30364  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30366$as_echo_n "checking for Build JDK... " >&6; }
30367    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30368$as_echo "no" >&6; }
30369    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30370  fi
30371
30372
30373
30374
30375
30376###############################################################################
30377#
30378# Configure the sources to use. We can add or override individual directories.
30379#
30380###############################################################################
30381
30382
30383  # Where are the sources.
30384  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30385  CORBA_TOPDIR="$SRC_ROOT/corba"
30386  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30387  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30388  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30389  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30390  JDK_TOPDIR="$SRC_ROOT/jdk"
30391
30392
30393
30394
30395
30396
30397
30398
30399
30400  # This feature is no longer supported.
30401
30402
30403
30404# Check whether --with-add-source-root was given.
30405if test "${with_add_source_root+set}" = set; then :
30406  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
30407$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30408fi
30409
30410
30411
30412
30413# Check whether --with-override-source-root was given.
30414if test "${with_override_source_root+set}" = set; then :
30415  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
30416$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30417fi
30418
30419
30420
30421
30422# Check whether --with-adds-and-overrides was given.
30423if test "${with_adds_and_overrides+set}" = set; then :
30424  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
30425$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30426fi
30427
30428
30429
30430
30431# Check whether --with-override-langtools was given.
30432if test "${with_override_langtools+set}" = set; then :
30433  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30434$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30435fi
30436
30437
30438
30439
30440# Check whether --with-override-corba was given.
30441if test "${with_override_corba+set}" = set; then :
30442  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30443$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30444fi
30445
30446
30447
30448
30449# Check whether --with-override-jaxp was given.
30450if test "${with_override_jaxp+set}" = set; then :
30451  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30452$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30453fi
30454
30455
30456
30457
30458# Check whether --with-override-jaxws was given.
30459if test "${with_override_jaxws+set}" = set; then :
30460  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30461$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30462fi
30463
30464
30465
30466
30467# Check whether --with-override-hotspot was given.
30468if test "${with_override_hotspot+set}" = set; then :
30469  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30470$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30471fi
30472
30473
30474
30475
30476# Check whether --with-override-nashorn was given.
30477if test "${with_override_nashorn+set}" = set; then :
30478  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30479$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30480fi
30481
30482
30483
30484
30485# Check whether --with-override-jdk was given.
30486if test "${with_override_jdk+set}" = set; then :
30487  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30488$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30489fi
30490
30491
30492
30493
30494  BUILD_OUTPUT="$OUTPUT_ROOT"
30495
30496
30497  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30498  BUILD_HOTSPOT=true
30499
30500
30501
30502# Check whether --with-import-hotspot was given.
30503if test "${with_import_hotspot+set}" = set; then :
30504  withval=$with_import_hotspot;
30505fi
30506
30507  if test "x$with_import_hotspot" != x; then
30508    CURDIR="$PWD"
30509    cd "$with_import_hotspot"
30510    HOTSPOT_DIST="`pwd`"
30511    cd "$CURDIR"
30512    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
30513      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
30514    fi
30515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
30516$as_echo_n "checking if hotspot should be imported... " >&6; }
30517    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
30518$as_echo "yes from $HOTSPOT_DIST" >&6; }
30519    BUILD_HOTSPOT=false
30520  fi
30521
30522  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
30523
30524
30525
30526
30527# Check whether --with-import-modules was given.
30528if test "${with_import_modules+set}" = set; then :
30529  withval=$with_import_modules;
30530fi
30531
30532
30533  if test "x$with_import_modules" != x \
30534      && test "x$with_import_modules" != "xno"; then
30535    if test -d "$with_import_modules"; then
30536      IMPORT_MODULES_TOPDIR="$with_import_modules"
30537
30538  # Only process if variable expands to non-empty
30539
30540  if test "x$IMPORT_MODULES_TOPDIR" != x; then
30541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30542
30543  # Input might be given as Windows format, start by converting to
30544  # unix format.
30545  path="$IMPORT_MODULES_TOPDIR"
30546  new_path=`$CYGPATH -u "$path"`
30547
30548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30551  # "foo.exe" is OK but "foo" is an error.
30552  #
30553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30554  # It is also a way to make sure we got the proper file name for the real test later on.
30555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30556  if test "x$test_shortpath" = x; then
30557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30558$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30559    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
30560  fi
30561
30562  # Call helper function which possibly converts this using DOS-style short mode.
30563  # If so, the updated path is stored in $new_path.
30564
30565  input_path="$new_path"
30566  # Check if we need to convert this using DOS-style short mode. If the path
30567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30568  # take no chances and rewrite it.
30569  # Note: m4 eats our [], so we need to use [ and ] instead.
30570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30571  if test "x$has_forbidden_chars" != x; then
30572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30576      # Going to short mode and back again did indeed matter. Since short mode is
30577      # case insensitive, let's make it lowercase to improve readability.
30578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30579      # Now convert it back to Unix-style (cygpath)
30580      input_path=`$CYGPATH -u "$shortmode_path"`
30581      new_path="$input_path"
30582    fi
30583  fi
30584
30585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30586  if test "x$test_cygdrive_prefix" = x; then
30587    # As a simple fix, exclude /usr/bin since it's not a real path.
30588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30590      # a path prefixed by /cygdrive for fixpath to work.
30591      new_path="$CYGWIN_ROOT_PATH$input_path"
30592    fi
30593  fi
30594
30595
30596  if test "x$path" != "x$new_path"; then
30597    IMPORT_MODULES_TOPDIR="$new_path"
30598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30599$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30600  fi
30601
30602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30603
30604  path="$IMPORT_MODULES_TOPDIR"
30605  has_colon=`$ECHO $path | $GREP ^.:`
30606  new_path="$path"
30607  if test "x$has_colon" = x; then
30608    # Not in mixed or Windows style, start by that.
30609    new_path=`cmd //c echo $path`
30610  fi
30611
30612
30613  input_path="$new_path"
30614  # Check if we need to convert this using DOS-style short mode. If the path
30615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30616  # take no chances and rewrite it.
30617  # Note: m4 eats our [], so we need to use [ and ] instead.
30618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30619  if test "x$has_forbidden_chars" != x; then
30620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30622  fi
30623
30624
30625  windows_path="$new_path"
30626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30627    unix_path=`$CYGPATH -u "$windows_path"`
30628    new_path="$unix_path"
30629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30631    new_path="$unix_path"
30632  fi
30633
30634  if test "x$path" != "x$new_path"; then
30635    IMPORT_MODULES_TOPDIR="$new_path"
30636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30637$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30638  fi
30639
30640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30642
30643    else
30644      # We're on a unix platform. Hooray! :)
30645      path="$IMPORT_MODULES_TOPDIR"
30646      has_space=`$ECHO "$path" | $GREP " "`
30647      if test "x$has_space" != x; then
30648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30649$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30650        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30651      fi
30652
30653      # Use eval to expand a potential ~
30654      eval path="$path"
30655      if test ! -f "$path" && test ! -d "$path"; then
30656        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
30657      fi
30658
30659      if test -d "$path"; then
30660        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
30661      else
30662        dir="`$DIRNAME "$path"`"
30663        base="`$BASENAME "$path"`"
30664        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
30665      fi
30666    fi
30667  fi
30668
30669    elif test -e "$with_import_modules"; then
30670      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
30671      $RM -rf "$IMPORT_MODULES_TOPDIR"
30672      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
30673      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
30674        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30675      fi
30676    else
30677      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30678    fi
30679  fi
30680
30681  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
30682    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
30683  fi
30684  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
30685    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
30686  fi
30687  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
30688    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
30689  fi
30690  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
30691    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
30692  fi
30693  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
30694    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
30695  fi
30696  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
30697    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
30698  fi
30699
30700
30701
30702
30703
30704
30705
30706
30707
30708###############################################################################
30709#
30710# Setup the toolchain (compilers etc), i.e. tools used to compile and process
30711# native code.
30712#
30713###############################################################################
30714
30715# See if we are doing a complete static build or not
30716
30717  # Check whether --enable-static-build was given.
30718if test "${enable_static_build+set}" = set; then :
30719  enableval=$enable_static_build;
30720fi
30721
30722  STATIC_BUILD=false
30723  if test "x$enable_static_build" = "xyes"; then
30724    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30725$as_echo_n "checking if static build is enabled... " >&6; }
30726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30727$as_echo "yes" >&6; }
30728    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
30729      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
30730    fi
30731    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
30732    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
30733    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
30734    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30735    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30736    STATIC_BUILD=true
30737  elif test "x$enable_static_build" = "xno"; then
30738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30739$as_echo_n "checking if static build is enabled... " >&6; }
30740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30741$as_echo "no" >&6; }
30742  elif test "x$enable_static_build" != "x"; then
30743    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
30744  fi
30745
30746
30747
30748
30749# First determine the toolchain type (compiler family)
30750
30751
30752# Check whether --with-toolchain-type was given.
30753if test "${with_toolchain_type+set}" = set; then :
30754  withval=$with_toolchain_type;
30755fi
30756
30757
30758  # Use indirect variable referencing
30759  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
30760  VALID_TOOLCHAINS=${!toolchain_var_name}
30761
30762  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30763    if test -n "$XCODEBUILD"; then
30764      # On Mac OS X, default toolchain to clang after Xcode 5
30765      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
30766      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
30767      if test $? -ne 0; then
30768        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
30769      fi
30770      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
30771          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
30772          $CUT -f 1 -d .`
30773      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
30774$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
30775      if test $XCODE_MAJOR_VERSION -ge 5; then
30776          DEFAULT_TOOLCHAIN="clang"
30777      else
30778          DEFAULT_TOOLCHAIN="gcc"
30779      fi
30780    else
30781      # If Xcode is not installed, but the command line tools are
30782      # then we can't run xcodebuild. On these systems we should
30783      # default to clang
30784      DEFAULT_TOOLCHAIN="clang"
30785    fi
30786  else
30787    # First toolchain type in the list is the default
30788    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
30789  fi
30790
30791  if test "x$with_toolchain_type" = xlist; then
30792    # List all toolchains
30793    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
30794$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
30795    for toolchain in $VALID_TOOLCHAINS; do
30796      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
30797      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30798      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
30799    done
30800
30801    exit 0
30802  elif test "x$with_toolchain_type" != x; then
30803    # User override; check that it is valid
30804    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
30805      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
30806$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
30807      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
30808$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
30809      as_fn_error $? "Cannot continue." "$LINENO" 5
30810    fi
30811    TOOLCHAIN_TYPE=$with_toolchain_type
30812  else
30813    # No flag given, use default
30814    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
30815  fi
30816
30817
30818  TOOLCHAIN_CC_BINARY_clang="clang"
30819  TOOLCHAIN_CC_BINARY_gcc="gcc"
30820  TOOLCHAIN_CC_BINARY_microsoft="cl"
30821  TOOLCHAIN_CC_BINARY_solstudio="cc"
30822  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
30823
30824  TOOLCHAIN_CXX_BINARY_clang="clang++"
30825  TOOLCHAIN_CXX_BINARY_gcc="g++"
30826  TOOLCHAIN_CXX_BINARY_microsoft="cl"
30827  TOOLCHAIN_CXX_BINARY_solstudio="CC"
30828  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
30829
30830  # Use indirect variable referencing
30831  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
30832  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30833  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
30834  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
30835  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
30836  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
30837  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
30838  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
30839
30840
30841  # Define filename patterns
30842  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30843    LIBRARY_PREFIX=
30844    SHARED_LIBRARY_SUFFIX='.dll'
30845    STATIC_LIBRARY_SUFFIX='.lib'
30846    SHARED_LIBRARY='$1.dll'
30847    STATIC_LIBRARY='$1.lib'
30848    OBJ_SUFFIX='.obj'
30849    EXE_SUFFIX='.exe'
30850  else
30851    LIBRARY_PREFIX=lib
30852    SHARED_LIBRARY_SUFFIX='.so'
30853    STATIC_LIBRARY_SUFFIX='.a'
30854    SHARED_LIBRARY='lib$1.so'
30855    STATIC_LIBRARY='lib$1.a'
30856    OBJ_SUFFIX='.o'
30857    EXE_SUFFIX=''
30858    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30859      # For full static builds, we're overloading the SHARED_LIBRARY
30860      # variables in order to limit the amount of changes required.
30861      # It would be better to remove SHARED and just use LIBRARY and
30862      # LIBRARY_SUFFIX for libraries that can be built either
30863      # shared or static and use STATIC_* for libraries that are
30864      # always built statically.
30865      if test "x$STATIC_BUILD" = xtrue; then
30866        SHARED_LIBRARY='lib$1.a'
30867        SHARED_LIBRARY_SUFFIX='.a'
30868      else
30869        SHARED_LIBRARY='lib$1.dylib'
30870        SHARED_LIBRARY_SUFFIX='.dylib'
30871      fi
30872    fi
30873  fi
30874
30875
30876
30877
30878
30879
30880
30881
30882
30883
30884  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
30885    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
30886$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
30887  else
30888    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
30889$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
30890  fi
30891
30892
30893# User supplied flags should be used when configure detects compilers
30894
30895  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
30896    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
30897$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
30898  fi
30899
30900  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
30901    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
30902$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
30903  fi
30904
30905  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
30906    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
30907$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
30908  fi
30909
30910
30911# Check whether --with-extra-cflags was given.
30912if test "${with_extra_cflags+set}" = set; then :
30913  withval=$with_extra_cflags;
30914fi
30915
30916
30917
30918# Check whether --with-extra-cxxflags was given.
30919if test "${with_extra_cxxflags+set}" = set; then :
30920  withval=$with_extra_cxxflags;
30921fi
30922
30923
30924
30925# Check whether --with-extra-ldflags was given.
30926if test "${with_extra_ldflags+set}" = set; then :
30927  withval=$with_extra_ldflags;
30928fi
30929
30930
30931  EXTRA_CFLAGS="$with_extra_cflags"
30932  EXTRA_CXXFLAGS="$with_extra_cxxflags"
30933  EXTRA_LDFLAGS="$with_extra_ldflags"
30934
30935  # Hotspot needs these set in their legacy form
30936  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
30937  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
30938  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
30939
30940
30941
30942
30943
30944
30945
30946
30947
30948  # The global CFLAGS and LDLAGS variables are used by configure tests and
30949  # should include the extra parameters
30950  CFLAGS="$EXTRA_CFLAGS"
30951  CXXFLAGS="$EXTRA_CXXFLAGS"
30952  LDFLAGS="$EXTRA_LDFLAGS"
30953  CPPFLAGS=""
30954
30955# The sysroot cflags are needed for configure to be able to run the compilers
30956
30957  if test "x$SYSROOT" != "x"; then
30958    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30959      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30960        # Solaris Studio does not have a concept of sysroot. Instead we must
30961        # make sure the default include and lib dirs are appended to each
30962        # compile and link command line. Must also add -I-xbuiltin to enable
30963        # inlining of system functions and intrinsics.
30964        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
30965        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
30966            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
30967            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
30968      fi
30969    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
30970      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
30971      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
30972    elif test "x$TOOLCHAIN_TYPE" = xclang; then
30973      SYSROOT_CFLAGS="-isysroot $SYSROOT"
30974      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
30975    fi
30976    # Propagate the sysroot args to hotspot
30977    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
30978    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
30979    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
30980    # The global CFLAGS and LDFLAGS variables need these for configure to function
30981    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
30982    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
30983    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
30984    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
30985  fi
30986
30987  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30988    # We also need -iframework<path>/System/Library/Frameworks
30989    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30990    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30991    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
30992    # set this here so it doesn't have to be peppered throughout the forest
30993    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30994    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30995  fi
30996
30997
30998
30999
31000
31001# Then detect the actual binaries needed
31002
31003  # FIXME: Is this needed?
31004  ac_ext=cpp
31005ac_cpp='$CXXCPP $CPPFLAGS'
31006ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31007ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31008ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31009
31010
31011  # Store the CFLAGS etc passed to the configure script.
31012  ORG_CFLAGS="$CFLAGS"
31013  ORG_CXXFLAGS="$CXXFLAGS"
31014
31015  # autoconf magic only relies on PATH, so update it if tools dir is specified
31016  OLD_PATH="$PATH"
31017
31018  # On Windows, we need to detect the visual studio installation first.
31019  # This will change the PATH, but we need to keep that new PATH even
31020  # after toolchain detection is done, since the compiler (on x86) uses
31021  # it for DLL resolution in runtime.
31022  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31023      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31024
31025  # Store path to cygwin link.exe to help excluding it when searching for
31026  # VS linker. This must be done before changing the PATH when looking for VS.
31027  # Extract the first word of "link", so it can be a program name with args.
31028set dummy link; ac_word=$2
31029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31030$as_echo_n "checking for $ac_word... " >&6; }
31031if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31032  $as_echo_n "(cached) " >&6
31033else
31034  case $CYGWIN_LINK in
31035  [\\/]* | ?:[\\/]*)
31036  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31037  ;;
31038  *)
31039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31040for as_dir in $PATH
31041do
31042  IFS=$as_save_IFS
31043  test -z "$as_dir" && as_dir=.
31044    for ac_exec_ext in '' $ac_executable_extensions; do
31045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31046    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31048    break 2
31049  fi
31050done
31051  done
31052IFS=$as_save_IFS
31053
31054  ;;
31055esac
31056fi
31057CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31058if test -n "$CYGWIN_LINK"; then
31059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31060$as_echo "$CYGWIN_LINK" >&6; }
31061else
31062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31063$as_echo "no" >&6; }
31064fi
31065
31066
31067  if test "x$CYGWIN_LINK" != x; then
31068    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31069$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31070    "$CYGWIN_LINK" --version > /dev/null
31071    if test $? -eq 0 ; then
31072      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31073$as_echo "yes" >&6; }
31074    else
31075      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31076$as_echo "no" >&6; }
31077      # This might be the VS linker. Don't exclude it later on.
31078      CYGWIN_LINK=""
31079    fi
31080  fi
31081
31082  # First-hand choice is to locate and run the vsvars bat file.
31083
31084
31085# Check whether --with-toolchain-version was given.
31086if test "${with_toolchain_version+set}" = set; then :
31087  withval=$with_toolchain_version;
31088fi
31089
31090
31091  if test "x$with_toolchain_version" = xlist; then
31092    # List all toolchains
31093    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31094$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31095    for version in $VALID_VS_VERSIONS; do
31096      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31097      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31098    done
31099
31100    exit 0
31101  elif test "x$DEVKIT_VS_VERSION" != x; then
31102    VS_VERSION=$DEVKIT_VS_VERSION
31103    TOOLCHAIN_VERSION=$VS_VERSION
31104    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31105    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31106    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31107    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31108    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31109    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31110
31111    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31112    # can still be exported as INCLUDE for compiler invocations without
31113    # SYSROOT_CFLAGS
31114    OLDIFS="$IFS"
31115    IFS=";"
31116    for i in $DEVKIT_VS_INCLUDE; do
31117      ipath=$i
31118
31119  unix_path="$ipath"
31120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31121    windows_path=`$CYGPATH -m "$unix_path"`
31122    ipath="$windows_path"
31123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31124    windows_path=`cmd //c echo $unix_path`
31125    ipath="$windows_path"
31126  fi
31127
31128      VS_INCLUDE="$VS_INCLUDE;$ipath"
31129    done
31130    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31131    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31132    for i in $DEVKIT_VS_LIB; do
31133      libpath=$i
31134
31135  unix_path="$libpath"
31136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31137    windows_path=`$CYGPATH -m "$unix_path"`
31138    libpath="$windows_path"
31139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31140    windows_path=`cmd //c echo $unix_path`
31141    libpath="$windows_path"
31142  fi
31143
31144      VS_LIB="$VS_LIB;$libpath"
31145    done
31146    IFS="$OLDIFS"
31147
31148    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31149$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31150
31151  elif test "x$with_toolchain_version" != x; then
31152    # User override; check that it is valid
31153    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31154      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31155$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31156      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31157$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31158      as_fn_error $? "Cannot continue." "$LINENO" 5
31159    fi
31160    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31161  else
31162    # No flag given, use default
31163    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31164  fi
31165
31166  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31167
31168  VS_VERSION="$VS_VERSION"
31169  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31170  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31171  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31172  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31173
31174  # When using --with-tools-dir, assume it points to the correct and default
31175  # version of Visual Studio or that --with-toolchain-version was also set.
31176  if test "x$with_tools_dir" != x; then
31177
31178  if test "x$VS_ENV_CMD" = x; then
31179    VS_VERSION="${VS_VERSION}"
31180    VS_BASE="$with_tools_dir/../.."
31181    METHOD="--with-tools-dir"
31182
31183    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31184      VCVARSFILE="vc/bin/vcvars32.bat"
31185    else
31186      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31187    fi
31188
31189
31190  windows_path="$VS_BASE"
31191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31192    unix_path=`$CYGPATH -u "$windows_path"`
31193    VS_BASE="$unix_path"
31194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31196    VS_BASE="$unix_path"
31197  fi
31198
31199    if test -d "$VS_BASE"; then
31200      if test -f "$VS_BASE/$VCVARSFILE"; then
31201        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31202$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31203        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31204        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31205        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31206        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31207      else
31208        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31209$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31210        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31211$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31212      fi
31213    fi
31214  fi
31215
31216
31217  if test "x$VS_ENV_CMD" = x; then
31218    VS_VERSION="${VS_VERSION}"
31219    VS_BASE="$with_tools_dir/../../.."
31220    METHOD="--with-tools-dir"
31221
31222    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31223      VCVARSFILE="vc/bin/vcvars32.bat"
31224    else
31225      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31226    fi
31227
31228
31229  windows_path="$VS_BASE"
31230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31231    unix_path=`$CYGPATH -u "$windows_path"`
31232    VS_BASE="$unix_path"
31233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31235    VS_BASE="$unix_path"
31236  fi
31237
31238    if test -d "$VS_BASE"; then
31239      if test -f "$VS_BASE/$VCVARSFILE"; then
31240        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31241$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31242        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31243        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31244        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31245        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31246      else
31247        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31248$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31249        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31250$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31251      fi
31252    fi
31253  fi
31254
31255    if test "x$VS_ENV_CMD" = x; then
31256      # Having specified an argument which is incorrect will produce an instant failure;
31257      # we should not go on looking
31258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31259$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31260      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31261$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31262      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31263$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31264      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31265    fi
31266  fi
31267
31268  VS_ENV_CMD=""
31269  VS_ENV_ARGS=""
31270
31271  if test "x$VS_COMNTOOLS" != x; then
31272
31273  if test "x$VS_ENV_CMD" = x; then
31274    VS_VERSION="${VS_VERSION}"
31275    VS_BASE="$VS_COMNTOOLS/../.."
31276    METHOD="$VS_COMNTOOLS_VAR variable"
31277
31278    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31279      VCVARSFILE="vc/bin/vcvars32.bat"
31280    else
31281      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31282    fi
31283
31284
31285  windows_path="$VS_BASE"
31286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31287    unix_path=`$CYGPATH -u "$windows_path"`
31288    VS_BASE="$unix_path"
31289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31291    VS_BASE="$unix_path"
31292  fi
31293
31294    if test -d "$VS_BASE"; then
31295      if test -f "$VS_BASE/$VCVARSFILE"; then
31296        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31297$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31298        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31299        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31300        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31301        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31302      else
31303        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31304$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31305        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31306$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31307      fi
31308    fi
31309  fi
31310
31311  fi
31312  if test "x$PROGRAMFILES" != x; then
31313
31314  if test "x$VS_ENV_CMD" = x; then
31315    VS_VERSION="${VS_VERSION}"
31316    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31317    METHOD="well-known name"
31318
31319    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31320      VCVARSFILE="vc/bin/vcvars32.bat"
31321    else
31322      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31323    fi
31324
31325
31326  windows_path="$VS_BASE"
31327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31328    unix_path=`$CYGPATH -u "$windows_path"`
31329    VS_BASE="$unix_path"
31330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31332    VS_BASE="$unix_path"
31333  fi
31334
31335    if test -d "$VS_BASE"; then
31336      if test -f "$VS_BASE/$VCVARSFILE"; then
31337        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31338$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31339        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31340        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31341        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31342        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31343      else
31344        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31345$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31346        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31347$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31348      fi
31349    fi
31350  fi
31351
31352  fi
31353  # Work around the insanely named ProgramFiles(x86) env variable
31354  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31355  if test "x$PROGRAMFILES_X86" != x; then
31356
31357  if test "x$VS_ENV_CMD" = x; then
31358    VS_VERSION="${VS_VERSION}"
31359    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31360    METHOD="well-known name"
31361
31362    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31363      VCVARSFILE="vc/bin/vcvars32.bat"
31364    else
31365      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31366    fi
31367
31368
31369  windows_path="$VS_BASE"
31370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31371    unix_path=`$CYGPATH -u "$windows_path"`
31372    VS_BASE="$unix_path"
31373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31375    VS_BASE="$unix_path"
31376  fi
31377
31378    if test -d "$VS_BASE"; then
31379      if test -f "$VS_BASE/$VCVARSFILE"; then
31380        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31381$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31382        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31383        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31384        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31385        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31386      else
31387        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31388$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31389        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31390$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31391      fi
31392    fi
31393  fi
31394
31395  fi
31396
31397  if test "x$VS_ENV_CMD" = x; then
31398    VS_VERSION="${VS_VERSION}"
31399    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31400    METHOD="well-known name"
31401
31402    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31403      VCVARSFILE="vc/bin/vcvars32.bat"
31404    else
31405      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31406    fi
31407
31408
31409  windows_path="$VS_BASE"
31410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31411    unix_path=`$CYGPATH -u "$windows_path"`
31412    VS_BASE="$unix_path"
31413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31415    VS_BASE="$unix_path"
31416  fi
31417
31418    if test -d "$VS_BASE"; then
31419      if test -f "$VS_BASE/$VCVARSFILE"; then
31420        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31421$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31422        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31423        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31424        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31425        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31426      else
31427        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31428$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31429        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31430$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31431      fi
31432    fi
31433  fi
31434
31435
31436  if test "x$VS_ENV_CMD" = x; then
31437    VS_VERSION="${VS_VERSION}"
31438    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31439    METHOD="well-known name"
31440
31441    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31442      VCVARSFILE="vc/bin/vcvars32.bat"
31443    else
31444      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31445    fi
31446
31447
31448  windows_path="$VS_BASE"
31449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31450    unix_path=`$CYGPATH -u "$windows_path"`
31451    VS_BASE="$unix_path"
31452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31454    VS_BASE="$unix_path"
31455  fi
31456
31457    if test -d "$VS_BASE"; then
31458      if test -f "$VS_BASE/$VCVARSFILE"; then
31459        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31460$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31461        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31462        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31463        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31464        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31465      else
31466        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31467$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31468        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31469$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31470      fi
31471    fi
31472  fi
31473
31474
31475  if test "x$SDK_INSTALL_DIR" != x; then
31476    if test "x$ProgramW6432" != x; then
31477
31478  if test "x$VS_ENV_CMD" = x; then
31479    VS_VERSION="${VS_VERSION}"
31480    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31481    METHOD="well-known name"
31482
31483  windows_path="$WIN_SDK_BASE"
31484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31485    unix_path=`$CYGPATH -u "$windows_path"`
31486    WIN_SDK_BASE="$unix_path"
31487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31489    WIN_SDK_BASE="$unix_path"
31490  fi
31491
31492    if test -d "$WIN_SDK_BASE"; then
31493      # There have been cases of partial or broken SDK installations. A missing
31494      # lib dir is not going to work.
31495      if test ! -d "$WIN_SDK_BASE/lib"; then
31496        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31497$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31498        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31499$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31500      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31501        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31502$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31503        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31504        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31505          VS_ENV_ARGS="/x86"
31506        else
31507          VS_ENV_ARGS="/x64"
31508        fi
31509        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31510        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31511        # TODO: improve detection for other versions of SDK
31512        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31513      else
31514        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31515$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31516        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31517$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31518      fi
31519    fi
31520  fi
31521
31522    fi
31523    if test "x$PROGRAMW6432" != x; then
31524
31525  if test "x$VS_ENV_CMD" = x; then
31526    VS_VERSION="${VS_VERSION}"
31527    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
31528    METHOD="well-known name"
31529
31530  windows_path="$WIN_SDK_BASE"
31531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31532    unix_path=`$CYGPATH -u "$windows_path"`
31533    WIN_SDK_BASE="$unix_path"
31534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31536    WIN_SDK_BASE="$unix_path"
31537  fi
31538
31539    if test -d "$WIN_SDK_BASE"; then
31540      # There have been cases of partial or broken SDK installations. A missing
31541      # lib dir is not going to work.
31542      if test ! -d "$WIN_SDK_BASE/lib"; then
31543        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31544$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31545        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31546$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31547      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31548        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31549$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31550        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31551        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31552          VS_ENV_ARGS="/x86"
31553        else
31554          VS_ENV_ARGS="/x64"
31555        fi
31556        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31557        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31558        # TODO: improve detection for other versions of SDK
31559        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31560      else
31561        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31562$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31563        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31564$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31565      fi
31566    fi
31567  fi
31568
31569    fi
31570    if test "x$PROGRAMFILES" != x; then
31571
31572  if test "x$VS_ENV_CMD" = x; then
31573    VS_VERSION="${VS_VERSION}"
31574    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
31575    METHOD="well-known name"
31576
31577  windows_path="$WIN_SDK_BASE"
31578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31579    unix_path=`$CYGPATH -u "$windows_path"`
31580    WIN_SDK_BASE="$unix_path"
31581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31583    WIN_SDK_BASE="$unix_path"
31584  fi
31585
31586    if test -d "$WIN_SDK_BASE"; then
31587      # There have been cases of partial or broken SDK installations. A missing
31588      # lib dir is not going to work.
31589      if test ! -d "$WIN_SDK_BASE/lib"; then
31590        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31591$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31592        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31593$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31594      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31595        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31596$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31597        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31598        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31599          VS_ENV_ARGS="/x86"
31600        else
31601          VS_ENV_ARGS="/x64"
31602        fi
31603        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31604        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31605        # TODO: improve detection for other versions of SDK
31606        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31607      else
31608        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31609$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31610        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31611$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31612      fi
31613    fi
31614  fi
31615
31616    fi
31617
31618  if test "x$VS_ENV_CMD" = x; then
31619    VS_VERSION="${VS_VERSION}"
31620    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
31621    METHOD="well-known name"
31622
31623  windows_path="$WIN_SDK_BASE"
31624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31625    unix_path=`$CYGPATH -u "$windows_path"`
31626    WIN_SDK_BASE="$unix_path"
31627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31629    WIN_SDK_BASE="$unix_path"
31630  fi
31631
31632    if test -d "$WIN_SDK_BASE"; then
31633      # There have been cases of partial or broken SDK installations. A missing
31634      # lib dir is not going to work.
31635      if test ! -d "$WIN_SDK_BASE/lib"; then
31636        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31637$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31638        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31639$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31640      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31641        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31642$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31643        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31644        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31645          VS_ENV_ARGS="/x86"
31646        else
31647          VS_ENV_ARGS="/x64"
31648        fi
31649        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31650        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31651        # TODO: improve detection for other versions of SDK
31652        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31653      else
31654        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31655$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31656        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31657$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31658      fi
31659    fi
31660  fi
31661
31662
31663  if test "x$VS_ENV_CMD" = x; then
31664    VS_VERSION="${VS_VERSION}"
31665    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
31666    METHOD="well-known name"
31667
31668  windows_path="$WIN_SDK_BASE"
31669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31670    unix_path=`$CYGPATH -u "$windows_path"`
31671    WIN_SDK_BASE="$unix_path"
31672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31674    WIN_SDK_BASE="$unix_path"
31675  fi
31676
31677    if test -d "$WIN_SDK_BASE"; then
31678      # There have been cases of partial or broken SDK installations. A missing
31679      # lib dir is not going to work.
31680      if test ! -d "$WIN_SDK_BASE/lib"; then
31681        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31682$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31683        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31684$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31685      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31686        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31687$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31688        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31689        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31690          VS_ENV_ARGS="/x86"
31691        else
31692          VS_ENV_ARGS="/x64"
31693        fi
31694        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31695        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31696        # TODO: improve detection for other versions of SDK
31697        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31698      else
31699        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31700$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31701        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31702$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31703      fi
31704    fi
31705  fi
31706
31707  fi
31708
31709    if test "x$VS_ENV_CMD" != x; then
31710      TOOLCHAIN_VERSION=$VS_VERSION
31711      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31712      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31713      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31714      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31715      # The rest of the variables are already evaled while probing
31716      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
31717$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
31718      break
31719    fi
31720  done
31721
31722
31723  # If we have a devkit, skip all of the below.
31724  if test "x$DEVKIT_VS_VERSION" = x; then
31725    if test "x$VS_ENV_CMD" != x; then
31726      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
31727
31728  # Only process if variable expands to non-empty
31729
31730  if test "x$VS_ENV_CMD" != x; then
31731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31732
31733  # First separate the path from the arguments. This will split at the first
31734  # space.
31735  complete="$VS_ENV_CMD"
31736  path="${complete%% *}"
31737  tmp="$complete EOL"
31738  arguments="${tmp#* }"
31739
31740  # Input might be given as Windows format, start by converting to
31741  # unix format.
31742  new_path=`$CYGPATH -u "$path"`
31743
31744  # Now try to locate executable using which
31745  new_path=`$WHICH "$new_path" 2> /dev/null`
31746  # bat and cmd files are not always considered executable in cygwin causing which
31747  # to not find them
31748  if test "x$new_path" = x \
31749      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31750      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31751    new_path=`$CYGPATH -u "$path"`
31752  fi
31753  if test "x$new_path" = x; then
31754    # Oops. Which didn't find the executable.
31755    # The splitting of arguments from the executable at a space might have been incorrect,
31756    # since paths with space are more likely in Windows. Give it another try with the whole
31757    # argument.
31758    path="$complete"
31759    arguments="EOL"
31760    new_path=`$CYGPATH -u "$path"`
31761    new_path=`$WHICH "$new_path" 2> /dev/null`
31762    # bat and cmd files are not always considered executable in cygwin causing which
31763    # to not find them
31764    if test "x$new_path" = x \
31765        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31766        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31767      new_path=`$CYGPATH -u "$path"`
31768    fi
31769    if test "x$new_path" = x; then
31770      # It's still not found. Now this is an unrecoverable error.
31771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31772$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31773      has_space=`$ECHO "$complete" | $GREP " "`
31774      if test "x$has_space" != x; then
31775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31777      fi
31778      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31779    fi
31780  fi
31781
31782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31785  # "foo.exe" is OK but "foo" is an error.
31786  #
31787  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31788  # It is also a way to make sure we got the proper file name for the real test later on.
31789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31790  if test "x$test_shortpath" = x; then
31791    # Short path failed, file does not exist as specified.
31792    # Try adding .exe or .cmd
31793    if test -f "${new_path}.exe"; then
31794      input_to_shortpath="${new_path}.exe"
31795    elif test -f "${new_path}.cmd"; then
31796      input_to_shortpath="${new_path}.cmd"
31797    else
31798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
31799$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
31800      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31801$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31802      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31803    fi
31804  else
31805    input_to_shortpath="$new_path"
31806  fi
31807
31808  # Call helper function which possibly converts this using DOS-style short mode.
31809  # If so, the updated path is stored in $new_path.
31810  new_path="$input_to_shortpath"
31811
31812  input_path="$input_to_shortpath"
31813  # Check if we need to convert this using DOS-style short mode. If the path
31814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31815  # take no chances and rewrite it.
31816  # Note: m4 eats our [], so we need to use [ and ] instead.
31817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31818  if test "x$has_forbidden_chars" != x; then
31819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31823      # Going to short mode and back again did indeed matter. Since short mode is
31824      # case insensitive, let's make it lowercase to improve readability.
31825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31826      # Now convert it back to Unix-style (cygpath)
31827      input_path=`$CYGPATH -u "$shortmode_path"`
31828      new_path="$input_path"
31829    fi
31830  fi
31831
31832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31833  if test "x$test_cygdrive_prefix" = x; then
31834    # As a simple fix, exclude /usr/bin since it's not a real path.
31835    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31837      # a path prefixed by /cygdrive for fixpath to work.
31838      new_path="$CYGWIN_ROOT_PATH$input_path"
31839    fi
31840  fi
31841
31842  # remove trailing .exe if any
31843  new_path="${new_path/%.exe/}"
31844
31845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31846
31847  # First separate the path from the arguments. This will split at the first
31848  # space.
31849  complete="$VS_ENV_CMD"
31850  path="${complete%% *}"
31851  tmp="$complete EOL"
31852  arguments="${tmp#* }"
31853
31854  # Input might be given as Windows format, start by converting to
31855  # unix format.
31856  new_path="$path"
31857
31858  windows_path="$new_path"
31859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31860    unix_path=`$CYGPATH -u "$windows_path"`
31861    new_path="$unix_path"
31862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31864    new_path="$unix_path"
31865  fi
31866
31867
31868  # Now try to locate executable using which
31869  new_path=`$WHICH "$new_path" 2> /dev/null`
31870
31871  if test "x$new_path" = x; then
31872    # Oops. Which didn't find the executable.
31873    # The splitting of arguments from the executable at a space might have been incorrect,
31874    # since paths with space are more likely in Windows. Give it another try with the whole
31875    # argument.
31876    path="$complete"
31877    arguments="EOL"
31878    new_path="$path"
31879
31880  windows_path="$new_path"
31881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31882    unix_path=`$CYGPATH -u "$windows_path"`
31883    new_path="$unix_path"
31884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31886    new_path="$unix_path"
31887  fi
31888
31889
31890    new_path=`$WHICH "$new_path" 2> /dev/null`
31891    # bat and cmd files are not always considered executable in MSYS causing which
31892    # to not find them
31893    if test "x$new_path" = x \
31894        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31895        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31896      new_path="$path"
31897
31898  windows_path="$new_path"
31899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31900    unix_path=`$CYGPATH -u "$windows_path"`
31901    new_path="$unix_path"
31902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31904    new_path="$unix_path"
31905  fi
31906
31907    fi
31908
31909    if test "x$new_path" = x; then
31910      # It's still not found. Now this is an unrecoverable error.
31911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31912$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31913      has_space=`$ECHO "$complete" | $GREP " "`
31914      if test "x$has_space" != x; then
31915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31917      fi
31918      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31919    fi
31920  fi
31921
31922  # Now new_path has a complete unix path to the binary
31923  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31924    # Keep paths in /bin as-is, but remove trailing .exe if any
31925    new_path="${new_path/%.exe/}"
31926    # Do not save /bin paths to all_fixpath_prefixes!
31927  else
31928    # Not in mixed or Windows style, start by that.
31929    new_path=`cmd //c echo $new_path`
31930
31931  input_path="$new_path"
31932  # Check if we need to convert this using DOS-style short mode. If the path
31933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31934  # take no chances and rewrite it.
31935  # Note: m4 eats our [], so we need to use [ and ] instead.
31936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31937  if test "x$has_forbidden_chars" != x; then
31938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31940  fi
31941
31942    # Output is in $new_path
31943
31944  windows_path="$new_path"
31945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31946    unix_path=`$CYGPATH -u "$windows_path"`
31947    new_path="$unix_path"
31948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31950    new_path="$unix_path"
31951  fi
31952
31953    # remove trailing .exe if any
31954    new_path="${new_path/%.exe/}"
31955
31956    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31957    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31958  fi
31959
31960    else
31961      # We're on a unix platform. Hooray! :)
31962      # First separate the path from the arguments. This will split at the first
31963      # space.
31964      complete="$VS_ENV_CMD"
31965      path="${complete%% *}"
31966      tmp="$complete EOL"
31967      arguments="${tmp#* }"
31968
31969      # Cannot rely on the command "which" here since it doesn't always work.
31970      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31971      if test -z "$is_absolute_path"; then
31972        # Path to executable is not absolute. Find it.
31973        IFS_save="$IFS"
31974        IFS=:
31975        for p in $PATH; do
31976          if test -f "$p/$path" && test -x "$p/$path"; then
31977            new_path="$p/$path"
31978            break
31979          fi
31980        done
31981        IFS="$IFS_save"
31982      else
31983        # This is an absolute path, we can use it without further modifications.
31984        new_path="$path"
31985      fi
31986
31987      if test "x$new_path" = x; then
31988        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31989$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31990        has_space=`$ECHO "$complete" | $GREP " "`
31991        if test "x$has_space" != x; then
31992          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31993$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31994        fi
31995        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31996      fi
31997    fi
31998
31999    # Now join together the path and the arguments once again
32000    if test "x$arguments" != xEOL; then
32001      new_complete="$new_path ${arguments% *}"
32002    else
32003      new_complete="$new_path"
32004    fi
32005
32006    if test "x$complete" != "x$new_complete"; then
32007      VS_ENV_CMD="$new_complete"
32008      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32009$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32010    fi
32011  fi
32012
32013
32014      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32015      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32016$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32017
32018      # We need to create a couple of temporary files.
32019      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32020      $MKDIR -p $VS_ENV_TMP_DIR
32021
32022      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32023      # Instead create a shell script which will set the relevant variables when run.
32024      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32025
32026  unix_path="$WINPATH_VS_ENV_CMD"
32027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32028    windows_path=`$CYGPATH -m "$unix_path"`
32029    WINPATH_VS_ENV_CMD="$windows_path"
32030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32031    windows_path=`cmd //c echo $unix_path`
32032    WINPATH_VS_ENV_CMD="$windows_path"
32033  fi
32034
32035      WINPATH_BASH="$BASH"
32036
32037  unix_path="$WINPATH_BASH"
32038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32039    windows_path=`$CYGPATH -m "$unix_path"`
32040    WINPATH_BASH="$windows_path"
32041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32042    windows_path=`cmd //c echo $unix_path`
32043    WINPATH_BASH="$windows_path"
32044  fi
32045
32046
32047      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32048      # script (executable by bash) that will setup the important variables.
32049      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32050      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32051      # This will end up something like:
32052      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32053      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32054      # These will end up something like:
32055      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32056      # The trailing space for everyone except PATH is no typo, but is needed due
32057      # to trailing \ in the Windows paths. These will be stripped later.
32058      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32059          >> $EXTRACT_VC_ENV_BAT_FILE
32060      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32061          >> $EXTRACT_VC_ENV_BAT_FILE
32062      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32063          >> $EXTRACT_VC_ENV_BAT_FILE
32064      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32065          >> $EXTRACT_VC_ENV_BAT_FILE
32066      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32067          >> $EXTRACT_VC_ENV_BAT_FILE
32068      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32069          >> $EXTRACT_VC_ENV_BAT_FILE
32070
32071      # Now execute the newly created bat file.
32072      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32073      # Change directory so we don't need to mess with Windows paths in redirects.
32074      cd $VS_ENV_TMP_DIR
32075      cmd /c extract-vs-env.bat | $CAT
32076      cd $CURDIR
32077
32078      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32079        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32080$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32081        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32082$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32083        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32084$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32085        as_fn_error $? "Cannot continue" "$LINENO" 5
32086      fi
32087
32088      # Now set all paths and other env variables. This will allow the rest of
32089      # the configure script to find and run the compiler in the proper way.
32090      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32091$as_echo "$as_me: Setting extracted environment variables" >&6;}
32092      . $VS_ENV_TMP_DIR/set-vs-env.sh
32093      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32094      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32095    else
32096      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32097      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32098$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32099    fi
32100  fi
32101
32102  # At this point, we should have correct variables in the environment, or we can't continue.
32103  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32104$as_echo_n "checking for Visual Studio variables... " >&6; }
32105
32106  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32107      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32108    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32110$as_echo "present but broken" >&6; }
32111      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32112    else
32113      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32114$as_echo "ok" >&6; }
32115      # Remove any trailing "\" ";" and " " from the variables.
32116      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32117      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32118      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32119      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32120      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32121      # Remove any paths containing # (typically F#) as that messes up make. This
32122      # is needed if visual studio was installed with F# support.
32123      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32124
32125
32126
32127
32128
32129      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32130      OLDIFS="$IFS"
32131      IFS=";"
32132      for i in $VS_INCLUDE; do
32133        ipath=$i
32134        # Only process non-empty elements
32135        if test "x$ipath" != x; then
32136          IFS="$OLDIFS"
32137          # Check that directory exists before calling fixup_path
32138          testpath=$ipath
32139
32140  windows_path="$testpath"
32141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32142    unix_path=`$CYGPATH -u "$windows_path"`
32143    testpath="$unix_path"
32144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32146    testpath="$unix_path"
32147  fi
32148
32149          if test -d "$testpath"; then
32150
32151  # Only process if variable expands to non-empty
32152
32153  if test "x$ipath" != x; then
32154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32155
32156  # Input might be given as Windows format, start by converting to
32157  # unix format.
32158  path="$ipath"
32159  new_path=`$CYGPATH -u "$path"`
32160
32161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32164  # "foo.exe" is OK but "foo" is an error.
32165  #
32166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32167  # It is also a way to make sure we got the proper file name for the real test later on.
32168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32169  if test "x$test_shortpath" = x; then
32170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32171$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32172    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32173  fi
32174
32175  # Call helper function which possibly converts this using DOS-style short mode.
32176  # If so, the updated path is stored in $new_path.
32177
32178  input_path="$new_path"
32179  # Check if we need to convert this using DOS-style short mode. If the path
32180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32181  # take no chances and rewrite it.
32182  # Note: m4 eats our [], so we need to use [ and ] instead.
32183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32184  if test "x$has_forbidden_chars" != x; then
32185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32189      # Going to short mode and back again did indeed matter. Since short mode is
32190      # case insensitive, let's make it lowercase to improve readability.
32191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32192      # Now convert it back to Unix-style (cygpath)
32193      input_path=`$CYGPATH -u "$shortmode_path"`
32194      new_path="$input_path"
32195    fi
32196  fi
32197
32198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32199  if test "x$test_cygdrive_prefix" = x; then
32200    # As a simple fix, exclude /usr/bin since it's not a real path.
32201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32203      # a path prefixed by /cygdrive for fixpath to work.
32204      new_path="$CYGWIN_ROOT_PATH$input_path"
32205    fi
32206  fi
32207
32208
32209  if test "x$path" != "x$new_path"; then
32210    ipath="$new_path"
32211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32212$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32213  fi
32214
32215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32216
32217  path="$ipath"
32218  has_colon=`$ECHO $path | $GREP ^.:`
32219  new_path="$path"
32220  if test "x$has_colon" = x; then
32221    # Not in mixed or Windows style, start by that.
32222    new_path=`cmd //c echo $path`
32223  fi
32224
32225
32226  input_path="$new_path"
32227  # Check if we need to convert this using DOS-style short mode. If the path
32228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32229  # take no chances and rewrite it.
32230  # Note: m4 eats our [], so we need to use [ and ] instead.
32231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32232  if test "x$has_forbidden_chars" != x; then
32233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32235  fi
32236
32237
32238  windows_path="$new_path"
32239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32240    unix_path=`$CYGPATH -u "$windows_path"`
32241    new_path="$unix_path"
32242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32244    new_path="$unix_path"
32245  fi
32246
32247  if test "x$path" != "x$new_path"; then
32248    ipath="$new_path"
32249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32250$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32251  fi
32252
32253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32255
32256    else
32257      # We're on a unix platform. Hooray! :)
32258      path="$ipath"
32259      has_space=`$ECHO "$path" | $GREP " "`
32260      if test "x$has_space" != x; then
32261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32262$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32263        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32264      fi
32265
32266      # Use eval to expand a potential ~
32267      eval path="$path"
32268      if test ! -f "$path" && test ! -d "$path"; then
32269        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32270      fi
32271
32272      if test -d "$path"; then
32273        ipath="`cd "$path"; $THEPWDCMD -L`"
32274      else
32275        dir="`$DIRNAME "$path"`"
32276        base="`$BASENAME "$path"`"
32277        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32278      fi
32279    fi
32280  fi
32281
32282            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32283          fi
32284          IFS=";"
32285        fi
32286      done
32287      # Convert VS_LIB into SYSROOT_LDFLAGS
32288      for i in $VS_LIB; do
32289        libpath=$i
32290        # Only process non-empty elements
32291        if test "x$libpath" != x; then
32292          IFS="$OLDIFS"
32293          # Check that directory exists before calling fixup_path
32294          testpath=$libpath
32295
32296  windows_path="$testpath"
32297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32298    unix_path=`$CYGPATH -u "$windows_path"`
32299    testpath="$unix_path"
32300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32302    testpath="$unix_path"
32303  fi
32304
32305          if test -d "$testpath"; then
32306
32307  # Only process if variable expands to non-empty
32308
32309  if test "x$libpath" != x; then
32310    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32311
32312  # Input might be given as Windows format, start by converting to
32313  # unix format.
32314  path="$libpath"
32315  new_path=`$CYGPATH -u "$path"`
32316
32317  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32318  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32319  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32320  # "foo.exe" is OK but "foo" is an error.
32321  #
32322  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32323  # It is also a way to make sure we got the proper file name for the real test later on.
32324  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32325  if test "x$test_shortpath" = x; then
32326    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32327$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32328    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32329  fi
32330
32331  # Call helper function which possibly converts this using DOS-style short mode.
32332  # If so, the updated path is stored in $new_path.
32333
32334  input_path="$new_path"
32335  # Check if we need to convert this using DOS-style short mode. If the path
32336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32337  # take no chances and rewrite it.
32338  # Note: m4 eats our [], so we need to use [ and ] instead.
32339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32340  if test "x$has_forbidden_chars" != x; then
32341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32342    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32343    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32344    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32345      # Going to short mode and back again did indeed matter. Since short mode is
32346      # case insensitive, let's make it lowercase to improve readability.
32347      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32348      # Now convert it back to Unix-style (cygpath)
32349      input_path=`$CYGPATH -u "$shortmode_path"`
32350      new_path="$input_path"
32351    fi
32352  fi
32353
32354  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32355  if test "x$test_cygdrive_prefix" = x; then
32356    # As a simple fix, exclude /usr/bin since it's not a real path.
32357    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32358      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32359      # a path prefixed by /cygdrive for fixpath to work.
32360      new_path="$CYGWIN_ROOT_PATH$input_path"
32361    fi
32362  fi
32363
32364
32365  if test "x$path" != "x$new_path"; then
32366    libpath="$new_path"
32367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32368$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32369  fi
32370
32371    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32372
32373  path="$libpath"
32374  has_colon=`$ECHO $path | $GREP ^.:`
32375  new_path="$path"
32376  if test "x$has_colon" = x; then
32377    # Not in mixed or Windows style, start by that.
32378    new_path=`cmd //c echo $path`
32379  fi
32380
32381
32382  input_path="$new_path"
32383  # Check if we need to convert this using DOS-style short mode. If the path
32384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32385  # take no chances and rewrite it.
32386  # Note: m4 eats our [], so we need to use [ and ] instead.
32387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32388  if test "x$has_forbidden_chars" != x; then
32389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32391  fi
32392
32393
32394  windows_path="$new_path"
32395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32396    unix_path=`$CYGPATH -u "$windows_path"`
32397    new_path="$unix_path"
32398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32400    new_path="$unix_path"
32401  fi
32402
32403  if test "x$path" != "x$new_path"; then
32404    libpath="$new_path"
32405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32406$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32407  fi
32408
32409  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32410  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32411
32412    else
32413      # We're on a unix platform. Hooray! :)
32414      path="$libpath"
32415      has_space=`$ECHO "$path" | $GREP " "`
32416      if test "x$has_space" != x; then
32417        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32418$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32419        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32420      fi
32421
32422      # Use eval to expand a potential ~
32423      eval path="$path"
32424      if test ! -f "$path" && test ! -d "$path"; then
32425        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32426      fi
32427
32428      if test -d "$path"; then
32429        libpath="`cd "$path"; $THEPWDCMD -L`"
32430      else
32431        dir="`$DIRNAME "$path"`"
32432        base="`$BASENAME "$path"`"
32433        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32434      fi
32435    fi
32436  fi
32437
32438            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32439          fi
32440          IFS=";"
32441        fi
32442      done
32443      IFS="$OLDIFS"
32444    fi
32445  else
32446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32447$as_echo "not found" >&6; }
32448
32449    if test "x$VS_ENV_CMD" = x; then
32450      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32451$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32452      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32453$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32454    else
32455      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32456$as_echo "$as_me: Running the extraction script failed." >&6;}
32457    fi
32458    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32459$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32460    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32461$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32462    as_fn_error $? "Cannot continue" "$LINENO" 5
32463  fi
32464
32465    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32466    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32467    PATH="$VS_PATH"
32468    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32469    export INCLUDE="$VS_INCLUDE"
32470    export LIB="$VS_LIB"
32471  else
32472    if test "x$XCODE_VERSION_OUTPUT" != x; then
32473      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32474      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32475      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32476    else
32477      # Currently we do not define this for other toolchains. This might change as the need arise.
32478      TOOLCHAIN_VERSION=
32479    fi
32480  fi
32481
32482
32483  # For solaris we really need solaris tools, and not the GNU equivalent.
32484  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32485  # so add that to path before starting to probe.
32486  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32487  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32488    PATH="/usr/ccs/bin:$PATH"
32489  fi
32490
32491  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32492  # override all other locations.
32493  if test "x$TOOLCHAIN_PATH" != x; then
32494    PATH=$TOOLCHAIN_PATH:$PATH
32495  fi
32496
32497
32498  #
32499  # Setup the compilers (CC and CXX)
32500  #
32501
32502  COMPILER_NAME=C
32503  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32504
32505  if test "x$CC" != x; then
32506    # User has supplied compiler name already, always let that override.
32507    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32508$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32509    if test "x`basename $CC`" = "x$CC"; then
32510      # A command without a complete path is provided, search $PATH.
32511
32512      for ac_prog in $CC
32513do
32514  # Extract the first word of "$ac_prog", so it can be a program name with args.
32515set dummy $ac_prog; ac_word=$2
32516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32517$as_echo_n "checking for $ac_word... " >&6; }
32518if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32519  $as_echo_n "(cached) " >&6
32520else
32521  case $POTENTIAL_CC in
32522  [\\/]* | ?:[\\/]*)
32523  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32524  ;;
32525  *)
32526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32527for as_dir in $PATH
32528do
32529  IFS=$as_save_IFS
32530  test -z "$as_dir" && as_dir=.
32531    for ac_exec_ext in '' $ac_executable_extensions; do
32532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32533    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32535    break 2
32536  fi
32537done
32538  done
32539IFS=$as_save_IFS
32540
32541  ;;
32542esac
32543fi
32544POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32545if test -n "$POTENTIAL_CC"; then
32546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32547$as_echo "$POTENTIAL_CC" >&6; }
32548else
32549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32550$as_echo "no" >&6; }
32551fi
32552
32553
32554  test -n "$POTENTIAL_CC" && break
32555done
32556
32557      if test "x$POTENTIAL_CC" != x; then
32558        CC=$POTENTIAL_CC
32559      else
32560        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
32561      fi
32562    else
32563      # Otherwise it might already be a complete path
32564      if test ! -x "$CC"; then
32565        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
32566      fi
32567    fi
32568  else
32569    # No user supplied value. Locate compiler ourselves.
32570
32571    # If we are cross compiling, assume cross compilation tools follows the
32572    # cross compilation standard where they are prefixed with the autoconf
32573    # standard name for the target. For example the binary
32574    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32575    # If we are not cross compiling, then the default compiler name will be
32576    # used.
32577
32578    CC=
32579    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32580    # before checking the rest of the PATH.
32581    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32582    # step, this should not be necessary.
32583    if test -n "$TOOLCHAIN_PATH"; then
32584      PATH_save="$PATH"
32585      PATH="$TOOLCHAIN_PATH"
32586      for ac_prog in $SEARCH_LIST
32587do
32588  # Extract the first word of "$ac_prog", so it can be a program name with args.
32589set dummy $ac_prog; ac_word=$2
32590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32591$as_echo_n "checking for $ac_word... " >&6; }
32592if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
32593  $as_echo_n "(cached) " >&6
32594else
32595  case $TOOLCHAIN_PATH_CC in
32596  [\\/]* | ?:[\\/]*)
32597  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
32598  ;;
32599  *)
32600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32601for as_dir in $PATH
32602do
32603  IFS=$as_save_IFS
32604  test -z "$as_dir" && as_dir=.
32605    for ac_exec_ext in '' $ac_executable_extensions; do
32606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32607    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
32608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32609    break 2
32610  fi
32611done
32612  done
32613IFS=$as_save_IFS
32614
32615  ;;
32616esac
32617fi
32618TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
32619if test -n "$TOOLCHAIN_PATH_CC"; then
32620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
32621$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
32622else
32623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32624$as_echo "no" >&6; }
32625fi
32626
32627
32628  test -n "$TOOLCHAIN_PATH_CC" && break
32629done
32630
32631      CC=$TOOLCHAIN_PATH_CC
32632      PATH="$PATH_save"
32633    fi
32634
32635    # AC_PATH_PROGS can't be run multiple times with the same variable,
32636    # so create a new name for this run.
32637    if test "x$CC" = x; then
32638      for ac_prog in $SEARCH_LIST
32639do
32640  # Extract the first word of "$ac_prog", so it can be a program name with args.
32641set dummy $ac_prog; ac_word=$2
32642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32643$as_echo_n "checking for $ac_word... " >&6; }
32644if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32645  $as_echo_n "(cached) " >&6
32646else
32647  case $POTENTIAL_CC in
32648  [\\/]* | ?:[\\/]*)
32649  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32650  ;;
32651  *)
32652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32653for as_dir in $PATH
32654do
32655  IFS=$as_save_IFS
32656  test -z "$as_dir" && as_dir=.
32657    for ac_exec_ext in '' $ac_executable_extensions; do
32658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32659    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32661    break 2
32662  fi
32663done
32664  done
32665IFS=$as_save_IFS
32666
32667  ;;
32668esac
32669fi
32670POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32671if test -n "$POTENTIAL_CC"; then
32672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32673$as_echo "$POTENTIAL_CC" >&6; }
32674else
32675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32676$as_echo "no" >&6; }
32677fi
32678
32679
32680  test -n "$POTENTIAL_CC" && break
32681done
32682
32683      CC=$POTENTIAL_CC
32684    fi
32685
32686    if test "x$CC" = x; then
32687
32688  # Print a helpful message on how to acquire the necessary build dependency.
32689  # devkit is the help tag: freetype, cups, alsa etc
32690  MISSING_DEPENDENCY=devkit
32691
32692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32693    cygwin_help $MISSING_DEPENDENCY
32694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32695    msys_help $MISSING_DEPENDENCY
32696  else
32697    PKGHANDLER_COMMAND=
32698
32699    case $PKGHANDLER in
32700      apt-get)
32701        apt_help     $MISSING_DEPENDENCY ;;
32702      yum)
32703        yum_help     $MISSING_DEPENDENCY ;;
32704      port)
32705        port_help    $MISSING_DEPENDENCY ;;
32706      pkgutil)
32707        pkgutil_help $MISSING_DEPENDENCY ;;
32708      pkgadd)
32709        pkgadd_help  $MISSING_DEPENDENCY ;;
32710    esac
32711
32712    if test "x$PKGHANDLER_COMMAND" != x; then
32713      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32714    fi
32715  fi
32716
32717      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32718    fi
32719  fi
32720
32721  # Now we have a compiler binary in CC. Make sure it's okay.
32722
32723  # Only process if variable expands to non-empty
32724
32725  if test "x$CC" != x; then
32726    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32727
32728  # First separate the path from the arguments. This will split at the first
32729  # space.
32730  complete="$CC"
32731  path="${complete%% *}"
32732  tmp="$complete EOL"
32733  arguments="${tmp#* }"
32734
32735  # Input might be given as Windows format, start by converting to
32736  # unix format.
32737  new_path=`$CYGPATH -u "$path"`
32738
32739  # Now try to locate executable using which
32740  new_path=`$WHICH "$new_path" 2> /dev/null`
32741  # bat and cmd files are not always considered executable in cygwin causing which
32742  # to not find them
32743  if test "x$new_path" = x \
32744      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32745      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32746    new_path=`$CYGPATH -u "$path"`
32747  fi
32748  if test "x$new_path" = x; then
32749    # Oops. Which didn't find the executable.
32750    # The splitting of arguments from the executable at a space might have been incorrect,
32751    # since paths with space are more likely in Windows. Give it another try with the whole
32752    # argument.
32753    path="$complete"
32754    arguments="EOL"
32755    new_path=`$CYGPATH -u "$path"`
32756    new_path=`$WHICH "$new_path" 2> /dev/null`
32757    # bat and cmd files are not always considered executable in cygwin causing which
32758    # to not find them
32759    if test "x$new_path" = x \
32760        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32761        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32762      new_path=`$CYGPATH -u "$path"`
32763    fi
32764    if test "x$new_path" = x; then
32765      # It's still not found. Now this is an unrecoverable error.
32766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32767$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32768      has_space=`$ECHO "$complete" | $GREP " "`
32769      if test "x$has_space" != x; then
32770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32772      fi
32773      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32774    fi
32775  fi
32776
32777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32780  # "foo.exe" is OK but "foo" is an error.
32781  #
32782  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32783  # It is also a way to make sure we got the proper file name for the real test later on.
32784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32785  if test "x$test_shortpath" = x; then
32786    # Short path failed, file does not exist as specified.
32787    # Try adding .exe or .cmd
32788    if test -f "${new_path}.exe"; then
32789      input_to_shortpath="${new_path}.exe"
32790    elif test -f "${new_path}.cmd"; then
32791      input_to_shortpath="${new_path}.cmd"
32792    else
32793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
32794$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
32795      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32796$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32797      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32798    fi
32799  else
32800    input_to_shortpath="$new_path"
32801  fi
32802
32803  # Call helper function which possibly converts this using DOS-style short mode.
32804  # If so, the updated path is stored in $new_path.
32805  new_path="$input_to_shortpath"
32806
32807  input_path="$input_to_shortpath"
32808  # Check if we need to convert this using DOS-style short mode. If the path
32809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32810  # take no chances and rewrite it.
32811  # Note: m4 eats our [], so we need to use [ and ] instead.
32812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32813  if test "x$has_forbidden_chars" != x; then
32814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32818      # Going to short mode and back again did indeed matter. Since short mode is
32819      # case insensitive, let's make it lowercase to improve readability.
32820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32821      # Now convert it back to Unix-style (cygpath)
32822      input_path=`$CYGPATH -u "$shortmode_path"`
32823      new_path="$input_path"
32824    fi
32825  fi
32826
32827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32828  if test "x$test_cygdrive_prefix" = x; then
32829    # As a simple fix, exclude /usr/bin since it's not a real path.
32830    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32832      # a path prefixed by /cygdrive for fixpath to work.
32833      new_path="$CYGWIN_ROOT_PATH$input_path"
32834    fi
32835  fi
32836
32837  # remove trailing .exe if any
32838  new_path="${new_path/%.exe/}"
32839
32840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32841
32842  # First separate the path from the arguments. This will split at the first
32843  # space.
32844  complete="$CC"
32845  path="${complete%% *}"
32846  tmp="$complete EOL"
32847  arguments="${tmp#* }"
32848
32849  # Input might be given as Windows format, start by converting to
32850  # unix format.
32851  new_path="$path"
32852
32853  windows_path="$new_path"
32854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32855    unix_path=`$CYGPATH -u "$windows_path"`
32856    new_path="$unix_path"
32857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32859    new_path="$unix_path"
32860  fi
32861
32862
32863  # Now try to locate executable using which
32864  new_path=`$WHICH "$new_path" 2> /dev/null`
32865
32866  if test "x$new_path" = x; then
32867    # Oops. Which didn't find the executable.
32868    # The splitting of arguments from the executable at a space might have been incorrect,
32869    # since paths with space are more likely in Windows. Give it another try with the whole
32870    # argument.
32871    path="$complete"
32872    arguments="EOL"
32873    new_path="$path"
32874
32875  windows_path="$new_path"
32876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32877    unix_path=`$CYGPATH -u "$windows_path"`
32878    new_path="$unix_path"
32879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32881    new_path="$unix_path"
32882  fi
32883
32884
32885    new_path=`$WHICH "$new_path" 2> /dev/null`
32886    # bat and cmd files are not always considered executable in MSYS causing which
32887    # to not find them
32888    if test "x$new_path" = x \
32889        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32890        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32891      new_path="$path"
32892
32893  windows_path="$new_path"
32894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32895    unix_path=`$CYGPATH -u "$windows_path"`
32896    new_path="$unix_path"
32897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32899    new_path="$unix_path"
32900  fi
32901
32902    fi
32903
32904    if test "x$new_path" = x; then
32905      # It's still not found. Now this is an unrecoverable error.
32906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32907$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32908      has_space=`$ECHO "$complete" | $GREP " "`
32909      if test "x$has_space" != x; then
32910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32912      fi
32913      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32914    fi
32915  fi
32916
32917  # Now new_path has a complete unix path to the binary
32918  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32919    # Keep paths in /bin as-is, but remove trailing .exe if any
32920    new_path="${new_path/%.exe/}"
32921    # Do not save /bin paths to all_fixpath_prefixes!
32922  else
32923    # Not in mixed or Windows style, start by that.
32924    new_path=`cmd //c echo $new_path`
32925
32926  input_path="$new_path"
32927  # Check if we need to convert this using DOS-style short mode. If the path
32928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32929  # take no chances and rewrite it.
32930  # Note: m4 eats our [], so we need to use [ and ] instead.
32931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32932  if test "x$has_forbidden_chars" != x; then
32933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32935  fi
32936
32937    # Output is in $new_path
32938
32939  windows_path="$new_path"
32940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32941    unix_path=`$CYGPATH -u "$windows_path"`
32942    new_path="$unix_path"
32943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32945    new_path="$unix_path"
32946  fi
32947
32948    # remove trailing .exe if any
32949    new_path="${new_path/%.exe/}"
32950
32951    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32952    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32953  fi
32954
32955    else
32956      # We're on a unix platform. Hooray! :)
32957      # First separate the path from the arguments. This will split at the first
32958      # space.
32959      complete="$CC"
32960      path="${complete%% *}"
32961      tmp="$complete EOL"
32962      arguments="${tmp#* }"
32963
32964      # Cannot rely on the command "which" here since it doesn't always work.
32965      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32966      if test -z "$is_absolute_path"; then
32967        # Path to executable is not absolute. Find it.
32968        IFS_save="$IFS"
32969        IFS=:
32970        for p in $PATH; do
32971          if test -f "$p/$path" && test -x "$p/$path"; then
32972            new_path="$p/$path"
32973            break
32974          fi
32975        done
32976        IFS="$IFS_save"
32977      else
32978        # This is an absolute path, we can use it without further modifications.
32979        new_path="$path"
32980      fi
32981
32982      if test "x$new_path" = x; then
32983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32984$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32985        has_space=`$ECHO "$complete" | $GREP " "`
32986        if test "x$has_space" != x; then
32987          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32988$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32989        fi
32990        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32991      fi
32992    fi
32993
32994    # Now join together the path and the arguments once again
32995    if test "x$arguments" != xEOL; then
32996      new_complete="$new_path ${arguments% *}"
32997    else
32998      new_complete="$new_path"
32999    fi
33000
33001    if test "x$complete" != "x$new_complete"; then
33002      CC="$new_complete"
33003      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33004$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33005    fi
33006  fi
33007
33008  TEST_COMPILER="$CC"
33009
33010  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33011$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33012  SYMLINK_ORIGINAL="$TEST_COMPILER"
33013
33014  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33015    # Follow a chain of symbolic links. Use readlink
33016    # where it exists, else fall back to horribly
33017    # complicated shell code.
33018    if test "x$READLINK_TESTED" != yes; then
33019      # On MacOSX there is a readlink tool with a different
33020      # purpose than the GNU readlink tool. Check the found readlink.
33021      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33022      if test "x$ISGNU" = x; then
33023        # A readlink that we do not know how to use.
33024        # Are there other non-GNU readlinks out there?
33025        READLINK_TESTED=yes
33026        READLINK=
33027      fi
33028    fi
33029
33030    if test "x$READLINK" != x; then
33031      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33032    else
33033      # Save the current directory for restoring afterwards
33034      STARTDIR=$PWD
33035      COUNTER=0
33036      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33037      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33038      cd $sym_link_dir
33039      # Use -P flag to resolve symlinks in directories.
33040      cd `$THEPWDCMD -P`
33041      sym_link_dir=`$THEPWDCMD -P`
33042      # Resolve file symlinks
33043      while test $COUNTER -lt 20; do
33044        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33045        if test "x$ISLINK" == x; then
33046          # This is not a symbolic link! We are done!
33047          break
33048        fi
33049        # Again resolve directory symlinks since the target of the just found
33050        # link could be in a different directory
33051        cd `$DIRNAME $ISLINK`
33052        sym_link_dir=`$THEPWDCMD -P`
33053        sym_link_file=`$BASENAME $ISLINK`
33054        let COUNTER=COUNTER+1
33055      done
33056      cd $STARTDIR
33057      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33058    fi
33059  fi
33060
33061  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33063$as_echo "no symlink" >&6; }
33064  else
33065    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33066$as_echo "$SYMLINK_ORIGINAL" >&6; }
33067
33068    # We can't handle ccache by gcc wrappers, since we need to know if we're
33069    # using ccache. Instead ccache usage must be controlled by a configure option.
33070    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33071    if test "x$COMPILER_BASENAME" = "xccache"; then
33072      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33073$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33074      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33075    fi
33076  fi
33077
33078
33079  COMPILER=$CC
33080  COMPILER_NAME=$COMPILER_NAME
33081
33082  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33083    # cc -V output typically looks like
33084    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33085    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33086    # Check that this is likely to be the Solaris Studio cc.
33087    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33088    if test $? -ne 0; then
33089      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33090      { $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
33091$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33092      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33093$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33094      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33095$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33096      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33097    fi
33098    # Remove usage instructions (if present), and
33099    # collapse compiler output into a single line
33100    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33101        $SED -e 's/ *[Uu]sage:.*//'`
33102    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33103        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33104  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33105    # xlc -qversion output typically looks like
33106    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33107    #     Version: 11.01.0000.0015
33108    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33109    # Check that this is likely to be the IBM XL C compiler.
33110    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33111    if test $? -ne 0; then
33112      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33113      { $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
33114$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33115      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33116$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33117      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33118$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33119      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33120    fi
33121    # Collapse compiler output into a single line
33122    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33123    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33124        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33125  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33126    # There is no specific version flag, but all output starts with a version string.
33127    # First line typically looks something like:
33128    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33129    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33130    # Check that this is likely to be Microsoft CL.EXE.
33131    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33132    if test $? -ne 0; then
33133      { $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
33134$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33135      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33136$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33137      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33138    fi
33139    # Collapse compiler output into a single line
33140    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33141    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33142        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33143  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33144    # gcc --version output typically looks like
33145    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33146    #     Copyright (C) 2013 Free Software Foundation, Inc.
33147    #     This is free software; see the source for copying conditions.  There is NO
33148    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33149    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33150    # Check that this is likely to be GCC.
33151    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33152    if test $? -ne 0; then
33153      { $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
33154$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33155      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33156$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33157      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33158    fi
33159    # Remove Copyright and legalese from version string, and
33160    # collapse into a single line
33161    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33162        $SED -e 's/ *Copyright .*//'`
33163    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33164        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33165  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33166    # clang --version output typically looks like
33167    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33168    #    clang version 3.3 (tags/RELEASE_33/final)
33169    # or
33170    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33171    #    Target: x86_64-pc-linux-gnu
33172    #    Thread model: posix
33173    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33174    # Check that this is likely to be clang
33175    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33176    if test $? -ne 0; then
33177      { $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
33178$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33179      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33180$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33181      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33182    fi
33183    # Collapse compiler output into a single line
33184    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33185    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33186        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33187  else
33188      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33189  fi
33190  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33191  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33192  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33193  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33194
33195  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33196$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33197
33198
33199  # Now that we have resolved CC ourself, let autoconf have its go at it
33200  ac_ext=c
33201ac_cpp='$CPP $CPPFLAGS'
33202ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33203ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33204ac_compiler_gnu=$ac_cv_c_compiler_gnu
33205if test -n "$ac_tool_prefix"; then
33206  for ac_prog in $CC
33207  do
33208    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33209set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33211$as_echo_n "checking for $ac_word... " >&6; }
33212if ${ac_cv_prog_CC+:} false; then :
33213  $as_echo_n "(cached) " >&6
33214else
33215  if test -n "$CC"; then
33216  ac_cv_prog_CC="$CC" # Let the user override the test.
33217else
33218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33219for as_dir in $PATH
33220do
33221  IFS=$as_save_IFS
33222  test -z "$as_dir" && as_dir=.
33223    for ac_exec_ext in '' $ac_executable_extensions; do
33224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33225    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33227    break 2
33228  fi
33229done
33230  done
33231IFS=$as_save_IFS
33232
33233fi
33234fi
33235CC=$ac_cv_prog_CC
33236if test -n "$CC"; then
33237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33238$as_echo "$CC" >&6; }
33239else
33240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33241$as_echo "no" >&6; }
33242fi
33243
33244
33245    test -n "$CC" && break
33246  done
33247fi
33248if test -z "$CC"; then
33249  ac_ct_CC=$CC
33250  for ac_prog in $CC
33251do
33252  # Extract the first word of "$ac_prog", so it can be a program name with args.
33253set dummy $ac_prog; ac_word=$2
33254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33255$as_echo_n "checking for $ac_word... " >&6; }
33256if ${ac_cv_prog_ac_ct_CC+:} false; then :
33257  $as_echo_n "(cached) " >&6
33258else
33259  if test -n "$ac_ct_CC"; then
33260  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33261else
33262as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33263for as_dir in $PATH
33264do
33265  IFS=$as_save_IFS
33266  test -z "$as_dir" && as_dir=.
33267    for ac_exec_ext in '' $ac_executable_extensions; do
33268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33269    ac_cv_prog_ac_ct_CC="$ac_prog"
33270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33271    break 2
33272  fi
33273done
33274  done
33275IFS=$as_save_IFS
33276
33277fi
33278fi
33279ac_ct_CC=$ac_cv_prog_ac_ct_CC
33280if test -n "$ac_ct_CC"; then
33281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33282$as_echo "$ac_ct_CC" >&6; }
33283else
33284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33285$as_echo "no" >&6; }
33286fi
33287
33288
33289  test -n "$ac_ct_CC" && break
33290done
33291
33292  if test "x$ac_ct_CC" = x; then
33293    CC=""
33294  else
33295    case $cross_compiling:$ac_tool_warned in
33296yes:)
33297{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33298$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33299ac_tool_warned=yes ;;
33300esac
33301    CC=$ac_ct_CC
33302  fi
33303fi
33304
33305
33306test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33307$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33308as_fn_error $? "no acceptable C compiler found in \$PATH
33309See \`config.log' for more details" "$LINENO" 5; }
33310
33311# Provide some information about the compiler.
33312$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33313set X $ac_compile
33314ac_compiler=$2
33315for ac_option in --version -v -V -qversion; do
33316  { { ac_try="$ac_compiler $ac_option >&5"
33317case "(($ac_try" in
33318  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33319  *) ac_try_echo=$ac_try;;
33320esac
33321eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33322$as_echo "$ac_try_echo"; } >&5
33323  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33324  ac_status=$?
33325  if test -s conftest.err; then
33326    sed '10a\
33327... rest of stderr output deleted ...
33328         10q' conftest.err >conftest.er1
33329    cat conftest.er1 >&5
33330  fi
33331  rm -f conftest.er1 conftest.err
33332  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33333  test $ac_status = 0; }
33334done
33335
33336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33337/* end confdefs.h.  */
33338
33339int
33340main ()
33341{
33342
33343  ;
33344  return 0;
33345}
33346_ACEOF
33347ac_clean_files_save=$ac_clean_files
33348ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33349# Try to create an executable without -o first, disregard a.out.
33350# It will help us diagnose broken compilers, and finding out an intuition
33351# of exeext.
33352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33353$as_echo_n "checking whether the C compiler works... " >&6; }
33354ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33355
33356# The possible output files:
33357ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33358
33359ac_rmfiles=
33360for ac_file in $ac_files
33361do
33362  case $ac_file in
33363    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33364    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33365  esac
33366done
33367rm -f $ac_rmfiles
33368
33369if { { ac_try="$ac_link_default"
33370case "(($ac_try" in
33371  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33372  *) ac_try_echo=$ac_try;;
33373esac
33374eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33375$as_echo "$ac_try_echo"; } >&5
33376  (eval "$ac_link_default") 2>&5
33377  ac_status=$?
33378  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33379  test $ac_status = 0; }; then :
33380  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33381# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33382# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33383# so that the user can short-circuit this test for compilers unknown to
33384# Autoconf.
33385for ac_file in $ac_files ''
33386do
33387  test -f "$ac_file" || continue
33388  case $ac_file in
33389    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33390	;;
33391    [ab].out )
33392	# We found the default executable, but exeext='' is most
33393	# certainly right.
33394	break;;
33395    *.* )
33396	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33397	then :; else
33398	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33399	fi
33400	# We set ac_cv_exeext here because the later test for it is not
33401	# safe: cross compilers may not add the suffix if given an `-o'
33402	# argument, so we may need to know it at that point already.
33403	# Even if this section looks crufty: it has the advantage of
33404	# actually working.
33405	break;;
33406    * )
33407	break;;
33408  esac
33409done
33410test "$ac_cv_exeext" = no && ac_cv_exeext=
33411
33412else
33413  ac_file=''
33414fi
33415if test -z "$ac_file"; then :
33416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33417$as_echo "no" >&6; }
33418$as_echo "$as_me: failed program was:" >&5
33419sed 's/^/| /' conftest.$ac_ext >&5
33420
33421{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33422$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33423as_fn_error 77 "C compiler cannot create executables
33424See \`config.log' for more details" "$LINENO" 5; }
33425else
33426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33427$as_echo "yes" >&6; }
33428fi
33429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33430$as_echo_n "checking for C compiler default output file name... " >&6; }
33431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33432$as_echo "$ac_file" >&6; }
33433ac_exeext=$ac_cv_exeext
33434
33435rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33436ac_clean_files=$ac_clean_files_save
33437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33438$as_echo_n "checking for suffix of executables... " >&6; }
33439if { { ac_try="$ac_link"
33440case "(($ac_try" in
33441  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33442  *) ac_try_echo=$ac_try;;
33443esac
33444eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33445$as_echo "$ac_try_echo"; } >&5
33446  (eval "$ac_link") 2>&5
33447  ac_status=$?
33448  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33449  test $ac_status = 0; }; then :
33450  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33451# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33452# work properly (i.e., refer to `conftest.exe'), while it won't with
33453# `rm'.
33454for ac_file in conftest.exe conftest conftest.*; do
33455  test -f "$ac_file" || continue
33456  case $ac_file in
33457    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33458    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33459	  break;;
33460    * ) break;;
33461  esac
33462done
33463else
33464  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33465$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33466as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33467See \`config.log' for more details" "$LINENO" 5; }
33468fi
33469rm -f conftest conftest$ac_cv_exeext
33470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33471$as_echo "$ac_cv_exeext" >&6; }
33472
33473rm -f conftest.$ac_ext
33474EXEEXT=$ac_cv_exeext
33475ac_exeext=$EXEEXT
33476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33477/* end confdefs.h.  */
33478#include <stdio.h>
33479int
33480main ()
33481{
33482FILE *f = fopen ("conftest.out", "w");
33483 return ferror (f) || fclose (f) != 0;
33484
33485  ;
33486  return 0;
33487}
33488_ACEOF
33489ac_clean_files="$ac_clean_files conftest.out"
33490# Check that the compiler produces executables we can run.  If not, either
33491# the compiler is broken, or we cross compile.
33492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33493$as_echo_n "checking whether we are cross compiling... " >&6; }
33494if test "$cross_compiling" != yes; then
33495  { { ac_try="$ac_link"
33496case "(($ac_try" in
33497  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33498  *) ac_try_echo=$ac_try;;
33499esac
33500eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33501$as_echo "$ac_try_echo"; } >&5
33502  (eval "$ac_link") 2>&5
33503  ac_status=$?
33504  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33505  test $ac_status = 0; }
33506  if { ac_try='./conftest$ac_cv_exeext'
33507  { { case "(($ac_try" in
33508  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33509  *) ac_try_echo=$ac_try;;
33510esac
33511eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33512$as_echo "$ac_try_echo"; } >&5
33513  (eval "$ac_try") 2>&5
33514  ac_status=$?
33515  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33516  test $ac_status = 0; }; }; then
33517    cross_compiling=no
33518  else
33519    if test "$cross_compiling" = maybe; then
33520	cross_compiling=yes
33521    else
33522	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33523$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33524as_fn_error $? "cannot run C compiled programs.
33525If you meant to cross compile, use \`--host'.
33526See \`config.log' for more details" "$LINENO" 5; }
33527    fi
33528  fi
33529fi
33530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
33531$as_echo "$cross_compiling" >&6; }
33532
33533rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33534ac_clean_files=$ac_clean_files_save
33535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33536$as_echo_n "checking for suffix of object files... " >&6; }
33537if ${ac_cv_objext+:} false; then :
33538  $as_echo_n "(cached) " >&6
33539else
33540  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33541/* end confdefs.h.  */
33542
33543int
33544main ()
33545{
33546
33547  ;
33548  return 0;
33549}
33550_ACEOF
33551rm -f conftest.o conftest.obj
33552if { { ac_try="$ac_compile"
33553case "(($ac_try" in
33554  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33555  *) ac_try_echo=$ac_try;;
33556esac
33557eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33558$as_echo "$ac_try_echo"; } >&5
33559  (eval "$ac_compile") 2>&5
33560  ac_status=$?
33561  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33562  test $ac_status = 0; }; then :
33563  for ac_file in conftest.o conftest.obj conftest.*; do
33564  test -f "$ac_file" || continue;
33565  case $ac_file in
33566    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33567    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33568       break;;
33569  esac
33570done
33571else
33572  $as_echo "$as_me: failed program was:" >&5
33573sed 's/^/| /' conftest.$ac_ext >&5
33574
33575{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33576$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33577as_fn_error $? "cannot compute suffix of object files: cannot compile
33578See \`config.log' for more details" "$LINENO" 5; }
33579fi
33580rm -f conftest.$ac_cv_objext conftest.$ac_ext
33581fi
33582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33583$as_echo "$ac_cv_objext" >&6; }
33584OBJEXT=$ac_cv_objext
33585ac_objext=$OBJEXT
33586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33587$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33588if ${ac_cv_c_compiler_gnu+:} false; then :
33589  $as_echo_n "(cached) " >&6
33590else
33591  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33592/* end confdefs.h.  */
33593
33594int
33595main ()
33596{
33597#ifndef __GNUC__
33598       choke me
33599#endif
33600
33601  ;
33602  return 0;
33603}
33604_ACEOF
33605if ac_fn_c_try_compile "$LINENO"; then :
33606  ac_compiler_gnu=yes
33607else
33608  ac_compiler_gnu=no
33609fi
33610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33611ac_cv_c_compiler_gnu=$ac_compiler_gnu
33612
33613fi
33614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33615$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33616if test $ac_compiler_gnu = yes; then
33617  GCC=yes
33618else
33619  GCC=
33620fi
33621ac_test_CFLAGS=${CFLAGS+set}
33622ac_save_CFLAGS=$CFLAGS
33623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33624$as_echo_n "checking whether $CC accepts -g... " >&6; }
33625if ${ac_cv_prog_cc_g+:} false; then :
33626  $as_echo_n "(cached) " >&6
33627else
33628  ac_save_c_werror_flag=$ac_c_werror_flag
33629   ac_c_werror_flag=yes
33630   ac_cv_prog_cc_g=no
33631   CFLAGS="-g"
33632   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33633/* end confdefs.h.  */
33634
33635int
33636main ()
33637{
33638
33639  ;
33640  return 0;
33641}
33642_ACEOF
33643if ac_fn_c_try_compile "$LINENO"; then :
33644  ac_cv_prog_cc_g=yes
33645else
33646  CFLAGS=""
33647      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33648/* end confdefs.h.  */
33649
33650int
33651main ()
33652{
33653
33654  ;
33655  return 0;
33656}
33657_ACEOF
33658if ac_fn_c_try_compile "$LINENO"; then :
33659
33660else
33661  ac_c_werror_flag=$ac_save_c_werror_flag
33662	 CFLAGS="-g"
33663	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33664/* end confdefs.h.  */
33665
33666int
33667main ()
33668{
33669
33670  ;
33671  return 0;
33672}
33673_ACEOF
33674if ac_fn_c_try_compile "$LINENO"; then :
33675  ac_cv_prog_cc_g=yes
33676fi
33677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33678fi
33679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33680fi
33681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33682   ac_c_werror_flag=$ac_save_c_werror_flag
33683fi
33684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33685$as_echo "$ac_cv_prog_cc_g" >&6; }
33686if test "$ac_test_CFLAGS" = set; then
33687  CFLAGS=$ac_save_CFLAGS
33688elif test $ac_cv_prog_cc_g = yes; then
33689  if test "$GCC" = yes; then
33690    CFLAGS="-g -O2"
33691  else
33692    CFLAGS="-g"
33693  fi
33694else
33695  if test "$GCC" = yes; then
33696    CFLAGS="-O2"
33697  else
33698    CFLAGS=
33699  fi
33700fi
33701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33702$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33703if ${ac_cv_prog_cc_c89+:} false; then :
33704  $as_echo_n "(cached) " >&6
33705else
33706  ac_cv_prog_cc_c89=no
33707ac_save_CC=$CC
33708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33709/* end confdefs.h.  */
33710#include <stdarg.h>
33711#include <stdio.h>
33712struct stat;
33713/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33714struct buf { int x; };
33715FILE * (*rcsopen) (struct buf *, struct stat *, int);
33716static char *e (p, i)
33717     char **p;
33718     int i;
33719{
33720  return p[i];
33721}
33722static char *f (char * (*g) (char **, int), char **p, ...)
33723{
33724  char *s;
33725  va_list v;
33726  va_start (v,p);
33727  s = g (p, va_arg (v,int));
33728  va_end (v);
33729  return s;
33730}
33731
33732/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33733   function prototypes and stuff, but not '\xHH' hex character constants.
33734   These don't provoke an error unfortunately, instead are silently treated
33735   as 'x'.  The following induces an error, until -std is added to get
33736   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33737   array size at least.  It's necessary to write '\x00'==0 to get something
33738   that's true only with -std.  */
33739int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33740
33741/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33742   inside strings and character constants.  */
33743#define FOO(x) 'x'
33744int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33745
33746int test (int i, double x);
33747struct s1 {int (*f) (int a);};
33748struct s2 {int (*f) (double a);};
33749int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33750int argc;
33751char **argv;
33752int
33753main ()
33754{
33755return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33756  ;
33757  return 0;
33758}
33759_ACEOF
33760for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33761	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33762do
33763  CC="$ac_save_CC $ac_arg"
33764  if ac_fn_c_try_compile "$LINENO"; then :
33765  ac_cv_prog_cc_c89=$ac_arg
33766fi
33767rm -f core conftest.err conftest.$ac_objext
33768  test "x$ac_cv_prog_cc_c89" != "xno" && break
33769done
33770rm -f conftest.$ac_ext
33771CC=$ac_save_CC
33772
33773fi
33774# AC_CACHE_VAL
33775case "x$ac_cv_prog_cc_c89" in
33776  x)
33777    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33778$as_echo "none needed" >&6; } ;;
33779  xno)
33780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33781$as_echo "unsupported" >&6; } ;;
33782  *)
33783    CC="$CC $ac_cv_prog_cc_c89"
33784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33785$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33786esac
33787if test "x$ac_cv_prog_cc_c89" != xno; then :
33788
33789fi
33790
33791ac_ext=cpp
33792ac_cpp='$CXXCPP $CPPFLAGS'
33793ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33794ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33795ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33796
33797
33798
33799  COMPILER_NAME=C++
33800  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33801
33802  if test "x$CXX" != x; then
33803    # User has supplied compiler name already, always let that override.
33804    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33805$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33806    if test "x`basename $CXX`" = "x$CXX"; then
33807      # A command without a complete path is provided, search $PATH.
33808
33809      for ac_prog in $CXX
33810do
33811  # Extract the first word of "$ac_prog", so it can be a program name with args.
33812set dummy $ac_prog; ac_word=$2
33813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33814$as_echo_n "checking for $ac_word... " >&6; }
33815if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33816  $as_echo_n "(cached) " >&6
33817else
33818  case $POTENTIAL_CXX in
33819  [\\/]* | ?:[\\/]*)
33820  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33821  ;;
33822  *)
33823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33824for as_dir in $PATH
33825do
33826  IFS=$as_save_IFS
33827  test -z "$as_dir" && as_dir=.
33828    for ac_exec_ext in '' $ac_executable_extensions; do
33829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33830    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33832    break 2
33833  fi
33834done
33835  done
33836IFS=$as_save_IFS
33837
33838  ;;
33839esac
33840fi
33841POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33842if test -n "$POTENTIAL_CXX"; then
33843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33844$as_echo "$POTENTIAL_CXX" >&6; }
33845else
33846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33847$as_echo "no" >&6; }
33848fi
33849
33850
33851  test -n "$POTENTIAL_CXX" && break
33852done
33853
33854      if test "x$POTENTIAL_CXX" != x; then
33855        CXX=$POTENTIAL_CXX
33856      else
33857        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33858      fi
33859    else
33860      # Otherwise it might already be a complete path
33861      if test ! -x "$CXX"; then
33862        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33863      fi
33864    fi
33865  else
33866    # No user supplied value. Locate compiler ourselves.
33867
33868    # If we are cross compiling, assume cross compilation tools follows the
33869    # cross compilation standard where they are prefixed with the autoconf
33870    # standard name for the target. For example the binary
33871    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33872    # If we are not cross compiling, then the default compiler name will be
33873    # used.
33874
33875    CXX=
33876    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33877    # before checking the rest of the PATH.
33878    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33879    # step, this should not be necessary.
33880    if test -n "$TOOLCHAIN_PATH"; then
33881      PATH_save="$PATH"
33882      PATH="$TOOLCHAIN_PATH"
33883      for ac_prog in $SEARCH_LIST
33884do
33885  # Extract the first word of "$ac_prog", so it can be a program name with args.
33886set dummy $ac_prog; ac_word=$2
33887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33888$as_echo_n "checking for $ac_word... " >&6; }
33889if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33890  $as_echo_n "(cached) " >&6
33891else
33892  case $TOOLCHAIN_PATH_CXX in
33893  [\\/]* | ?:[\\/]*)
33894  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33895  ;;
33896  *)
33897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33898for as_dir in $PATH
33899do
33900  IFS=$as_save_IFS
33901  test -z "$as_dir" && as_dir=.
33902    for ac_exec_ext in '' $ac_executable_extensions; do
33903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33904    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33906    break 2
33907  fi
33908done
33909  done
33910IFS=$as_save_IFS
33911
33912  ;;
33913esac
33914fi
33915TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33916if test -n "$TOOLCHAIN_PATH_CXX"; then
33917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33918$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33919else
33920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33921$as_echo "no" >&6; }
33922fi
33923
33924
33925  test -n "$TOOLCHAIN_PATH_CXX" && break
33926done
33927
33928      CXX=$TOOLCHAIN_PATH_CXX
33929      PATH="$PATH_save"
33930    fi
33931
33932    # AC_PATH_PROGS can't be run multiple times with the same variable,
33933    # so create a new name for this run.
33934    if test "x$CXX" = x; then
33935      for ac_prog in $SEARCH_LIST
33936do
33937  # Extract the first word of "$ac_prog", so it can be a program name with args.
33938set dummy $ac_prog; ac_word=$2
33939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33940$as_echo_n "checking for $ac_word... " >&6; }
33941if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33942  $as_echo_n "(cached) " >&6
33943else
33944  case $POTENTIAL_CXX in
33945  [\\/]* | ?:[\\/]*)
33946  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33947  ;;
33948  *)
33949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33950for as_dir in $PATH
33951do
33952  IFS=$as_save_IFS
33953  test -z "$as_dir" && as_dir=.
33954    for ac_exec_ext in '' $ac_executable_extensions; do
33955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33956    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33958    break 2
33959  fi
33960done
33961  done
33962IFS=$as_save_IFS
33963
33964  ;;
33965esac
33966fi
33967POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33968if test -n "$POTENTIAL_CXX"; then
33969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33970$as_echo "$POTENTIAL_CXX" >&6; }
33971else
33972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33973$as_echo "no" >&6; }
33974fi
33975
33976
33977  test -n "$POTENTIAL_CXX" && break
33978done
33979
33980      CXX=$POTENTIAL_CXX
33981    fi
33982
33983    if test "x$CXX" = x; then
33984
33985  # Print a helpful message on how to acquire the necessary build dependency.
33986  # devkit is the help tag: freetype, cups, alsa etc
33987  MISSING_DEPENDENCY=devkit
33988
33989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33990    cygwin_help $MISSING_DEPENDENCY
33991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33992    msys_help $MISSING_DEPENDENCY
33993  else
33994    PKGHANDLER_COMMAND=
33995
33996    case $PKGHANDLER in
33997      apt-get)
33998        apt_help     $MISSING_DEPENDENCY ;;
33999      yum)
34000        yum_help     $MISSING_DEPENDENCY ;;
34001      port)
34002        port_help    $MISSING_DEPENDENCY ;;
34003      pkgutil)
34004        pkgutil_help $MISSING_DEPENDENCY ;;
34005      pkgadd)
34006        pkgadd_help  $MISSING_DEPENDENCY ;;
34007    esac
34008
34009    if test "x$PKGHANDLER_COMMAND" != x; then
34010      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34011    fi
34012  fi
34013
34014      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34015    fi
34016  fi
34017
34018  # Now we have a compiler binary in CXX. Make sure it's okay.
34019
34020  # Only process if variable expands to non-empty
34021
34022  if test "x$CXX" != x; then
34023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34024
34025  # First separate the path from the arguments. This will split at the first
34026  # space.
34027  complete="$CXX"
34028  path="${complete%% *}"
34029  tmp="$complete EOL"
34030  arguments="${tmp#* }"
34031
34032  # Input might be given as Windows format, start by converting to
34033  # unix format.
34034  new_path=`$CYGPATH -u "$path"`
34035
34036  # Now try to locate executable using which
34037  new_path=`$WHICH "$new_path" 2> /dev/null`
34038  # bat and cmd files are not always considered executable in cygwin causing which
34039  # to not find them
34040  if test "x$new_path" = x \
34041      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34042      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34043    new_path=`$CYGPATH -u "$path"`
34044  fi
34045  if test "x$new_path" = x; then
34046    # Oops. Which didn't find the executable.
34047    # The splitting of arguments from the executable at a space might have been incorrect,
34048    # since paths with space are more likely in Windows. Give it another try with the whole
34049    # argument.
34050    path="$complete"
34051    arguments="EOL"
34052    new_path=`$CYGPATH -u "$path"`
34053    new_path=`$WHICH "$new_path" 2> /dev/null`
34054    # bat and cmd files are not always considered executable in cygwin causing which
34055    # to not find them
34056    if test "x$new_path" = x \
34057        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34058        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34059      new_path=`$CYGPATH -u "$path"`
34060    fi
34061    if test "x$new_path" = x; then
34062      # It's still not found. Now this is an unrecoverable error.
34063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34064$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34065      has_space=`$ECHO "$complete" | $GREP " "`
34066      if test "x$has_space" != x; then
34067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34069      fi
34070      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34071    fi
34072  fi
34073
34074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34077  # "foo.exe" is OK but "foo" is an error.
34078  #
34079  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34080  # It is also a way to make sure we got the proper file name for the real test later on.
34081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34082  if test "x$test_shortpath" = x; then
34083    # Short path failed, file does not exist as specified.
34084    # Try adding .exe or .cmd
34085    if test -f "${new_path}.exe"; then
34086      input_to_shortpath="${new_path}.exe"
34087    elif test -f "${new_path}.cmd"; then
34088      input_to_shortpath="${new_path}.cmd"
34089    else
34090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34091$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34092      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34093$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34094      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34095    fi
34096  else
34097    input_to_shortpath="$new_path"
34098  fi
34099
34100  # Call helper function which possibly converts this using DOS-style short mode.
34101  # If so, the updated path is stored in $new_path.
34102  new_path="$input_to_shortpath"
34103
34104  input_path="$input_to_shortpath"
34105  # Check if we need to convert this using DOS-style short mode. If the path
34106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34107  # take no chances and rewrite it.
34108  # Note: m4 eats our [], so we need to use [ and ] instead.
34109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34110  if test "x$has_forbidden_chars" != x; then
34111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34115      # Going to short mode and back again did indeed matter. Since short mode is
34116      # case insensitive, let's make it lowercase to improve readability.
34117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34118      # Now convert it back to Unix-style (cygpath)
34119      input_path=`$CYGPATH -u "$shortmode_path"`
34120      new_path="$input_path"
34121    fi
34122  fi
34123
34124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34125  if test "x$test_cygdrive_prefix" = x; then
34126    # As a simple fix, exclude /usr/bin since it's not a real path.
34127    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34129      # a path prefixed by /cygdrive for fixpath to work.
34130      new_path="$CYGWIN_ROOT_PATH$input_path"
34131    fi
34132  fi
34133
34134  # remove trailing .exe if any
34135  new_path="${new_path/%.exe/}"
34136
34137    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34138
34139  # First separate the path from the arguments. This will split at the first
34140  # space.
34141  complete="$CXX"
34142  path="${complete%% *}"
34143  tmp="$complete EOL"
34144  arguments="${tmp#* }"
34145
34146  # Input might be given as Windows format, start by converting to
34147  # unix format.
34148  new_path="$path"
34149
34150  windows_path="$new_path"
34151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34152    unix_path=`$CYGPATH -u "$windows_path"`
34153    new_path="$unix_path"
34154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34156    new_path="$unix_path"
34157  fi
34158
34159
34160  # Now try to locate executable using which
34161  new_path=`$WHICH "$new_path" 2> /dev/null`
34162
34163  if test "x$new_path" = x; then
34164    # Oops. Which didn't find the executable.
34165    # The splitting of arguments from the executable at a space might have been incorrect,
34166    # since paths with space are more likely in Windows. Give it another try with the whole
34167    # argument.
34168    path="$complete"
34169    arguments="EOL"
34170    new_path="$path"
34171
34172  windows_path="$new_path"
34173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34174    unix_path=`$CYGPATH -u "$windows_path"`
34175    new_path="$unix_path"
34176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34178    new_path="$unix_path"
34179  fi
34180
34181
34182    new_path=`$WHICH "$new_path" 2> /dev/null`
34183    # bat and cmd files are not always considered executable in MSYS causing which
34184    # to not find them
34185    if test "x$new_path" = x \
34186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34188      new_path="$path"
34189
34190  windows_path="$new_path"
34191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34192    unix_path=`$CYGPATH -u "$windows_path"`
34193    new_path="$unix_path"
34194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34196    new_path="$unix_path"
34197  fi
34198
34199    fi
34200
34201    if test "x$new_path" = x; then
34202      # It's still not found. Now this is an unrecoverable error.
34203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34204$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34205      has_space=`$ECHO "$complete" | $GREP " "`
34206      if test "x$has_space" != x; then
34207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34209      fi
34210      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34211    fi
34212  fi
34213
34214  # Now new_path has a complete unix path to the binary
34215  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34216    # Keep paths in /bin as-is, but remove trailing .exe if any
34217    new_path="${new_path/%.exe/}"
34218    # Do not save /bin paths to all_fixpath_prefixes!
34219  else
34220    # Not in mixed or Windows style, start by that.
34221    new_path=`cmd //c echo $new_path`
34222
34223  input_path="$new_path"
34224  # Check if we need to convert this using DOS-style short mode. If the path
34225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34226  # take no chances and rewrite it.
34227  # Note: m4 eats our [], so we need to use [ and ] instead.
34228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34229  if test "x$has_forbidden_chars" != x; then
34230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34232  fi
34233
34234    # Output is in $new_path
34235
34236  windows_path="$new_path"
34237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34238    unix_path=`$CYGPATH -u "$windows_path"`
34239    new_path="$unix_path"
34240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34242    new_path="$unix_path"
34243  fi
34244
34245    # remove trailing .exe if any
34246    new_path="${new_path/%.exe/}"
34247
34248    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34249    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34250  fi
34251
34252    else
34253      # We're on a unix platform. Hooray! :)
34254      # First separate the path from the arguments. This will split at the first
34255      # space.
34256      complete="$CXX"
34257      path="${complete%% *}"
34258      tmp="$complete EOL"
34259      arguments="${tmp#* }"
34260
34261      # Cannot rely on the command "which" here since it doesn't always work.
34262      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34263      if test -z "$is_absolute_path"; then
34264        # Path to executable is not absolute. Find it.
34265        IFS_save="$IFS"
34266        IFS=:
34267        for p in $PATH; do
34268          if test -f "$p/$path" && test -x "$p/$path"; then
34269            new_path="$p/$path"
34270            break
34271          fi
34272        done
34273        IFS="$IFS_save"
34274      else
34275        # This is an absolute path, we can use it without further modifications.
34276        new_path="$path"
34277      fi
34278
34279      if test "x$new_path" = x; then
34280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34281$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34282        has_space=`$ECHO "$complete" | $GREP " "`
34283        if test "x$has_space" != x; then
34284          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34286        fi
34287        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34288      fi
34289    fi
34290
34291    # Now join together the path and the arguments once again
34292    if test "x$arguments" != xEOL; then
34293      new_complete="$new_path ${arguments% *}"
34294    else
34295      new_complete="$new_path"
34296    fi
34297
34298    if test "x$complete" != "x$new_complete"; then
34299      CXX="$new_complete"
34300      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34301$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34302    fi
34303  fi
34304
34305  TEST_COMPILER="$CXX"
34306
34307  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34308$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34309  SYMLINK_ORIGINAL="$TEST_COMPILER"
34310
34311  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34312    # Follow a chain of symbolic links. Use readlink
34313    # where it exists, else fall back to horribly
34314    # complicated shell code.
34315    if test "x$READLINK_TESTED" != yes; then
34316      # On MacOSX there is a readlink tool with a different
34317      # purpose than the GNU readlink tool. Check the found readlink.
34318      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34319      if test "x$ISGNU" = x; then
34320        # A readlink that we do not know how to use.
34321        # Are there other non-GNU readlinks out there?
34322        READLINK_TESTED=yes
34323        READLINK=
34324      fi
34325    fi
34326
34327    if test "x$READLINK" != x; then
34328      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34329    else
34330      # Save the current directory for restoring afterwards
34331      STARTDIR=$PWD
34332      COUNTER=0
34333      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34334      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34335      cd $sym_link_dir
34336      # Use -P flag to resolve symlinks in directories.
34337      cd `$THEPWDCMD -P`
34338      sym_link_dir=`$THEPWDCMD -P`
34339      # Resolve file symlinks
34340      while test $COUNTER -lt 20; do
34341        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34342        if test "x$ISLINK" == x; then
34343          # This is not a symbolic link! We are done!
34344          break
34345        fi
34346        # Again resolve directory symlinks since the target of the just found
34347        # link could be in a different directory
34348        cd `$DIRNAME $ISLINK`
34349        sym_link_dir=`$THEPWDCMD -P`
34350        sym_link_file=`$BASENAME $ISLINK`
34351        let COUNTER=COUNTER+1
34352      done
34353      cd $STARTDIR
34354      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34355    fi
34356  fi
34357
34358  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34359    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34360$as_echo "no symlink" >&6; }
34361  else
34362    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34363$as_echo "$SYMLINK_ORIGINAL" >&6; }
34364
34365    # We can't handle ccache by gcc wrappers, since we need to know if we're
34366    # using ccache. Instead ccache usage must be controlled by a configure option.
34367    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34368    if test "x$COMPILER_BASENAME" = "xccache"; then
34369      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34370$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34371      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34372    fi
34373  fi
34374
34375
34376  COMPILER=$CXX
34377  COMPILER_NAME=$COMPILER_NAME
34378
34379  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34380    # cc -V output typically looks like
34381    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34382    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34383    # Check that this is likely to be the Solaris Studio cc.
34384    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34385    if test $? -ne 0; then
34386      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34387      { $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
34388$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34389      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34390$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34391      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34392$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34393      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34394    fi
34395    # Remove usage instructions (if present), and
34396    # collapse compiler output into a single line
34397    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34398        $SED -e 's/ *[Uu]sage:.*//'`
34399    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34400        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34401  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34402    # xlc -qversion output typically looks like
34403    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34404    #     Version: 11.01.0000.0015
34405    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34406    # Check that this is likely to be the IBM XL C compiler.
34407    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34408    if test $? -ne 0; then
34409      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34410      { $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
34411$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34412      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34413$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34414      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34415$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34416      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34417    fi
34418    # Collapse compiler output into a single line
34419    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34420    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34421        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34422  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34423    # There is no specific version flag, but all output starts with a version string.
34424    # First line typically looks something like:
34425    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34426    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34427    # Check that this is likely to be Microsoft CL.EXE.
34428    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34429    if test $? -ne 0; then
34430      { $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
34431$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34432      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34433$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34434      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34435    fi
34436    # Collapse compiler output into a single line
34437    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34438    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34439        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34440  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34441    # gcc --version output typically looks like
34442    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34443    #     Copyright (C) 2013 Free Software Foundation, Inc.
34444    #     This is free software; see the source for copying conditions.  There is NO
34445    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34446    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34447    # Check that this is likely to be GCC.
34448    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34449    if test $? -ne 0; then
34450      { $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
34451$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34452      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34453$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34454      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34455    fi
34456    # Remove Copyright and legalese from version string, and
34457    # collapse into a single line
34458    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34459        $SED -e 's/ *Copyright .*//'`
34460    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34461        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34462  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34463    # clang --version output typically looks like
34464    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34465    #    clang version 3.3 (tags/RELEASE_33/final)
34466    # or
34467    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34468    #    Target: x86_64-pc-linux-gnu
34469    #    Thread model: posix
34470    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34471    # Check that this is likely to be clang
34472    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34473    if test $? -ne 0; then
34474      { $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
34475$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34476      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34477$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34478      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34479    fi
34480    # Collapse compiler output into a single line
34481    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34482    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34483        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34484  else
34485      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34486  fi
34487  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34488  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34489  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34490  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34491
34492  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34493$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34494
34495
34496  # Now that we have resolved CXX ourself, let autoconf have its go at it
34497  ac_ext=cpp
34498ac_cpp='$CXXCPP $CPPFLAGS'
34499ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34500ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34501ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34502if test -z "$CXX"; then
34503  if test -n "$CCC"; then
34504    CXX=$CCC
34505  else
34506    if test -n "$ac_tool_prefix"; then
34507  for ac_prog in $CXX
34508  do
34509    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34510set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34512$as_echo_n "checking for $ac_word... " >&6; }
34513if ${ac_cv_prog_CXX+:} false; then :
34514  $as_echo_n "(cached) " >&6
34515else
34516  if test -n "$CXX"; then
34517  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34518else
34519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34520for as_dir in $PATH
34521do
34522  IFS=$as_save_IFS
34523  test -z "$as_dir" && as_dir=.
34524    for ac_exec_ext in '' $ac_executable_extensions; do
34525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34526    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34528    break 2
34529  fi
34530done
34531  done
34532IFS=$as_save_IFS
34533
34534fi
34535fi
34536CXX=$ac_cv_prog_CXX
34537if test -n "$CXX"; then
34538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34539$as_echo "$CXX" >&6; }
34540else
34541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34542$as_echo "no" >&6; }
34543fi
34544
34545
34546    test -n "$CXX" && break
34547  done
34548fi
34549if test -z "$CXX"; then
34550  ac_ct_CXX=$CXX
34551  for ac_prog in $CXX
34552do
34553  # Extract the first word of "$ac_prog", so it can be a program name with args.
34554set dummy $ac_prog; ac_word=$2
34555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34556$as_echo_n "checking for $ac_word... " >&6; }
34557if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34558  $as_echo_n "(cached) " >&6
34559else
34560  if test -n "$ac_ct_CXX"; then
34561  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34562else
34563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34564for as_dir in $PATH
34565do
34566  IFS=$as_save_IFS
34567  test -z "$as_dir" && as_dir=.
34568    for ac_exec_ext in '' $ac_executable_extensions; do
34569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34570    ac_cv_prog_ac_ct_CXX="$ac_prog"
34571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34572    break 2
34573  fi
34574done
34575  done
34576IFS=$as_save_IFS
34577
34578fi
34579fi
34580ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34581if test -n "$ac_ct_CXX"; then
34582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34583$as_echo "$ac_ct_CXX" >&6; }
34584else
34585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34586$as_echo "no" >&6; }
34587fi
34588
34589
34590  test -n "$ac_ct_CXX" && break
34591done
34592
34593  if test "x$ac_ct_CXX" = x; then
34594    CXX="g++"
34595  else
34596    case $cross_compiling:$ac_tool_warned in
34597yes:)
34598{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34599$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34600ac_tool_warned=yes ;;
34601esac
34602    CXX=$ac_ct_CXX
34603  fi
34604fi
34605
34606  fi
34607fi
34608# Provide some information about the compiler.
34609$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34610set X $ac_compile
34611ac_compiler=$2
34612for ac_option in --version -v -V -qversion; do
34613  { { ac_try="$ac_compiler $ac_option >&5"
34614case "(($ac_try" in
34615  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34616  *) ac_try_echo=$ac_try;;
34617esac
34618eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34619$as_echo "$ac_try_echo"; } >&5
34620  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34621  ac_status=$?
34622  if test -s conftest.err; then
34623    sed '10a\
34624... rest of stderr output deleted ...
34625         10q' conftest.err >conftest.er1
34626    cat conftest.er1 >&5
34627  fi
34628  rm -f conftest.er1 conftest.err
34629  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34630  test $ac_status = 0; }
34631done
34632
34633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34634$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34635if ${ac_cv_cxx_compiler_gnu+:} false; then :
34636  $as_echo_n "(cached) " >&6
34637else
34638  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34639/* end confdefs.h.  */
34640
34641int
34642main ()
34643{
34644#ifndef __GNUC__
34645       choke me
34646#endif
34647
34648  ;
34649  return 0;
34650}
34651_ACEOF
34652if ac_fn_cxx_try_compile "$LINENO"; then :
34653  ac_compiler_gnu=yes
34654else
34655  ac_compiler_gnu=no
34656fi
34657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34658ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34659
34660fi
34661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34662$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34663if test $ac_compiler_gnu = yes; then
34664  GXX=yes
34665else
34666  GXX=
34667fi
34668ac_test_CXXFLAGS=${CXXFLAGS+set}
34669ac_save_CXXFLAGS=$CXXFLAGS
34670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34671$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34672if ${ac_cv_prog_cxx_g+:} false; then :
34673  $as_echo_n "(cached) " >&6
34674else
34675  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34676   ac_cxx_werror_flag=yes
34677   ac_cv_prog_cxx_g=no
34678   CXXFLAGS="-g"
34679   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34680/* end confdefs.h.  */
34681
34682int
34683main ()
34684{
34685
34686  ;
34687  return 0;
34688}
34689_ACEOF
34690if ac_fn_cxx_try_compile "$LINENO"; then :
34691  ac_cv_prog_cxx_g=yes
34692else
34693  CXXFLAGS=""
34694      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34695/* end confdefs.h.  */
34696
34697int
34698main ()
34699{
34700
34701  ;
34702  return 0;
34703}
34704_ACEOF
34705if ac_fn_cxx_try_compile "$LINENO"; then :
34706
34707else
34708  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34709	 CXXFLAGS="-g"
34710	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34711/* end confdefs.h.  */
34712
34713int
34714main ()
34715{
34716
34717  ;
34718  return 0;
34719}
34720_ACEOF
34721if ac_fn_cxx_try_compile "$LINENO"; then :
34722  ac_cv_prog_cxx_g=yes
34723fi
34724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34725fi
34726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34727fi
34728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34729   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34730fi
34731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34732$as_echo "$ac_cv_prog_cxx_g" >&6; }
34733if test "$ac_test_CXXFLAGS" = set; then
34734  CXXFLAGS=$ac_save_CXXFLAGS
34735elif test $ac_cv_prog_cxx_g = yes; then
34736  if test "$GXX" = yes; then
34737    CXXFLAGS="-g -O2"
34738  else
34739    CXXFLAGS="-g"
34740  fi
34741else
34742  if test "$GXX" = yes; then
34743    CXXFLAGS="-O2"
34744  else
34745    CXXFLAGS=
34746  fi
34747fi
34748ac_ext=cpp
34749ac_cpp='$CXXCPP $CPPFLAGS'
34750ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34751ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34752ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34753
34754
34755  # This is the compiler version number on the form X.Y[.Z]
34756
34757
34758
34759
34760  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
34761    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
34762$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
34763    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
34764$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
34765  fi
34766
34767  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
34768  if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
34769    { $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
34770$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;}
34771  fi
34772
34773  if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
34774    { $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
34775$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34776  fi
34777
34778  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
34779
34780
34781  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
34782
34783
34784
34785
34786
34787
34788
34789
34790
34791
34792
34793
34794
34795
34796
34797
34798
34799
34800
34801
34802
34803
34804
34805
34806
34807
34808
34809
34810
34811
34812
34813
34814
34815
34816
34817
34818
34819
34820
34821
34822
34823
34824    # Execute function body
34825
34826  # Need to assign to a variable since m4 is blocked from modifying parts in [].
34827  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
34828
34829  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
34830    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
34831  fi
34832
34833  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
34834    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
34835  fi
34836
34837  # Version comparison method inspired by http://stackoverflow.com/a/24067243
34838  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
34839
34840  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
34841    :
34842
34843  else
34844    :
34845
34846          { $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
34847$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
34848
34849
34850  fi
34851
34852
34853
34854
34855
34856
34857
34858
34859
34860
34861
34862
34863  fi
34864
34865  #
34866  # Setup the preprocessor (CPP and CXXCPP)
34867  #
34868  ac_ext=c
34869ac_cpp='$CPP $CPPFLAGS'
34870ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34871ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34872ac_compiler_gnu=$ac_cv_c_compiler_gnu
34873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34874$as_echo_n "checking how to run the C preprocessor... " >&6; }
34875# On Suns, sometimes $CPP names a directory.
34876if test -n "$CPP" && test -d "$CPP"; then
34877  CPP=
34878fi
34879if test -z "$CPP"; then
34880  if ${ac_cv_prog_CPP+:} false; then :
34881  $as_echo_n "(cached) " >&6
34882else
34883      # Double quotes because CPP needs to be expanded
34884    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34885    do
34886      ac_preproc_ok=false
34887for ac_c_preproc_warn_flag in '' yes
34888do
34889  # Use a header file that comes with gcc, so configuring glibc
34890  # with a fresh cross-compiler works.
34891  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34892  # <limits.h> exists even on freestanding compilers.
34893  # On the NeXT, cc -E runs the code through the compiler's parser,
34894  # not just through cpp. "Syntax error" is here to catch this case.
34895  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34896/* end confdefs.h.  */
34897#ifdef __STDC__
34898# include <limits.h>
34899#else
34900# include <assert.h>
34901#endif
34902		     Syntax error
34903_ACEOF
34904if ac_fn_c_try_cpp "$LINENO"; then :
34905
34906else
34907  # Broken: fails on valid input.
34908continue
34909fi
34910rm -f conftest.err conftest.i conftest.$ac_ext
34911
34912  # OK, works on sane cases.  Now check whether nonexistent headers
34913  # can be detected and how.
34914  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34915/* end confdefs.h.  */
34916#include <ac_nonexistent.h>
34917_ACEOF
34918if ac_fn_c_try_cpp "$LINENO"; then :
34919  # Broken: success on invalid input.
34920continue
34921else
34922  # Passes both tests.
34923ac_preproc_ok=:
34924break
34925fi
34926rm -f conftest.err conftest.i conftest.$ac_ext
34927
34928done
34929# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34930rm -f conftest.i conftest.err conftest.$ac_ext
34931if $ac_preproc_ok; then :
34932  break
34933fi
34934
34935    done
34936    ac_cv_prog_CPP=$CPP
34937
34938fi
34939  CPP=$ac_cv_prog_CPP
34940else
34941  ac_cv_prog_CPP=$CPP
34942fi
34943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34944$as_echo "$CPP" >&6; }
34945ac_preproc_ok=false
34946for ac_c_preproc_warn_flag in '' yes
34947do
34948  # Use a header file that comes with gcc, so configuring glibc
34949  # with a fresh cross-compiler works.
34950  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34951  # <limits.h> exists even on freestanding compilers.
34952  # On the NeXT, cc -E runs the code through the compiler's parser,
34953  # not just through cpp. "Syntax error" is here to catch this case.
34954  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34955/* end confdefs.h.  */
34956#ifdef __STDC__
34957# include <limits.h>
34958#else
34959# include <assert.h>
34960#endif
34961		     Syntax error
34962_ACEOF
34963if ac_fn_c_try_cpp "$LINENO"; then :
34964
34965else
34966  # Broken: fails on valid input.
34967continue
34968fi
34969rm -f conftest.err conftest.i conftest.$ac_ext
34970
34971  # OK, works on sane cases.  Now check whether nonexistent headers
34972  # can be detected and how.
34973  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34974/* end confdefs.h.  */
34975#include <ac_nonexistent.h>
34976_ACEOF
34977if ac_fn_c_try_cpp "$LINENO"; then :
34978  # Broken: success on invalid input.
34979continue
34980else
34981  # Passes both tests.
34982ac_preproc_ok=:
34983break
34984fi
34985rm -f conftest.err conftest.i conftest.$ac_ext
34986
34987done
34988# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34989rm -f conftest.i conftest.err conftest.$ac_ext
34990if $ac_preproc_ok; then :
34991
34992else
34993  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34994$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34995as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34996See \`config.log' for more details" "$LINENO" 5; }
34997fi
34998
34999ac_ext=cpp
35000ac_cpp='$CXXCPP $CPPFLAGS'
35001ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35002ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35003ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35004
35005
35006  # Only process if variable expands to non-empty
35007
35008  if test "x$CPP" != x; then
35009    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35010
35011  # First separate the path from the arguments. This will split at the first
35012  # space.
35013  complete="$CPP"
35014  path="${complete%% *}"
35015  tmp="$complete EOL"
35016  arguments="${tmp#* }"
35017
35018  # Input might be given as Windows format, start by converting to
35019  # unix format.
35020  new_path=`$CYGPATH -u "$path"`
35021
35022  # Now try to locate executable using which
35023  new_path=`$WHICH "$new_path" 2> /dev/null`
35024  # bat and cmd files are not always considered executable in cygwin causing which
35025  # to not find them
35026  if test "x$new_path" = x \
35027      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35028      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35029    new_path=`$CYGPATH -u "$path"`
35030  fi
35031  if test "x$new_path" = x; then
35032    # Oops. Which didn't find the executable.
35033    # The splitting of arguments from the executable at a space might have been incorrect,
35034    # since paths with space are more likely in Windows. Give it another try with the whole
35035    # argument.
35036    path="$complete"
35037    arguments="EOL"
35038    new_path=`$CYGPATH -u "$path"`
35039    new_path=`$WHICH "$new_path" 2> /dev/null`
35040    # bat and cmd files are not always considered executable in cygwin causing which
35041    # to not find them
35042    if test "x$new_path" = x \
35043        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35044        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35045      new_path=`$CYGPATH -u "$path"`
35046    fi
35047    if test "x$new_path" = x; then
35048      # It's still not found. Now this is an unrecoverable error.
35049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35050$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35051      has_space=`$ECHO "$complete" | $GREP " "`
35052      if test "x$has_space" != x; then
35053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35055      fi
35056      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35057    fi
35058  fi
35059
35060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35063  # "foo.exe" is OK but "foo" is an error.
35064  #
35065  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35066  # It is also a way to make sure we got the proper file name for the real test later on.
35067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35068  if test "x$test_shortpath" = x; then
35069    # Short path failed, file does not exist as specified.
35070    # Try adding .exe or .cmd
35071    if test -f "${new_path}.exe"; then
35072      input_to_shortpath="${new_path}.exe"
35073    elif test -f "${new_path}.cmd"; then
35074      input_to_shortpath="${new_path}.cmd"
35075    else
35076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35077$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35078      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35079$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35080      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35081    fi
35082  else
35083    input_to_shortpath="$new_path"
35084  fi
35085
35086  # Call helper function which possibly converts this using DOS-style short mode.
35087  # If so, the updated path is stored in $new_path.
35088  new_path="$input_to_shortpath"
35089
35090  input_path="$input_to_shortpath"
35091  # Check if we need to convert this using DOS-style short mode. If the path
35092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35093  # take no chances and rewrite it.
35094  # Note: m4 eats our [], so we need to use [ and ] instead.
35095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35096  if test "x$has_forbidden_chars" != x; then
35097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35101      # Going to short mode and back again did indeed matter. Since short mode is
35102      # case insensitive, let's make it lowercase to improve readability.
35103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35104      # Now convert it back to Unix-style (cygpath)
35105      input_path=`$CYGPATH -u "$shortmode_path"`
35106      new_path="$input_path"
35107    fi
35108  fi
35109
35110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35111  if test "x$test_cygdrive_prefix" = x; then
35112    # As a simple fix, exclude /usr/bin since it's not a real path.
35113    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35115      # a path prefixed by /cygdrive for fixpath to work.
35116      new_path="$CYGWIN_ROOT_PATH$input_path"
35117    fi
35118  fi
35119
35120  # remove trailing .exe if any
35121  new_path="${new_path/%.exe/}"
35122
35123    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35124
35125  # First separate the path from the arguments. This will split at the first
35126  # space.
35127  complete="$CPP"
35128  path="${complete%% *}"
35129  tmp="$complete EOL"
35130  arguments="${tmp#* }"
35131
35132  # Input might be given as Windows format, start by converting to
35133  # unix format.
35134  new_path="$path"
35135
35136  windows_path="$new_path"
35137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35138    unix_path=`$CYGPATH -u "$windows_path"`
35139    new_path="$unix_path"
35140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35142    new_path="$unix_path"
35143  fi
35144
35145
35146  # Now try to locate executable using which
35147  new_path=`$WHICH "$new_path" 2> /dev/null`
35148
35149  if test "x$new_path" = x; then
35150    # Oops. Which didn't find the executable.
35151    # The splitting of arguments from the executable at a space might have been incorrect,
35152    # since paths with space are more likely in Windows. Give it another try with the whole
35153    # argument.
35154    path="$complete"
35155    arguments="EOL"
35156    new_path="$path"
35157
35158  windows_path="$new_path"
35159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35160    unix_path=`$CYGPATH -u "$windows_path"`
35161    new_path="$unix_path"
35162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35164    new_path="$unix_path"
35165  fi
35166
35167
35168    new_path=`$WHICH "$new_path" 2> /dev/null`
35169    # bat and cmd files are not always considered executable in MSYS causing which
35170    # to not find them
35171    if test "x$new_path" = x \
35172        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35173        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35174      new_path="$path"
35175
35176  windows_path="$new_path"
35177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35178    unix_path=`$CYGPATH -u "$windows_path"`
35179    new_path="$unix_path"
35180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35182    new_path="$unix_path"
35183  fi
35184
35185    fi
35186
35187    if test "x$new_path" = x; then
35188      # It's still not found. Now this is an unrecoverable error.
35189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35190$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35191      has_space=`$ECHO "$complete" | $GREP " "`
35192      if test "x$has_space" != x; then
35193        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35194$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35195      fi
35196      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35197    fi
35198  fi
35199
35200  # Now new_path has a complete unix path to the binary
35201  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35202    # Keep paths in /bin as-is, but remove trailing .exe if any
35203    new_path="${new_path/%.exe/}"
35204    # Do not save /bin paths to all_fixpath_prefixes!
35205  else
35206    # Not in mixed or Windows style, start by that.
35207    new_path=`cmd //c echo $new_path`
35208
35209  input_path="$new_path"
35210  # Check if we need to convert this using DOS-style short mode. If the path
35211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35212  # take no chances and rewrite it.
35213  # Note: m4 eats our [], so we need to use [ and ] instead.
35214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35215  if test "x$has_forbidden_chars" != x; then
35216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35218  fi
35219
35220    # Output is in $new_path
35221
35222  windows_path="$new_path"
35223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35224    unix_path=`$CYGPATH -u "$windows_path"`
35225    new_path="$unix_path"
35226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35228    new_path="$unix_path"
35229  fi
35230
35231    # remove trailing .exe if any
35232    new_path="${new_path/%.exe/}"
35233
35234    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35235    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35236  fi
35237
35238    else
35239      # We're on a unix platform. Hooray! :)
35240      # First separate the path from the arguments. This will split at the first
35241      # space.
35242      complete="$CPP"
35243      path="${complete%% *}"
35244      tmp="$complete EOL"
35245      arguments="${tmp#* }"
35246
35247      # Cannot rely on the command "which" here since it doesn't always work.
35248      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35249      if test -z "$is_absolute_path"; then
35250        # Path to executable is not absolute. Find it.
35251        IFS_save="$IFS"
35252        IFS=:
35253        for p in $PATH; do
35254          if test -f "$p/$path" && test -x "$p/$path"; then
35255            new_path="$p/$path"
35256            break
35257          fi
35258        done
35259        IFS="$IFS_save"
35260      else
35261        # This is an absolute path, we can use it without further modifications.
35262        new_path="$path"
35263      fi
35264
35265      if test "x$new_path" = x; then
35266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35267$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35268        has_space=`$ECHO "$complete" | $GREP " "`
35269        if test "x$has_space" != x; then
35270          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35271$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35272        fi
35273        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35274      fi
35275    fi
35276
35277    # Now join together the path and the arguments once again
35278    if test "x$arguments" != xEOL; then
35279      new_complete="$new_path ${arguments% *}"
35280    else
35281      new_complete="$new_path"
35282    fi
35283
35284    if test "x$complete" != "x$new_complete"; then
35285      CPP="$new_complete"
35286      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35287$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35288    fi
35289  fi
35290
35291  ac_ext=cpp
35292ac_cpp='$CXXCPP $CPPFLAGS'
35293ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35294ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35295ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35297$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35298if test -z "$CXXCPP"; then
35299  if ${ac_cv_prog_CXXCPP+:} false; then :
35300  $as_echo_n "(cached) " >&6
35301else
35302      # Double quotes because CXXCPP needs to be expanded
35303    for CXXCPP in "$CXX -E" "/lib/cpp"
35304    do
35305      ac_preproc_ok=false
35306for ac_cxx_preproc_warn_flag in '' yes
35307do
35308  # Use a header file that comes with gcc, so configuring glibc
35309  # with a fresh cross-compiler works.
35310  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35311  # <limits.h> exists even on freestanding compilers.
35312  # On the NeXT, cc -E runs the code through the compiler's parser,
35313  # not just through cpp. "Syntax error" is here to catch this case.
35314  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35315/* end confdefs.h.  */
35316#ifdef __STDC__
35317# include <limits.h>
35318#else
35319# include <assert.h>
35320#endif
35321		     Syntax error
35322_ACEOF
35323if ac_fn_cxx_try_cpp "$LINENO"; then :
35324
35325else
35326  # Broken: fails on valid input.
35327continue
35328fi
35329rm -f conftest.err conftest.i conftest.$ac_ext
35330
35331  # OK, works on sane cases.  Now check whether nonexistent headers
35332  # can be detected and how.
35333  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35334/* end confdefs.h.  */
35335#include <ac_nonexistent.h>
35336_ACEOF
35337if ac_fn_cxx_try_cpp "$LINENO"; then :
35338  # Broken: success on invalid input.
35339continue
35340else
35341  # Passes both tests.
35342ac_preproc_ok=:
35343break
35344fi
35345rm -f conftest.err conftest.i conftest.$ac_ext
35346
35347done
35348# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35349rm -f conftest.i conftest.err conftest.$ac_ext
35350if $ac_preproc_ok; then :
35351  break
35352fi
35353
35354    done
35355    ac_cv_prog_CXXCPP=$CXXCPP
35356
35357fi
35358  CXXCPP=$ac_cv_prog_CXXCPP
35359else
35360  ac_cv_prog_CXXCPP=$CXXCPP
35361fi
35362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35363$as_echo "$CXXCPP" >&6; }
35364ac_preproc_ok=false
35365for ac_cxx_preproc_warn_flag in '' yes
35366do
35367  # Use a header file that comes with gcc, so configuring glibc
35368  # with a fresh cross-compiler works.
35369  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35370  # <limits.h> exists even on freestanding compilers.
35371  # On the NeXT, cc -E runs the code through the compiler's parser,
35372  # not just through cpp. "Syntax error" is here to catch this case.
35373  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35374/* end confdefs.h.  */
35375#ifdef __STDC__
35376# include <limits.h>
35377#else
35378# include <assert.h>
35379#endif
35380		     Syntax error
35381_ACEOF
35382if ac_fn_cxx_try_cpp "$LINENO"; then :
35383
35384else
35385  # Broken: fails on valid input.
35386continue
35387fi
35388rm -f conftest.err conftest.i conftest.$ac_ext
35389
35390  # OK, works on sane cases.  Now check whether nonexistent headers
35391  # can be detected and how.
35392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35393/* end confdefs.h.  */
35394#include <ac_nonexistent.h>
35395_ACEOF
35396if ac_fn_cxx_try_cpp "$LINENO"; then :
35397  # Broken: success on invalid input.
35398continue
35399else
35400  # Passes both tests.
35401ac_preproc_ok=:
35402break
35403fi
35404rm -f conftest.err conftest.i conftest.$ac_ext
35405
35406done
35407# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35408rm -f conftest.i conftest.err conftest.$ac_ext
35409if $ac_preproc_ok; then :
35410
35411else
35412  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35413$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35414as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35415See \`config.log' for more details" "$LINENO" 5; }
35416fi
35417
35418ac_ext=cpp
35419ac_cpp='$CXXCPP $CPPFLAGS'
35420ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35421ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35422ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35423
35424
35425  # Only process if variable expands to non-empty
35426
35427  if test "x$CXXCPP" != x; then
35428    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35429
35430  # First separate the path from the arguments. This will split at the first
35431  # space.
35432  complete="$CXXCPP"
35433  path="${complete%% *}"
35434  tmp="$complete EOL"
35435  arguments="${tmp#* }"
35436
35437  # Input might be given as Windows format, start by converting to
35438  # unix format.
35439  new_path=`$CYGPATH -u "$path"`
35440
35441  # Now try to locate executable using which
35442  new_path=`$WHICH "$new_path" 2> /dev/null`
35443  # bat and cmd files are not always considered executable in cygwin causing which
35444  # to not find them
35445  if test "x$new_path" = x \
35446      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35447      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35448    new_path=`$CYGPATH -u "$path"`
35449  fi
35450  if test "x$new_path" = x; then
35451    # Oops. Which didn't find the executable.
35452    # The splitting of arguments from the executable at a space might have been incorrect,
35453    # since paths with space are more likely in Windows. Give it another try with the whole
35454    # argument.
35455    path="$complete"
35456    arguments="EOL"
35457    new_path=`$CYGPATH -u "$path"`
35458    new_path=`$WHICH "$new_path" 2> /dev/null`
35459    # bat and cmd files are not always considered executable in cygwin causing which
35460    # to not find them
35461    if test "x$new_path" = x \
35462        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35463        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35464      new_path=`$CYGPATH -u "$path"`
35465    fi
35466    if test "x$new_path" = x; then
35467      # It's still not found. Now this is an unrecoverable error.
35468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35469$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35470      has_space=`$ECHO "$complete" | $GREP " "`
35471      if test "x$has_space" != x; then
35472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35474      fi
35475      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35476    fi
35477  fi
35478
35479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35482  # "foo.exe" is OK but "foo" is an error.
35483  #
35484  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35485  # It is also a way to make sure we got the proper file name for the real test later on.
35486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35487  if test "x$test_shortpath" = x; then
35488    # Short path failed, file does not exist as specified.
35489    # Try adding .exe or .cmd
35490    if test -f "${new_path}.exe"; then
35491      input_to_shortpath="${new_path}.exe"
35492    elif test -f "${new_path}.cmd"; then
35493      input_to_shortpath="${new_path}.cmd"
35494    else
35495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35496$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35497      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35498$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35499      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35500    fi
35501  else
35502    input_to_shortpath="$new_path"
35503  fi
35504
35505  # Call helper function which possibly converts this using DOS-style short mode.
35506  # If so, the updated path is stored in $new_path.
35507  new_path="$input_to_shortpath"
35508
35509  input_path="$input_to_shortpath"
35510  # Check if we need to convert this using DOS-style short mode. If the path
35511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35512  # take no chances and rewrite it.
35513  # Note: m4 eats our [], so we need to use [ and ] instead.
35514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35515  if test "x$has_forbidden_chars" != x; then
35516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35520      # Going to short mode and back again did indeed matter. Since short mode is
35521      # case insensitive, let's make it lowercase to improve readability.
35522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35523      # Now convert it back to Unix-style (cygpath)
35524      input_path=`$CYGPATH -u "$shortmode_path"`
35525      new_path="$input_path"
35526    fi
35527  fi
35528
35529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35530  if test "x$test_cygdrive_prefix" = x; then
35531    # As a simple fix, exclude /usr/bin since it's not a real path.
35532    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35534      # a path prefixed by /cygdrive for fixpath to work.
35535      new_path="$CYGWIN_ROOT_PATH$input_path"
35536    fi
35537  fi
35538
35539  # remove trailing .exe if any
35540  new_path="${new_path/%.exe/}"
35541
35542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35543
35544  # First separate the path from the arguments. This will split at the first
35545  # space.
35546  complete="$CXXCPP"
35547  path="${complete%% *}"
35548  tmp="$complete EOL"
35549  arguments="${tmp#* }"
35550
35551  # Input might be given as Windows format, start by converting to
35552  # unix format.
35553  new_path="$path"
35554
35555  windows_path="$new_path"
35556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35557    unix_path=`$CYGPATH -u "$windows_path"`
35558    new_path="$unix_path"
35559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35561    new_path="$unix_path"
35562  fi
35563
35564
35565  # Now try to locate executable using which
35566  new_path=`$WHICH "$new_path" 2> /dev/null`
35567
35568  if test "x$new_path" = x; then
35569    # Oops. Which didn't find the executable.
35570    # The splitting of arguments from the executable at a space might have been incorrect,
35571    # since paths with space are more likely in Windows. Give it another try with the whole
35572    # argument.
35573    path="$complete"
35574    arguments="EOL"
35575    new_path="$path"
35576
35577  windows_path="$new_path"
35578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35579    unix_path=`$CYGPATH -u "$windows_path"`
35580    new_path="$unix_path"
35581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35583    new_path="$unix_path"
35584  fi
35585
35586
35587    new_path=`$WHICH "$new_path" 2> /dev/null`
35588    # bat and cmd files are not always considered executable in MSYS causing which
35589    # to not find them
35590    if test "x$new_path" = x \
35591        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35592        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35593      new_path="$path"
35594
35595  windows_path="$new_path"
35596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35597    unix_path=`$CYGPATH -u "$windows_path"`
35598    new_path="$unix_path"
35599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35601    new_path="$unix_path"
35602  fi
35603
35604    fi
35605
35606    if test "x$new_path" = x; then
35607      # It's still not found. Now this is an unrecoverable error.
35608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35609$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35610      has_space=`$ECHO "$complete" | $GREP " "`
35611      if test "x$has_space" != x; then
35612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35614      fi
35615      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35616    fi
35617  fi
35618
35619  # Now new_path has a complete unix path to the binary
35620  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35621    # Keep paths in /bin as-is, but remove trailing .exe if any
35622    new_path="${new_path/%.exe/}"
35623    # Do not save /bin paths to all_fixpath_prefixes!
35624  else
35625    # Not in mixed or Windows style, start by that.
35626    new_path=`cmd //c echo $new_path`
35627
35628  input_path="$new_path"
35629  # Check if we need to convert this using DOS-style short mode. If the path
35630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35631  # take no chances and rewrite it.
35632  # Note: m4 eats our [], so we need to use [ and ] instead.
35633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35634  if test "x$has_forbidden_chars" != x; then
35635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35637  fi
35638
35639    # Output is in $new_path
35640
35641  windows_path="$new_path"
35642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35643    unix_path=`$CYGPATH -u "$windows_path"`
35644    new_path="$unix_path"
35645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35647    new_path="$unix_path"
35648  fi
35649
35650    # remove trailing .exe if any
35651    new_path="${new_path/%.exe/}"
35652
35653    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35654    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35655  fi
35656
35657    else
35658      # We're on a unix platform. Hooray! :)
35659      # First separate the path from the arguments. This will split at the first
35660      # space.
35661      complete="$CXXCPP"
35662      path="${complete%% *}"
35663      tmp="$complete EOL"
35664      arguments="${tmp#* }"
35665
35666      # Cannot rely on the command "which" here since it doesn't always work.
35667      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35668      if test -z "$is_absolute_path"; then
35669        # Path to executable is not absolute. Find it.
35670        IFS_save="$IFS"
35671        IFS=:
35672        for p in $PATH; do
35673          if test -f "$p/$path" && test -x "$p/$path"; then
35674            new_path="$p/$path"
35675            break
35676          fi
35677        done
35678        IFS="$IFS_save"
35679      else
35680        # This is an absolute path, we can use it without further modifications.
35681        new_path="$path"
35682      fi
35683
35684      if test "x$new_path" = x; then
35685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35686$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35687        has_space=`$ECHO "$complete" | $GREP " "`
35688        if test "x$has_space" != x; then
35689          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35690$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35691        fi
35692        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35693      fi
35694    fi
35695
35696    # Now join together the path and the arguments once again
35697    if test "x$arguments" != xEOL; then
35698      new_complete="$new_path ${arguments% *}"
35699    else
35700      new_complete="$new_path"
35701    fi
35702
35703    if test "x$complete" != "x$new_complete"; then
35704      CXXCPP="$new_complete"
35705      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35706$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35707    fi
35708  fi
35709
35710
35711  #
35712  # Setup the linker (LD)
35713  #
35714  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35715    # In the Microsoft toolchain we have a separate LD command "link".
35716    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35717    # a cygwin program for something completely different.
35718    # Extract the first word of "link", so it can be a program name with args.
35719set dummy link; ac_word=$2
35720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35721$as_echo_n "checking for $ac_word... " >&6; }
35722if ${ac_cv_prog_LD+:} false; then :
35723  $as_echo_n "(cached) " >&6
35724else
35725  if test -n "$LD"; then
35726  ac_cv_prog_LD="$LD" # Let the user override the test.
35727else
35728  ac_prog_rejected=no
35729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35730for as_dir in $PATH
35731do
35732  IFS=$as_save_IFS
35733  test -z "$as_dir" && as_dir=.
35734    for ac_exec_ext in '' $ac_executable_extensions; do
35735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35736    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35737       ac_prog_rejected=yes
35738       continue
35739     fi
35740    ac_cv_prog_LD="link"
35741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35742    break 2
35743  fi
35744done
35745  done
35746IFS=$as_save_IFS
35747
35748if test $ac_prog_rejected = yes; then
35749  # We found a bogon in the path, so make sure we never use it.
35750  set dummy $ac_cv_prog_LD
35751  shift
35752  if test $# != 0; then
35753    # We chose a different compiler from the bogus one.
35754    # However, it has the same basename, so the bogon will be chosen
35755    # first if we set LD to just the basename; use the full file name.
35756    shift
35757    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35758  fi
35759fi
35760fi
35761fi
35762LD=$ac_cv_prog_LD
35763if test -n "$LD"; then
35764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35765$as_echo "$LD" >&6; }
35766else
35767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35768$as_echo "no" >&6; }
35769fi
35770
35771
35772
35773  # Only process if variable expands to non-empty
35774
35775  if test "x$LD" != x; then
35776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35777
35778  # First separate the path from the arguments. This will split at the first
35779  # space.
35780  complete="$LD"
35781  path="${complete%% *}"
35782  tmp="$complete EOL"
35783  arguments="${tmp#* }"
35784
35785  # Input might be given as Windows format, start by converting to
35786  # unix format.
35787  new_path=`$CYGPATH -u "$path"`
35788
35789  # Now try to locate executable using which
35790  new_path=`$WHICH "$new_path" 2> /dev/null`
35791  # bat and cmd files are not always considered executable in cygwin causing which
35792  # to not find them
35793  if test "x$new_path" = x \
35794      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35795      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35796    new_path=`$CYGPATH -u "$path"`
35797  fi
35798  if test "x$new_path" = x; then
35799    # Oops. Which didn't find the executable.
35800    # The splitting of arguments from the executable at a space might have been incorrect,
35801    # since paths with space are more likely in Windows. Give it another try with the whole
35802    # argument.
35803    path="$complete"
35804    arguments="EOL"
35805    new_path=`$CYGPATH -u "$path"`
35806    new_path=`$WHICH "$new_path" 2> /dev/null`
35807    # bat and cmd files are not always considered executable in cygwin causing which
35808    # to not find them
35809    if test "x$new_path" = x \
35810        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35811        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35812      new_path=`$CYGPATH -u "$path"`
35813    fi
35814    if test "x$new_path" = x; then
35815      # It's still not found. Now this is an unrecoverable error.
35816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35817$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35818      has_space=`$ECHO "$complete" | $GREP " "`
35819      if test "x$has_space" != x; then
35820        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35821$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35822      fi
35823      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35824    fi
35825  fi
35826
35827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35830  # "foo.exe" is OK but "foo" is an error.
35831  #
35832  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35833  # It is also a way to make sure we got the proper file name for the real test later on.
35834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35835  if test "x$test_shortpath" = x; then
35836    # Short path failed, file does not exist as specified.
35837    # Try adding .exe or .cmd
35838    if test -f "${new_path}.exe"; then
35839      input_to_shortpath="${new_path}.exe"
35840    elif test -f "${new_path}.cmd"; then
35841      input_to_shortpath="${new_path}.cmd"
35842    else
35843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35844$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35845      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35846$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35847      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35848    fi
35849  else
35850    input_to_shortpath="$new_path"
35851  fi
35852
35853  # Call helper function which possibly converts this using DOS-style short mode.
35854  # If so, the updated path is stored in $new_path.
35855  new_path="$input_to_shortpath"
35856
35857  input_path="$input_to_shortpath"
35858  # Check if we need to convert this using DOS-style short mode. If the path
35859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35860  # take no chances and rewrite it.
35861  # Note: m4 eats our [], so we need to use [ and ] instead.
35862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35863  if test "x$has_forbidden_chars" != x; then
35864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35865    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35866    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35867    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35868      # Going to short mode and back again did indeed matter. Since short mode is
35869      # case insensitive, let's make it lowercase to improve readability.
35870      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35871      # Now convert it back to Unix-style (cygpath)
35872      input_path=`$CYGPATH -u "$shortmode_path"`
35873      new_path="$input_path"
35874    fi
35875  fi
35876
35877  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35878  if test "x$test_cygdrive_prefix" = x; then
35879    # As a simple fix, exclude /usr/bin since it's not a real path.
35880    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35881      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35882      # a path prefixed by /cygdrive for fixpath to work.
35883      new_path="$CYGWIN_ROOT_PATH$input_path"
35884    fi
35885  fi
35886
35887  # remove trailing .exe if any
35888  new_path="${new_path/%.exe/}"
35889
35890    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35891
35892  # First separate the path from the arguments. This will split at the first
35893  # space.
35894  complete="$LD"
35895  path="${complete%% *}"
35896  tmp="$complete EOL"
35897  arguments="${tmp#* }"
35898
35899  # Input might be given as Windows format, start by converting to
35900  # unix format.
35901  new_path="$path"
35902
35903  windows_path="$new_path"
35904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35905    unix_path=`$CYGPATH -u "$windows_path"`
35906    new_path="$unix_path"
35907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35909    new_path="$unix_path"
35910  fi
35911
35912
35913  # Now try to locate executable using which
35914  new_path=`$WHICH "$new_path" 2> /dev/null`
35915
35916  if test "x$new_path" = x; then
35917    # Oops. Which didn't find the executable.
35918    # The splitting of arguments from the executable at a space might have been incorrect,
35919    # since paths with space are more likely in Windows. Give it another try with the whole
35920    # argument.
35921    path="$complete"
35922    arguments="EOL"
35923    new_path="$path"
35924
35925  windows_path="$new_path"
35926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35927    unix_path=`$CYGPATH -u "$windows_path"`
35928    new_path="$unix_path"
35929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35931    new_path="$unix_path"
35932  fi
35933
35934
35935    new_path=`$WHICH "$new_path" 2> /dev/null`
35936    # bat and cmd files are not always considered executable in MSYS causing which
35937    # to not find them
35938    if test "x$new_path" = x \
35939        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35940        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35941      new_path="$path"
35942
35943  windows_path="$new_path"
35944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35945    unix_path=`$CYGPATH -u "$windows_path"`
35946    new_path="$unix_path"
35947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35949    new_path="$unix_path"
35950  fi
35951
35952    fi
35953
35954    if test "x$new_path" = x; then
35955      # It's still not found. Now this is an unrecoverable error.
35956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35957$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35958      has_space=`$ECHO "$complete" | $GREP " "`
35959      if test "x$has_space" != x; then
35960        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35961$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35962      fi
35963      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35964    fi
35965  fi
35966
35967  # Now new_path has a complete unix path to the binary
35968  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35969    # Keep paths in /bin as-is, but remove trailing .exe if any
35970    new_path="${new_path/%.exe/}"
35971    # Do not save /bin paths to all_fixpath_prefixes!
35972  else
35973    # Not in mixed or Windows style, start by that.
35974    new_path=`cmd //c echo $new_path`
35975
35976  input_path="$new_path"
35977  # Check if we need to convert this using DOS-style short mode. If the path
35978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35979  # take no chances and rewrite it.
35980  # Note: m4 eats our [], so we need to use [ and ] instead.
35981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35982  if test "x$has_forbidden_chars" != x; then
35983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35984    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35985  fi
35986
35987    # Output is in $new_path
35988
35989  windows_path="$new_path"
35990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35991    unix_path=`$CYGPATH -u "$windows_path"`
35992    new_path="$unix_path"
35993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35995    new_path="$unix_path"
35996  fi
35997
35998    # remove trailing .exe if any
35999    new_path="${new_path/%.exe/}"
36000
36001    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36002    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36003  fi
36004
36005    else
36006      # We're on a unix platform. Hooray! :)
36007      # First separate the path from the arguments. This will split at the first
36008      # space.
36009      complete="$LD"
36010      path="${complete%% *}"
36011      tmp="$complete EOL"
36012      arguments="${tmp#* }"
36013
36014      # Cannot rely on the command "which" here since it doesn't always work.
36015      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36016      if test -z "$is_absolute_path"; then
36017        # Path to executable is not absolute. Find it.
36018        IFS_save="$IFS"
36019        IFS=:
36020        for p in $PATH; do
36021          if test -f "$p/$path" && test -x "$p/$path"; then
36022            new_path="$p/$path"
36023            break
36024          fi
36025        done
36026        IFS="$IFS_save"
36027      else
36028        # This is an absolute path, we can use it without further modifications.
36029        new_path="$path"
36030      fi
36031
36032      if test "x$new_path" = x; then
36033        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36034$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36035        has_space=`$ECHO "$complete" | $GREP " "`
36036        if test "x$has_space" != x; then
36037          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36038$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36039        fi
36040        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36041      fi
36042    fi
36043
36044    # Now join together the path and the arguments once again
36045    if test "x$arguments" != xEOL; then
36046      new_complete="$new_path ${arguments% *}"
36047    else
36048      new_complete="$new_path"
36049    fi
36050
36051    if test "x$complete" != "x$new_complete"; then
36052      LD="$new_complete"
36053      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36054$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36055    fi
36056  fi
36057
36058    # Verify that we indeed succeeded with this trick.
36059    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36060$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36061    "$LD" --version > /dev/null
36062    if test $? -eq 0 ; then
36063      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36064$as_echo "no" >&6; }
36065      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36066    else
36067      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36068$as_echo "yes" >&6; }
36069    fi
36070    LDCXX="$LD"
36071  else
36072    # All other toolchains use the compiler to link.
36073    LD="$CC"
36074    LDCXX="$CXX"
36075  fi
36076
36077  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36078
36079
36080  #
36081  # Setup the assembler (AS)
36082  #
36083  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36084    # FIXME: should this really be solaris, or solstudio?
36085
36086
36087  # Publish this variable in the help.
36088
36089
36090  if [ -z "${AS+x}" ]; then
36091    # The variable is not set by user, try to locate tool using the code snippet
36092    for ac_prog in as
36093do
36094  # Extract the first word of "$ac_prog", so it can be a program name with args.
36095set dummy $ac_prog; ac_word=$2
36096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36097$as_echo_n "checking for $ac_word... " >&6; }
36098if ${ac_cv_path_AS+:} false; then :
36099  $as_echo_n "(cached) " >&6
36100else
36101  case $AS in
36102  [\\/]* | ?:[\\/]*)
36103  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36104  ;;
36105  *)
36106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36107for as_dir in $PATH
36108do
36109  IFS=$as_save_IFS
36110  test -z "$as_dir" && as_dir=.
36111    for ac_exec_ext in '' $ac_executable_extensions; do
36112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36113    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36115    break 2
36116  fi
36117done
36118  done
36119IFS=$as_save_IFS
36120
36121  ;;
36122esac
36123fi
36124AS=$ac_cv_path_AS
36125if test -n "$AS"; then
36126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36127$as_echo "$AS" >&6; }
36128else
36129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36130$as_echo "no" >&6; }
36131fi
36132
36133
36134  test -n "$AS" && break
36135done
36136
36137  else
36138    # The variable is set, but is it from the command line or the environment?
36139
36140    # Try to remove the string !AS! from our list.
36141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36143      # If it failed, the variable was not from the command line. Ignore it,
36144      # but warn the user (except for BASH, which is always set by the calling BASH).
36145      if test "xAS" != xBASH; then
36146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36147$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36148      fi
36149      # Try to locate tool using the code snippet
36150      for ac_prog in as
36151do
36152  # Extract the first word of "$ac_prog", so it can be a program name with args.
36153set dummy $ac_prog; ac_word=$2
36154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36155$as_echo_n "checking for $ac_word... " >&6; }
36156if ${ac_cv_path_AS+:} false; then :
36157  $as_echo_n "(cached) " >&6
36158else
36159  case $AS in
36160  [\\/]* | ?:[\\/]*)
36161  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36162  ;;
36163  *)
36164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36165for as_dir in $PATH
36166do
36167  IFS=$as_save_IFS
36168  test -z "$as_dir" && as_dir=.
36169    for ac_exec_ext in '' $ac_executable_extensions; do
36170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36171    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36173    break 2
36174  fi
36175done
36176  done
36177IFS=$as_save_IFS
36178
36179  ;;
36180esac
36181fi
36182AS=$ac_cv_path_AS
36183if test -n "$AS"; then
36184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36185$as_echo "$AS" >&6; }
36186else
36187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36188$as_echo "no" >&6; }
36189fi
36190
36191
36192  test -n "$AS" && break
36193done
36194
36195    else
36196      # If it succeeded, then it was overridden by the user. We will use it
36197      # for the tool.
36198
36199      # First remove it from the list of overridden variables, so we can test
36200      # for unknown variables in the end.
36201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36202
36203      # Check if we try to supply an empty value
36204      if test "x$AS" = x; then
36205        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36206$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36208$as_echo_n "checking for AS... " >&6; }
36209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36210$as_echo "disabled" >&6; }
36211      else
36212        # Check if the provided tool contains a complete path.
36213        tool_specified="$AS"
36214        tool_basename="${tool_specified##*/}"
36215        if test "x$tool_basename" = "x$tool_specified"; then
36216          # A command without a complete path is provided, search $PATH.
36217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36218$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36219          # Extract the first word of "$tool_basename", so it can be a program name with args.
36220set dummy $tool_basename; ac_word=$2
36221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36222$as_echo_n "checking for $ac_word... " >&6; }
36223if ${ac_cv_path_AS+:} false; then :
36224  $as_echo_n "(cached) " >&6
36225else
36226  case $AS in
36227  [\\/]* | ?:[\\/]*)
36228  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36229  ;;
36230  *)
36231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36232for as_dir in $PATH
36233do
36234  IFS=$as_save_IFS
36235  test -z "$as_dir" && as_dir=.
36236    for ac_exec_ext in '' $ac_executable_extensions; do
36237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36238    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36240    break 2
36241  fi
36242done
36243  done
36244IFS=$as_save_IFS
36245
36246  ;;
36247esac
36248fi
36249AS=$ac_cv_path_AS
36250if test -n "$AS"; then
36251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36252$as_echo "$AS" >&6; }
36253else
36254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36255$as_echo "no" >&6; }
36256fi
36257
36258
36259          if test "x$AS" = x; then
36260            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36261          fi
36262        else
36263          # Otherwise we believe it is a complete path. Use it as it is.
36264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36265$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36266          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36267$as_echo_n "checking for AS... " >&6; }
36268          if test ! -x "$tool_specified"; then
36269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36270$as_echo "not found" >&6; }
36271            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36272          fi
36273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36274$as_echo "$tool_specified" >&6; }
36275        fi
36276      fi
36277    fi
36278
36279  fi
36280
36281
36282
36283  # Only process if variable expands to non-empty
36284
36285  if test "x$AS" != x; then
36286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36287
36288  # First separate the path from the arguments. This will split at the first
36289  # space.
36290  complete="$AS"
36291  path="${complete%% *}"
36292  tmp="$complete EOL"
36293  arguments="${tmp#* }"
36294
36295  # Input might be given as Windows format, start by converting to
36296  # unix format.
36297  new_path=`$CYGPATH -u "$path"`
36298
36299  # Now try to locate executable using which
36300  new_path=`$WHICH "$new_path" 2> /dev/null`
36301  # bat and cmd files are not always considered executable in cygwin causing which
36302  # to not find them
36303  if test "x$new_path" = x \
36304      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36305      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36306    new_path=`$CYGPATH -u "$path"`
36307  fi
36308  if test "x$new_path" = x; then
36309    # Oops. Which didn't find the executable.
36310    # The splitting of arguments from the executable at a space might have been incorrect,
36311    # since paths with space are more likely in Windows. Give it another try with the whole
36312    # argument.
36313    path="$complete"
36314    arguments="EOL"
36315    new_path=`$CYGPATH -u "$path"`
36316    new_path=`$WHICH "$new_path" 2> /dev/null`
36317    # bat and cmd files are not always considered executable in cygwin causing which
36318    # to not find them
36319    if test "x$new_path" = x \
36320        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36321        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36322      new_path=`$CYGPATH -u "$path"`
36323    fi
36324    if test "x$new_path" = x; then
36325      # It's still not found. Now this is an unrecoverable error.
36326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36327$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36328      has_space=`$ECHO "$complete" | $GREP " "`
36329      if test "x$has_space" != x; then
36330        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36331$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36332      fi
36333      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36334    fi
36335  fi
36336
36337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36340  # "foo.exe" is OK but "foo" is an error.
36341  #
36342  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36343  # It is also a way to make sure we got the proper file name for the real test later on.
36344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36345  if test "x$test_shortpath" = x; then
36346    # Short path failed, file does not exist as specified.
36347    # Try adding .exe or .cmd
36348    if test -f "${new_path}.exe"; then
36349      input_to_shortpath="${new_path}.exe"
36350    elif test -f "${new_path}.cmd"; then
36351      input_to_shortpath="${new_path}.cmd"
36352    else
36353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36354$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36355      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36356$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36357      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36358    fi
36359  else
36360    input_to_shortpath="$new_path"
36361  fi
36362
36363  # Call helper function which possibly converts this using DOS-style short mode.
36364  # If so, the updated path is stored in $new_path.
36365  new_path="$input_to_shortpath"
36366
36367  input_path="$input_to_shortpath"
36368  # Check if we need to convert this using DOS-style short mode. If the path
36369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36370  # take no chances and rewrite it.
36371  # Note: m4 eats our [], so we need to use [ and ] instead.
36372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36373  if test "x$has_forbidden_chars" != x; then
36374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36378      # Going to short mode and back again did indeed matter. Since short mode is
36379      # case insensitive, let's make it lowercase to improve readability.
36380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36381      # Now convert it back to Unix-style (cygpath)
36382      input_path=`$CYGPATH -u "$shortmode_path"`
36383      new_path="$input_path"
36384    fi
36385  fi
36386
36387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36388  if test "x$test_cygdrive_prefix" = x; then
36389    # As a simple fix, exclude /usr/bin since it's not a real path.
36390    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36392      # a path prefixed by /cygdrive for fixpath to work.
36393      new_path="$CYGWIN_ROOT_PATH$input_path"
36394    fi
36395  fi
36396
36397  # remove trailing .exe if any
36398  new_path="${new_path/%.exe/}"
36399
36400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36401
36402  # First separate the path from the arguments. This will split at the first
36403  # space.
36404  complete="$AS"
36405  path="${complete%% *}"
36406  tmp="$complete EOL"
36407  arguments="${tmp#* }"
36408
36409  # Input might be given as Windows format, start by converting to
36410  # unix format.
36411  new_path="$path"
36412
36413  windows_path="$new_path"
36414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36415    unix_path=`$CYGPATH -u "$windows_path"`
36416    new_path="$unix_path"
36417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36419    new_path="$unix_path"
36420  fi
36421
36422
36423  # Now try to locate executable using which
36424  new_path=`$WHICH "$new_path" 2> /dev/null`
36425
36426  if test "x$new_path" = x; then
36427    # Oops. Which didn't find the executable.
36428    # The splitting of arguments from the executable at a space might have been incorrect,
36429    # since paths with space are more likely in Windows. Give it another try with the whole
36430    # argument.
36431    path="$complete"
36432    arguments="EOL"
36433    new_path="$path"
36434
36435  windows_path="$new_path"
36436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36437    unix_path=`$CYGPATH -u "$windows_path"`
36438    new_path="$unix_path"
36439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36441    new_path="$unix_path"
36442  fi
36443
36444
36445    new_path=`$WHICH "$new_path" 2> /dev/null`
36446    # bat and cmd files are not always considered executable in MSYS causing which
36447    # to not find them
36448    if test "x$new_path" = x \
36449        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36450        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36451      new_path="$path"
36452
36453  windows_path="$new_path"
36454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36455    unix_path=`$CYGPATH -u "$windows_path"`
36456    new_path="$unix_path"
36457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36459    new_path="$unix_path"
36460  fi
36461
36462    fi
36463
36464    if test "x$new_path" = x; then
36465      # It's still not found. Now this is an unrecoverable error.
36466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36467$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36468      has_space=`$ECHO "$complete" | $GREP " "`
36469      if test "x$has_space" != x; then
36470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36472      fi
36473      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36474    fi
36475  fi
36476
36477  # Now new_path has a complete unix path to the binary
36478  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36479    # Keep paths in /bin as-is, but remove trailing .exe if any
36480    new_path="${new_path/%.exe/}"
36481    # Do not save /bin paths to all_fixpath_prefixes!
36482  else
36483    # Not in mixed or Windows style, start by that.
36484    new_path=`cmd //c echo $new_path`
36485
36486  input_path="$new_path"
36487  # Check if we need to convert this using DOS-style short mode. If the path
36488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36489  # take no chances and rewrite it.
36490  # Note: m4 eats our [], so we need to use [ and ] instead.
36491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36492  if test "x$has_forbidden_chars" != x; then
36493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36495  fi
36496
36497    # Output is in $new_path
36498
36499  windows_path="$new_path"
36500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36501    unix_path=`$CYGPATH -u "$windows_path"`
36502    new_path="$unix_path"
36503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36505    new_path="$unix_path"
36506  fi
36507
36508    # remove trailing .exe if any
36509    new_path="${new_path/%.exe/}"
36510
36511    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36512    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36513  fi
36514
36515    else
36516      # We're on a unix platform. Hooray! :)
36517      # First separate the path from the arguments. This will split at the first
36518      # space.
36519      complete="$AS"
36520      path="${complete%% *}"
36521      tmp="$complete EOL"
36522      arguments="${tmp#* }"
36523
36524      # Cannot rely on the command "which" here since it doesn't always work.
36525      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36526      if test -z "$is_absolute_path"; then
36527        # Path to executable is not absolute. Find it.
36528        IFS_save="$IFS"
36529        IFS=:
36530        for p in $PATH; do
36531          if test -f "$p/$path" && test -x "$p/$path"; then
36532            new_path="$p/$path"
36533            break
36534          fi
36535        done
36536        IFS="$IFS_save"
36537      else
36538        # This is an absolute path, we can use it without further modifications.
36539        new_path="$path"
36540      fi
36541
36542      if test "x$new_path" = x; then
36543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36544$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36545        has_space=`$ECHO "$complete" | $GREP " "`
36546        if test "x$has_space" != x; then
36547          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36548$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36549        fi
36550        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36551      fi
36552    fi
36553
36554    # Now join together the path and the arguments once again
36555    if test "x$arguments" != xEOL; then
36556      new_complete="$new_path ${arguments% *}"
36557    else
36558      new_complete="$new_path"
36559    fi
36560
36561    if test "x$complete" != "x$new_complete"; then
36562      AS="$new_complete"
36563      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36564$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36565    fi
36566  fi
36567
36568  else
36569    # FIXME: is this correct for microsoft?
36570    AS="$CC -c"
36571  fi
36572
36573
36574  #
36575  # Setup the archiver (AR)
36576  #
36577  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36578    # The corresponding ar tool is lib.exe (used to create static libraries)
36579    # Extract the first word of "lib", so it can be a program name with args.
36580set dummy lib; ac_word=$2
36581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36582$as_echo_n "checking for $ac_word... " >&6; }
36583if ${ac_cv_prog_AR+:} false; then :
36584  $as_echo_n "(cached) " >&6
36585else
36586  if test -n "$AR"; then
36587  ac_cv_prog_AR="$AR" # Let the user override the test.
36588else
36589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36590for as_dir in $PATH
36591do
36592  IFS=$as_save_IFS
36593  test -z "$as_dir" && as_dir=.
36594    for ac_exec_ext in '' $ac_executable_extensions; do
36595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36596    ac_cv_prog_AR="lib"
36597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36598    break 2
36599  fi
36600done
36601  done
36602IFS=$as_save_IFS
36603
36604fi
36605fi
36606AR=$ac_cv_prog_AR
36607if test -n "$AR"; then
36608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36609$as_echo "$AR" >&6; }
36610else
36611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36612$as_echo "no" >&6; }
36613fi
36614
36615
36616  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36617
36618
36619  # Publish this variable in the help.
36620
36621
36622  if [ -z "${AR+x}" ]; then
36623    # The variable is not set by user, try to locate tool using the code snippet
36624    if test -n "$ac_tool_prefix"; then
36625  for ac_prog in ar gcc-ar
36626  do
36627    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36628set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36630$as_echo_n "checking for $ac_word... " >&6; }
36631if ${ac_cv_prog_AR+:} false; then :
36632  $as_echo_n "(cached) " >&6
36633else
36634  if test -n "$AR"; then
36635  ac_cv_prog_AR="$AR" # Let the user override the test.
36636else
36637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36638for as_dir in $PATH
36639do
36640  IFS=$as_save_IFS
36641  test -z "$as_dir" && as_dir=.
36642    for ac_exec_ext in '' $ac_executable_extensions; do
36643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36644    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36646    break 2
36647  fi
36648done
36649  done
36650IFS=$as_save_IFS
36651
36652fi
36653fi
36654AR=$ac_cv_prog_AR
36655if test -n "$AR"; then
36656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36657$as_echo "$AR" >&6; }
36658else
36659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36660$as_echo "no" >&6; }
36661fi
36662
36663
36664    test -n "$AR" && break
36665  done
36666fi
36667if test -z "$AR"; then
36668  ac_ct_AR=$AR
36669  for ac_prog in ar gcc-ar
36670do
36671  # Extract the first word of "$ac_prog", so it can be a program name with args.
36672set dummy $ac_prog; ac_word=$2
36673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36674$as_echo_n "checking for $ac_word... " >&6; }
36675if ${ac_cv_prog_ac_ct_AR+:} false; then :
36676  $as_echo_n "(cached) " >&6
36677else
36678  if test -n "$ac_ct_AR"; then
36679  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36680else
36681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36682for as_dir in $PATH
36683do
36684  IFS=$as_save_IFS
36685  test -z "$as_dir" && as_dir=.
36686    for ac_exec_ext in '' $ac_executable_extensions; do
36687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36688    ac_cv_prog_ac_ct_AR="$ac_prog"
36689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36690    break 2
36691  fi
36692done
36693  done
36694IFS=$as_save_IFS
36695
36696fi
36697fi
36698ac_ct_AR=$ac_cv_prog_ac_ct_AR
36699if test -n "$ac_ct_AR"; then
36700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36701$as_echo "$ac_ct_AR" >&6; }
36702else
36703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36704$as_echo "no" >&6; }
36705fi
36706
36707
36708  test -n "$ac_ct_AR" && break
36709done
36710
36711  if test "x$ac_ct_AR" = x; then
36712    AR=""
36713  else
36714    case $cross_compiling:$ac_tool_warned in
36715yes:)
36716{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36717$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36718ac_tool_warned=yes ;;
36719esac
36720    AR=$ac_ct_AR
36721  fi
36722fi
36723
36724  else
36725    # The variable is set, but is it from the command line or the environment?
36726
36727    # Try to remove the string !AR! from our list.
36728    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36729    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36730      # If it failed, the variable was not from the command line. Ignore it,
36731      # but warn the user (except for BASH, which is always set by the calling BASH).
36732      if test "xAR" != xBASH; then
36733        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36734$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36735      fi
36736      # Try to locate tool using the code snippet
36737      if test -n "$ac_tool_prefix"; then
36738  for ac_prog in ar gcc-ar
36739  do
36740    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36741set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36743$as_echo_n "checking for $ac_word... " >&6; }
36744if ${ac_cv_prog_AR+:} false; then :
36745  $as_echo_n "(cached) " >&6
36746else
36747  if test -n "$AR"; then
36748  ac_cv_prog_AR="$AR" # Let the user override the test.
36749else
36750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36751for as_dir in $PATH
36752do
36753  IFS=$as_save_IFS
36754  test -z "$as_dir" && as_dir=.
36755    for ac_exec_ext in '' $ac_executable_extensions; do
36756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36757    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36759    break 2
36760  fi
36761done
36762  done
36763IFS=$as_save_IFS
36764
36765fi
36766fi
36767AR=$ac_cv_prog_AR
36768if test -n "$AR"; then
36769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36770$as_echo "$AR" >&6; }
36771else
36772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36773$as_echo "no" >&6; }
36774fi
36775
36776
36777    test -n "$AR" && break
36778  done
36779fi
36780if test -z "$AR"; then
36781  ac_ct_AR=$AR
36782  for ac_prog in ar gcc-ar
36783do
36784  # Extract the first word of "$ac_prog", so it can be a program name with args.
36785set dummy $ac_prog; ac_word=$2
36786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36787$as_echo_n "checking for $ac_word... " >&6; }
36788if ${ac_cv_prog_ac_ct_AR+:} false; then :
36789  $as_echo_n "(cached) " >&6
36790else
36791  if test -n "$ac_ct_AR"; then
36792  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36793else
36794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36795for as_dir in $PATH
36796do
36797  IFS=$as_save_IFS
36798  test -z "$as_dir" && as_dir=.
36799    for ac_exec_ext in '' $ac_executable_extensions; do
36800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36801    ac_cv_prog_ac_ct_AR="$ac_prog"
36802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36803    break 2
36804  fi
36805done
36806  done
36807IFS=$as_save_IFS
36808
36809fi
36810fi
36811ac_ct_AR=$ac_cv_prog_ac_ct_AR
36812if test -n "$ac_ct_AR"; then
36813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36814$as_echo "$ac_ct_AR" >&6; }
36815else
36816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36817$as_echo "no" >&6; }
36818fi
36819
36820
36821  test -n "$ac_ct_AR" && break
36822done
36823
36824  if test "x$ac_ct_AR" = x; then
36825    AR=""
36826  else
36827    case $cross_compiling:$ac_tool_warned in
36828yes:)
36829{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36830$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36831ac_tool_warned=yes ;;
36832esac
36833    AR=$ac_ct_AR
36834  fi
36835fi
36836
36837    else
36838      # If it succeeded, then it was overridden by the user. We will use it
36839      # for the tool.
36840
36841      # First remove it from the list of overridden variables, so we can test
36842      # for unknown variables in the end.
36843      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36844
36845      # Check if we try to supply an empty value
36846      if test "x$AR" = x; then
36847        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36848$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36849        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36850$as_echo_n "checking for AR... " >&6; }
36851        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36852$as_echo "disabled" >&6; }
36853      else
36854        # Check if the provided tool contains a complete path.
36855        tool_specified="$AR"
36856        tool_basename="${tool_specified##*/}"
36857        if test "x$tool_basename" = "x$tool_specified"; then
36858          # A command without a complete path is provided, search $PATH.
36859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36860$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36861          # Extract the first word of "$tool_basename", so it can be a program name with args.
36862set dummy $tool_basename; ac_word=$2
36863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36864$as_echo_n "checking for $ac_word... " >&6; }
36865if ${ac_cv_path_AR+:} false; then :
36866  $as_echo_n "(cached) " >&6
36867else
36868  case $AR in
36869  [\\/]* | ?:[\\/]*)
36870  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36871  ;;
36872  *)
36873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36874for as_dir in $PATH
36875do
36876  IFS=$as_save_IFS
36877  test -z "$as_dir" && as_dir=.
36878    for ac_exec_ext in '' $ac_executable_extensions; do
36879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36880    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36882    break 2
36883  fi
36884done
36885  done
36886IFS=$as_save_IFS
36887
36888  ;;
36889esac
36890fi
36891AR=$ac_cv_path_AR
36892if test -n "$AR"; then
36893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36894$as_echo "$AR" >&6; }
36895else
36896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36897$as_echo "no" >&6; }
36898fi
36899
36900
36901          if test "x$AR" = x; then
36902            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36903          fi
36904        else
36905          # Otherwise we believe it is a complete path. Use it as it is.
36906          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36907$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36908          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36909$as_echo_n "checking for AR... " >&6; }
36910          if test ! -x "$tool_specified"; then
36911            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36912$as_echo "not found" >&6; }
36913            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36914          fi
36915          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36916$as_echo "$tool_specified" >&6; }
36917        fi
36918      fi
36919    fi
36920
36921  fi
36922
36923
36924  else
36925
36926
36927  # Publish this variable in the help.
36928
36929
36930  if [ -z "${AR+x}" ]; then
36931    # The variable is not set by user, try to locate tool using the code snippet
36932    if test -n "$ac_tool_prefix"; then
36933  for ac_prog in ar
36934  do
36935    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36936set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36938$as_echo_n "checking for $ac_word... " >&6; }
36939if ${ac_cv_prog_AR+:} false; then :
36940  $as_echo_n "(cached) " >&6
36941else
36942  if test -n "$AR"; then
36943  ac_cv_prog_AR="$AR" # Let the user override the test.
36944else
36945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36946for as_dir in $PATH
36947do
36948  IFS=$as_save_IFS
36949  test -z "$as_dir" && as_dir=.
36950    for ac_exec_ext in '' $ac_executable_extensions; do
36951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36952    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36954    break 2
36955  fi
36956done
36957  done
36958IFS=$as_save_IFS
36959
36960fi
36961fi
36962AR=$ac_cv_prog_AR
36963if test -n "$AR"; then
36964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36965$as_echo "$AR" >&6; }
36966else
36967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36968$as_echo "no" >&6; }
36969fi
36970
36971
36972    test -n "$AR" && break
36973  done
36974fi
36975if test -z "$AR"; then
36976  ac_ct_AR=$AR
36977  for ac_prog in ar
36978do
36979  # Extract the first word of "$ac_prog", so it can be a program name with args.
36980set dummy $ac_prog; ac_word=$2
36981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36982$as_echo_n "checking for $ac_word... " >&6; }
36983if ${ac_cv_prog_ac_ct_AR+:} false; then :
36984  $as_echo_n "(cached) " >&6
36985else
36986  if test -n "$ac_ct_AR"; then
36987  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36988else
36989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36990for as_dir in $PATH
36991do
36992  IFS=$as_save_IFS
36993  test -z "$as_dir" && as_dir=.
36994    for ac_exec_ext in '' $ac_executable_extensions; do
36995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36996    ac_cv_prog_ac_ct_AR="$ac_prog"
36997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36998    break 2
36999  fi
37000done
37001  done
37002IFS=$as_save_IFS
37003
37004fi
37005fi
37006ac_ct_AR=$ac_cv_prog_ac_ct_AR
37007if test -n "$ac_ct_AR"; then
37008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37009$as_echo "$ac_ct_AR" >&6; }
37010else
37011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37012$as_echo "no" >&6; }
37013fi
37014
37015
37016  test -n "$ac_ct_AR" && break
37017done
37018
37019  if test "x$ac_ct_AR" = x; then
37020    AR=""
37021  else
37022    case $cross_compiling:$ac_tool_warned in
37023yes:)
37024{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37025$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37026ac_tool_warned=yes ;;
37027esac
37028    AR=$ac_ct_AR
37029  fi
37030fi
37031
37032  else
37033    # The variable is set, but is it from the command line or the environment?
37034
37035    # Try to remove the string !AR! from our list.
37036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37038      # If it failed, the variable was not from the command line. Ignore it,
37039      # but warn the user (except for BASH, which is always set by the calling BASH).
37040      if test "xAR" != xBASH; then
37041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37042$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37043      fi
37044      # Try to locate tool using the code snippet
37045      if test -n "$ac_tool_prefix"; then
37046  for ac_prog in ar
37047  do
37048    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37049set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37051$as_echo_n "checking for $ac_word... " >&6; }
37052if ${ac_cv_prog_AR+:} false; then :
37053  $as_echo_n "(cached) " >&6
37054else
37055  if test -n "$AR"; then
37056  ac_cv_prog_AR="$AR" # Let the user override the test.
37057else
37058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37059for as_dir in $PATH
37060do
37061  IFS=$as_save_IFS
37062  test -z "$as_dir" && as_dir=.
37063    for ac_exec_ext in '' $ac_executable_extensions; do
37064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37065    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37067    break 2
37068  fi
37069done
37070  done
37071IFS=$as_save_IFS
37072
37073fi
37074fi
37075AR=$ac_cv_prog_AR
37076if test -n "$AR"; then
37077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37078$as_echo "$AR" >&6; }
37079else
37080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37081$as_echo "no" >&6; }
37082fi
37083
37084
37085    test -n "$AR" && break
37086  done
37087fi
37088if test -z "$AR"; then
37089  ac_ct_AR=$AR
37090  for ac_prog in ar
37091do
37092  # Extract the first word of "$ac_prog", so it can be a program name with args.
37093set dummy $ac_prog; ac_word=$2
37094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37095$as_echo_n "checking for $ac_word... " >&6; }
37096if ${ac_cv_prog_ac_ct_AR+:} false; then :
37097  $as_echo_n "(cached) " >&6
37098else
37099  if test -n "$ac_ct_AR"; then
37100  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37101else
37102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37103for as_dir in $PATH
37104do
37105  IFS=$as_save_IFS
37106  test -z "$as_dir" && as_dir=.
37107    for ac_exec_ext in '' $ac_executable_extensions; do
37108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37109    ac_cv_prog_ac_ct_AR="$ac_prog"
37110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37111    break 2
37112  fi
37113done
37114  done
37115IFS=$as_save_IFS
37116
37117fi
37118fi
37119ac_ct_AR=$ac_cv_prog_ac_ct_AR
37120if test -n "$ac_ct_AR"; then
37121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37122$as_echo "$ac_ct_AR" >&6; }
37123else
37124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37125$as_echo "no" >&6; }
37126fi
37127
37128
37129  test -n "$ac_ct_AR" && break
37130done
37131
37132  if test "x$ac_ct_AR" = x; then
37133    AR=""
37134  else
37135    case $cross_compiling:$ac_tool_warned in
37136yes:)
37137{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37138$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37139ac_tool_warned=yes ;;
37140esac
37141    AR=$ac_ct_AR
37142  fi
37143fi
37144
37145    else
37146      # If it succeeded, then it was overridden by the user. We will use it
37147      # for the tool.
37148
37149      # First remove it from the list of overridden variables, so we can test
37150      # for unknown variables in the end.
37151      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37152
37153      # Check if we try to supply an empty value
37154      if test "x$AR" = x; then
37155        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37156$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37157        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37158$as_echo_n "checking for AR... " >&6; }
37159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37160$as_echo "disabled" >&6; }
37161      else
37162        # Check if the provided tool contains a complete path.
37163        tool_specified="$AR"
37164        tool_basename="${tool_specified##*/}"
37165        if test "x$tool_basename" = "x$tool_specified"; then
37166          # A command without a complete path is provided, search $PATH.
37167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37168$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37169          # Extract the first word of "$tool_basename", so it can be a program name with args.
37170set dummy $tool_basename; ac_word=$2
37171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37172$as_echo_n "checking for $ac_word... " >&6; }
37173if ${ac_cv_path_AR+:} false; then :
37174  $as_echo_n "(cached) " >&6
37175else
37176  case $AR in
37177  [\\/]* | ?:[\\/]*)
37178  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37179  ;;
37180  *)
37181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37182for as_dir in $PATH
37183do
37184  IFS=$as_save_IFS
37185  test -z "$as_dir" && as_dir=.
37186    for ac_exec_ext in '' $ac_executable_extensions; do
37187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37188    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37190    break 2
37191  fi
37192done
37193  done
37194IFS=$as_save_IFS
37195
37196  ;;
37197esac
37198fi
37199AR=$ac_cv_path_AR
37200if test -n "$AR"; then
37201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37202$as_echo "$AR" >&6; }
37203else
37204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37205$as_echo "no" >&6; }
37206fi
37207
37208
37209          if test "x$AR" = x; then
37210            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37211          fi
37212        else
37213          # Otherwise we believe it is a complete path. Use it as it is.
37214          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37215$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37216          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37217$as_echo_n "checking for AR... " >&6; }
37218          if test ! -x "$tool_specified"; then
37219            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37220$as_echo "not found" >&6; }
37221            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37222          fi
37223          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37224$as_echo "$tool_specified" >&6; }
37225        fi
37226      fi
37227    fi
37228
37229  fi
37230
37231
37232  fi
37233
37234  # Only process if variable expands to non-empty
37235
37236  if test "x$AR" != x; then
37237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37238
37239  # First separate the path from the arguments. This will split at the first
37240  # space.
37241  complete="$AR"
37242  path="${complete%% *}"
37243  tmp="$complete EOL"
37244  arguments="${tmp#* }"
37245
37246  # Input might be given as Windows format, start by converting to
37247  # unix format.
37248  new_path=`$CYGPATH -u "$path"`
37249
37250  # Now try to locate executable using which
37251  new_path=`$WHICH "$new_path" 2> /dev/null`
37252  # bat and cmd files are not always considered executable in cygwin causing which
37253  # to not find them
37254  if test "x$new_path" = x \
37255      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37256      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37257    new_path=`$CYGPATH -u "$path"`
37258  fi
37259  if test "x$new_path" = x; then
37260    # Oops. Which didn't find the executable.
37261    # The splitting of arguments from the executable at a space might have been incorrect,
37262    # since paths with space are more likely in Windows. Give it another try with the whole
37263    # argument.
37264    path="$complete"
37265    arguments="EOL"
37266    new_path=`$CYGPATH -u "$path"`
37267    new_path=`$WHICH "$new_path" 2> /dev/null`
37268    # bat and cmd files are not always considered executable in cygwin causing which
37269    # to not find them
37270    if test "x$new_path" = x \
37271        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37272        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37273      new_path=`$CYGPATH -u "$path"`
37274    fi
37275    if test "x$new_path" = x; then
37276      # It's still not found. Now this is an unrecoverable error.
37277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37278$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37279      has_space=`$ECHO "$complete" | $GREP " "`
37280      if test "x$has_space" != x; then
37281        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37282$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37283      fi
37284      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37285    fi
37286  fi
37287
37288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37291  # "foo.exe" is OK but "foo" is an error.
37292  #
37293  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37294  # It is also a way to make sure we got the proper file name for the real test later on.
37295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37296  if test "x$test_shortpath" = x; then
37297    # Short path failed, file does not exist as specified.
37298    # Try adding .exe or .cmd
37299    if test -f "${new_path}.exe"; then
37300      input_to_shortpath="${new_path}.exe"
37301    elif test -f "${new_path}.cmd"; then
37302      input_to_shortpath="${new_path}.cmd"
37303    else
37304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37305$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37306      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37307$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37308      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37309    fi
37310  else
37311    input_to_shortpath="$new_path"
37312  fi
37313
37314  # Call helper function which possibly converts this using DOS-style short mode.
37315  # If so, the updated path is stored in $new_path.
37316  new_path="$input_to_shortpath"
37317
37318  input_path="$input_to_shortpath"
37319  # Check if we need to convert this using DOS-style short mode. If the path
37320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37321  # take no chances and rewrite it.
37322  # Note: m4 eats our [], so we need to use [ and ] instead.
37323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37324  if test "x$has_forbidden_chars" != x; then
37325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37329      # Going to short mode and back again did indeed matter. Since short mode is
37330      # case insensitive, let's make it lowercase to improve readability.
37331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37332      # Now convert it back to Unix-style (cygpath)
37333      input_path=`$CYGPATH -u "$shortmode_path"`
37334      new_path="$input_path"
37335    fi
37336  fi
37337
37338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37339  if test "x$test_cygdrive_prefix" = x; then
37340    # As a simple fix, exclude /usr/bin since it's not a real path.
37341    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37343      # a path prefixed by /cygdrive for fixpath to work.
37344      new_path="$CYGWIN_ROOT_PATH$input_path"
37345    fi
37346  fi
37347
37348  # remove trailing .exe if any
37349  new_path="${new_path/%.exe/}"
37350
37351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37352
37353  # First separate the path from the arguments. This will split at the first
37354  # space.
37355  complete="$AR"
37356  path="${complete%% *}"
37357  tmp="$complete EOL"
37358  arguments="${tmp#* }"
37359
37360  # Input might be given as Windows format, start by converting to
37361  # unix format.
37362  new_path="$path"
37363
37364  windows_path="$new_path"
37365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37366    unix_path=`$CYGPATH -u "$windows_path"`
37367    new_path="$unix_path"
37368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37370    new_path="$unix_path"
37371  fi
37372
37373
37374  # Now try to locate executable using which
37375  new_path=`$WHICH "$new_path" 2> /dev/null`
37376
37377  if test "x$new_path" = x; then
37378    # Oops. Which didn't find the executable.
37379    # The splitting of arguments from the executable at a space might have been incorrect,
37380    # since paths with space are more likely in Windows. Give it another try with the whole
37381    # argument.
37382    path="$complete"
37383    arguments="EOL"
37384    new_path="$path"
37385
37386  windows_path="$new_path"
37387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37388    unix_path=`$CYGPATH -u "$windows_path"`
37389    new_path="$unix_path"
37390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37392    new_path="$unix_path"
37393  fi
37394
37395
37396    new_path=`$WHICH "$new_path" 2> /dev/null`
37397    # bat and cmd files are not always considered executable in MSYS causing which
37398    # to not find them
37399    if test "x$new_path" = x \
37400        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37401        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37402      new_path="$path"
37403
37404  windows_path="$new_path"
37405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37406    unix_path=`$CYGPATH -u "$windows_path"`
37407    new_path="$unix_path"
37408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37410    new_path="$unix_path"
37411  fi
37412
37413    fi
37414
37415    if test "x$new_path" = x; then
37416      # It's still not found. Now this is an unrecoverable error.
37417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37418$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37419      has_space=`$ECHO "$complete" | $GREP " "`
37420      if test "x$has_space" != x; then
37421        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37422$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37423      fi
37424      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37425    fi
37426  fi
37427
37428  # Now new_path has a complete unix path to the binary
37429  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37430    # Keep paths in /bin as-is, but remove trailing .exe if any
37431    new_path="${new_path/%.exe/}"
37432    # Do not save /bin paths to all_fixpath_prefixes!
37433  else
37434    # Not in mixed or Windows style, start by that.
37435    new_path=`cmd //c echo $new_path`
37436
37437  input_path="$new_path"
37438  # Check if we need to convert this using DOS-style short mode. If the path
37439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37440  # take no chances and rewrite it.
37441  # Note: m4 eats our [], so we need to use [ and ] instead.
37442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37443  if test "x$has_forbidden_chars" != x; then
37444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37446  fi
37447
37448    # Output is in $new_path
37449
37450  windows_path="$new_path"
37451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37452    unix_path=`$CYGPATH -u "$windows_path"`
37453    new_path="$unix_path"
37454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37456    new_path="$unix_path"
37457  fi
37458
37459    # remove trailing .exe if any
37460    new_path="${new_path/%.exe/}"
37461
37462    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37463    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37464  fi
37465
37466    else
37467      # We're on a unix platform. Hooray! :)
37468      # First separate the path from the arguments. This will split at the first
37469      # space.
37470      complete="$AR"
37471      path="${complete%% *}"
37472      tmp="$complete EOL"
37473      arguments="${tmp#* }"
37474
37475      # Cannot rely on the command "which" here since it doesn't always work.
37476      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37477      if test -z "$is_absolute_path"; then
37478        # Path to executable is not absolute. Find it.
37479        IFS_save="$IFS"
37480        IFS=:
37481        for p in $PATH; do
37482          if test -f "$p/$path" && test -x "$p/$path"; then
37483            new_path="$p/$path"
37484            break
37485          fi
37486        done
37487        IFS="$IFS_save"
37488      else
37489        # This is an absolute path, we can use it without further modifications.
37490        new_path="$path"
37491      fi
37492
37493      if test "x$new_path" = x; then
37494        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37495$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37496        has_space=`$ECHO "$complete" | $GREP " "`
37497        if test "x$has_space" != x; then
37498          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37499$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37500        fi
37501        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37502      fi
37503    fi
37504
37505    # Now join together the path and the arguments once again
37506    if test "x$arguments" != xEOL; then
37507      new_complete="$new_path ${arguments% *}"
37508    else
37509      new_complete="$new_path"
37510    fi
37511
37512    if test "x$complete" != "x$new_complete"; then
37513      AR="$new_complete"
37514      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37515$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37516    fi
37517  fi
37518
37519
37520
37521  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37522
37523
37524  # Publish this variable in the help.
37525
37526
37527  if [ -z "${LIPO+x}" ]; then
37528    # The variable is not set by user, try to locate tool using the code snippet
37529    for ac_prog in lipo
37530do
37531  # Extract the first word of "$ac_prog", so it can be a program name with args.
37532set dummy $ac_prog; ac_word=$2
37533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37534$as_echo_n "checking for $ac_word... " >&6; }
37535if ${ac_cv_path_LIPO+:} false; then :
37536  $as_echo_n "(cached) " >&6
37537else
37538  case $LIPO in
37539  [\\/]* | ?:[\\/]*)
37540  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37541  ;;
37542  *)
37543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37544for as_dir in $PATH
37545do
37546  IFS=$as_save_IFS
37547  test -z "$as_dir" && as_dir=.
37548    for ac_exec_ext in '' $ac_executable_extensions; do
37549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37550    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37552    break 2
37553  fi
37554done
37555  done
37556IFS=$as_save_IFS
37557
37558  ;;
37559esac
37560fi
37561LIPO=$ac_cv_path_LIPO
37562if test -n "$LIPO"; then
37563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37564$as_echo "$LIPO" >&6; }
37565else
37566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37567$as_echo "no" >&6; }
37568fi
37569
37570
37571  test -n "$LIPO" && break
37572done
37573
37574  else
37575    # The variable is set, but is it from the command line or the environment?
37576
37577    # Try to remove the string !LIPO! from our list.
37578    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37579    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37580      # If it failed, the variable was not from the command line. Ignore it,
37581      # but warn the user (except for BASH, which is always set by the calling BASH).
37582      if test "xLIPO" != xBASH; then
37583        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37584$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37585      fi
37586      # Try to locate tool using the code snippet
37587      for ac_prog in lipo
37588do
37589  # Extract the first word of "$ac_prog", so it can be a program name with args.
37590set dummy $ac_prog; ac_word=$2
37591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37592$as_echo_n "checking for $ac_word... " >&6; }
37593if ${ac_cv_path_LIPO+:} false; then :
37594  $as_echo_n "(cached) " >&6
37595else
37596  case $LIPO in
37597  [\\/]* | ?:[\\/]*)
37598  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37599  ;;
37600  *)
37601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37602for as_dir in $PATH
37603do
37604  IFS=$as_save_IFS
37605  test -z "$as_dir" && as_dir=.
37606    for ac_exec_ext in '' $ac_executable_extensions; do
37607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37608    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37610    break 2
37611  fi
37612done
37613  done
37614IFS=$as_save_IFS
37615
37616  ;;
37617esac
37618fi
37619LIPO=$ac_cv_path_LIPO
37620if test -n "$LIPO"; then
37621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37622$as_echo "$LIPO" >&6; }
37623else
37624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37625$as_echo "no" >&6; }
37626fi
37627
37628
37629  test -n "$LIPO" && break
37630done
37631
37632    else
37633      # If it succeeded, then it was overridden by the user. We will use it
37634      # for the tool.
37635
37636      # First remove it from the list of overridden variables, so we can test
37637      # for unknown variables in the end.
37638      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37639
37640      # Check if we try to supply an empty value
37641      if test "x$LIPO" = x; then
37642        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37643$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37644        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37645$as_echo_n "checking for LIPO... " >&6; }
37646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37647$as_echo "disabled" >&6; }
37648      else
37649        # Check if the provided tool contains a complete path.
37650        tool_specified="$LIPO"
37651        tool_basename="${tool_specified##*/}"
37652        if test "x$tool_basename" = "x$tool_specified"; then
37653          # A command without a complete path is provided, search $PATH.
37654          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37655$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37656          # Extract the first word of "$tool_basename", so it can be a program name with args.
37657set dummy $tool_basename; ac_word=$2
37658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37659$as_echo_n "checking for $ac_word... " >&6; }
37660if ${ac_cv_path_LIPO+:} false; then :
37661  $as_echo_n "(cached) " >&6
37662else
37663  case $LIPO in
37664  [\\/]* | ?:[\\/]*)
37665  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37666  ;;
37667  *)
37668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37669for as_dir in $PATH
37670do
37671  IFS=$as_save_IFS
37672  test -z "$as_dir" && as_dir=.
37673    for ac_exec_ext in '' $ac_executable_extensions; do
37674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37675    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37677    break 2
37678  fi
37679done
37680  done
37681IFS=$as_save_IFS
37682
37683  ;;
37684esac
37685fi
37686LIPO=$ac_cv_path_LIPO
37687if test -n "$LIPO"; then
37688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37689$as_echo "$LIPO" >&6; }
37690else
37691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37692$as_echo "no" >&6; }
37693fi
37694
37695
37696          if test "x$LIPO" = x; then
37697            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37698          fi
37699        else
37700          # Otherwise we believe it is a complete path. Use it as it is.
37701          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37702$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37703          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37704$as_echo_n "checking for LIPO... " >&6; }
37705          if test ! -x "$tool_specified"; then
37706            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37707$as_echo "not found" >&6; }
37708            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37709          fi
37710          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37711$as_echo "$tool_specified" >&6; }
37712        fi
37713      fi
37714    fi
37715
37716  fi
37717
37718
37719
37720  # Only process if variable expands to non-empty
37721
37722  if test "x$LIPO" != x; then
37723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37724
37725  # First separate the path from the arguments. This will split at the first
37726  # space.
37727  complete="$LIPO"
37728  path="${complete%% *}"
37729  tmp="$complete EOL"
37730  arguments="${tmp#* }"
37731
37732  # Input might be given as Windows format, start by converting to
37733  # unix format.
37734  new_path=`$CYGPATH -u "$path"`
37735
37736  # Now try to locate executable using which
37737  new_path=`$WHICH "$new_path" 2> /dev/null`
37738  # bat and cmd files are not always considered executable in cygwin causing which
37739  # to not find them
37740  if test "x$new_path" = x \
37741      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37742      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37743    new_path=`$CYGPATH -u "$path"`
37744  fi
37745  if test "x$new_path" = x; then
37746    # Oops. Which didn't find the executable.
37747    # The splitting of arguments from the executable at a space might have been incorrect,
37748    # since paths with space are more likely in Windows. Give it another try with the whole
37749    # argument.
37750    path="$complete"
37751    arguments="EOL"
37752    new_path=`$CYGPATH -u "$path"`
37753    new_path=`$WHICH "$new_path" 2> /dev/null`
37754    # bat and cmd files are not always considered executable in cygwin causing which
37755    # to not find them
37756    if test "x$new_path" = x \
37757        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37758        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37759      new_path=`$CYGPATH -u "$path"`
37760    fi
37761    if test "x$new_path" = x; then
37762      # It's still not found. Now this is an unrecoverable error.
37763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37764$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37765      has_space=`$ECHO "$complete" | $GREP " "`
37766      if test "x$has_space" != x; then
37767        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37768$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37769      fi
37770      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37771    fi
37772  fi
37773
37774  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37775  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37776  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37777  # "foo.exe" is OK but "foo" is an error.
37778  #
37779  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37780  # It is also a way to make sure we got the proper file name for the real test later on.
37781  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37782  if test "x$test_shortpath" = x; then
37783    # Short path failed, file does not exist as specified.
37784    # Try adding .exe or .cmd
37785    if test -f "${new_path}.exe"; then
37786      input_to_shortpath="${new_path}.exe"
37787    elif test -f "${new_path}.cmd"; then
37788      input_to_shortpath="${new_path}.cmd"
37789    else
37790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37791$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37792      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37793$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37794      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37795    fi
37796  else
37797    input_to_shortpath="$new_path"
37798  fi
37799
37800  # Call helper function which possibly converts this using DOS-style short mode.
37801  # If so, the updated path is stored in $new_path.
37802  new_path="$input_to_shortpath"
37803
37804  input_path="$input_to_shortpath"
37805  # Check if we need to convert this using DOS-style short mode. If the path
37806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37807  # take no chances and rewrite it.
37808  # Note: m4 eats our [], so we need to use [ and ] instead.
37809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37810  if test "x$has_forbidden_chars" != x; then
37811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37815      # Going to short mode and back again did indeed matter. Since short mode is
37816      # case insensitive, let's make it lowercase to improve readability.
37817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37818      # Now convert it back to Unix-style (cygpath)
37819      input_path=`$CYGPATH -u "$shortmode_path"`
37820      new_path="$input_path"
37821    fi
37822  fi
37823
37824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37825  if test "x$test_cygdrive_prefix" = x; then
37826    # As a simple fix, exclude /usr/bin since it's not a real path.
37827    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37829      # a path prefixed by /cygdrive for fixpath to work.
37830      new_path="$CYGWIN_ROOT_PATH$input_path"
37831    fi
37832  fi
37833
37834  # remove trailing .exe if any
37835  new_path="${new_path/%.exe/}"
37836
37837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37838
37839  # First separate the path from the arguments. This will split at the first
37840  # space.
37841  complete="$LIPO"
37842  path="${complete%% *}"
37843  tmp="$complete EOL"
37844  arguments="${tmp#* }"
37845
37846  # Input might be given as Windows format, start by converting to
37847  # unix format.
37848  new_path="$path"
37849
37850  windows_path="$new_path"
37851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37852    unix_path=`$CYGPATH -u "$windows_path"`
37853    new_path="$unix_path"
37854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37856    new_path="$unix_path"
37857  fi
37858
37859
37860  # Now try to locate executable using which
37861  new_path=`$WHICH "$new_path" 2> /dev/null`
37862
37863  if test "x$new_path" = x; then
37864    # Oops. Which didn't find the executable.
37865    # The splitting of arguments from the executable at a space might have been incorrect,
37866    # since paths with space are more likely in Windows. Give it another try with the whole
37867    # argument.
37868    path="$complete"
37869    arguments="EOL"
37870    new_path="$path"
37871
37872  windows_path="$new_path"
37873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37874    unix_path=`$CYGPATH -u "$windows_path"`
37875    new_path="$unix_path"
37876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37878    new_path="$unix_path"
37879  fi
37880
37881
37882    new_path=`$WHICH "$new_path" 2> /dev/null`
37883    # bat and cmd files are not always considered executable in MSYS causing which
37884    # to not find them
37885    if test "x$new_path" = x \
37886        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37887        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37888      new_path="$path"
37889
37890  windows_path="$new_path"
37891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37892    unix_path=`$CYGPATH -u "$windows_path"`
37893    new_path="$unix_path"
37894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37896    new_path="$unix_path"
37897  fi
37898
37899    fi
37900
37901    if test "x$new_path" = x; then
37902      # It's still not found. Now this is an unrecoverable error.
37903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37904$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37905      has_space=`$ECHO "$complete" | $GREP " "`
37906      if test "x$has_space" != x; then
37907        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37908$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37909      fi
37910      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37911    fi
37912  fi
37913
37914  # Now new_path has a complete unix path to the binary
37915  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37916    # Keep paths in /bin as-is, but remove trailing .exe if any
37917    new_path="${new_path/%.exe/}"
37918    # Do not save /bin paths to all_fixpath_prefixes!
37919  else
37920    # Not in mixed or Windows style, start by that.
37921    new_path=`cmd //c echo $new_path`
37922
37923  input_path="$new_path"
37924  # Check if we need to convert this using DOS-style short mode. If the path
37925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37926  # take no chances and rewrite it.
37927  # Note: m4 eats our [], so we need to use [ and ] instead.
37928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37929  if test "x$has_forbidden_chars" != x; then
37930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37932  fi
37933
37934    # Output is in $new_path
37935
37936  windows_path="$new_path"
37937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37938    unix_path=`$CYGPATH -u "$windows_path"`
37939    new_path="$unix_path"
37940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37942    new_path="$unix_path"
37943  fi
37944
37945    # remove trailing .exe if any
37946    new_path="${new_path/%.exe/}"
37947
37948    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37949    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37950  fi
37951
37952    else
37953      # We're on a unix platform. Hooray! :)
37954      # First separate the path from the arguments. This will split at the first
37955      # space.
37956      complete="$LIPO"
37957      path="${complete%% *}"
37958      tmp="$complete EOL"
37959      arguments="${tmp#* }"
37960
37961      # Cannot rely on the command "which" here since it doesn't always work.
37962      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37963      if test -z "$is_absolute_path"; then
37964        # Path to executable is not absolute. Find it.
37965        IFS_save="$IFS"
37966        IFS=:
37967        for p in $PATH; do
37968          if test -f "$p/$path" && test -x "$p/$path"; then
37969            new_path="$p/$path"
37970            break
37971          fi
37972        done
37973        IFS="$IFS_save"
37974      else
37975        # This is an absolute path, we can use it without further modifications.
37976        new_path="$path"
37977      fi
37978
37979      if test "x$new_path" = x; then
37980        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37981$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37982        has_space=`$ECHO "$complete" | $GREP " "`
37983        if test "x$has_space" != x; then
37984          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37985$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37986        fi
37987        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37988      fi
37989    fi
37990
37991    # Now join together the path and the arguments once again
37992    if test "x$arguments" != xEOL; then
37993      new_complete="$new_path ${arguments% *}"
37994    else
37995      new_complete="$new_path"
37996    fi
37997
37998    if test "x$complete" != "x$new_complete"; then
37999      LIPO="$new_complete"
38000      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38001$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38002    fi
38003  fi
38004
38005  fi
38006
38007  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38008    # Extract the first word of "mt", so it can be a program name with args.
38009set dummy mt; ac_word=$2
38010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38011$as_echo_n "checking for $ac_word... " >&6; }
38012if ${ac_cv_prog_MT+:} false; then :
38013  $as_echo_n "(cached) " >&6
38014else
38015  if test -n "$MT"; then
38016  ac_cv_prog_MT="$MT" # Let the user override the test.
38017else
38018  ac_prog_rejected=no
38019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38020for as_dir in $PATH
38021do
38022  IFS=$as_save_IFS
38023  test -z "$as_dir" && as_dir=.
38024    for ac_exec_ext in '' $ac_executable_extensions; do
38025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38026    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38027       ac_prog_rejected=yes
38028       continue
38029     fi
38030    ac_cv_prog_MT="mt"
38031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38032    break 2
38033  fi
38034done
38035  done
38036IFS=$as_save_IFS
38037
38038if test $ac_prog_rejected = yes; then
38039  # We found a bogon in the path, so make sure we never use it.
38040  set dummy $ac_cv_prog_MT
38041  shift
38042  if test $# != 0; then
38043    # We chose a different compiler from the bogus one.
38044    # However, it has the same basename, so the bogon will be chosen
38045    # first if we set MT to just the basename; use the full file name.
38046    shift
38047    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38048  fi
38049fi
38050fi
38051fi
38052MT=$ac_cv_prog_MT
38053if test -n "$MT"; then
38054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38055$as_echo "$MT" >&6; }
38056else
38057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38058$as_echo "no" >&6; }
38059fi
38060
38061
38062
38063  # Only process if variable expands to non-empty
38064
38065  if test "x$MT" != x; then
38066    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38067
38068  # First separate the path from the arguments. This will split at the first
38069  # space.
38070  complete="$MT"
38071  path="${complete%% *}"
38072  tmp="$complete EOL"
38073  arguments="${tmp#* }"
38074
38075  # Input might be given as Windows format, start by converting to
38076  # unix format.
38077  new_path=`$CYGPATH -u "$path"`
38078
38079  # Now try to locate executable using which
38080  new_path=`$WHICH "$new_path" 2> /dev/null`
38081  # bat and cmd files are not always considered executable in cygwin causing which
38082  # to not find them
38083  if test "x$new_path" = x \
38084      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38085      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38086    new_path=`$CYGPATH -u "$path"`
38087  fi
38088  if test "x$new_path" = x; then
38089    # Oops. Which didn't find the executable.
38090    # The splitting of arguments from the executable at a space might have been incorrect,
38091    # since paths with space are more likely in Windows. Give it another try with the whole
38092    # argument.
38093    path="$complete"
38094    arguments="EOL"
38095    new_path=`$CYGPATH -u "$path"`
38096    new_path=`$WHICH "$new_path" 2> /dev/null`
38097    # bat and cmd files are not always considered executable in cygwin causing which
38098    # to not find them
38099    if test "x$new_path" = x \
38100        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38101        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38102      new_path=`$CYGPATH -u "$path"`
38103    fi
38104    if test "x$new_path" = x; then
38105      # It's still not found. Now this is an unrecoverable error.
38106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38107$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38108      has_space=`$ECHO "$complete" | $GREP " "`
38109      if test "x$has_space" != x; then
38110        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38111$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38112      fi
38113      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38114    fi
38115  fi
38116
38117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38120  # "foo.exe" is OK but "foo" is an error.
38121  #
38122  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38123  # It is also a way to make sure we got the proper file name for the real test later on.
38124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38125  if test "x$test_shortpath" = x; then
38126    # Short path failed, file does not exist as specified.
38127    # Try adding .exe or .cmd
38128    if test -f "${new_path}.exe"; then
38129      input_to_shortpath="${new_path}.exe"
38130    elif test -f "${new_path}.cmd"; then
38131      input_to_shortpath="${new_path}.cmd"
38132    else
38133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38134$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38135      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38136$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38137      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38138    fi
38139  else
38140    input_to_shortpath="$new_path"
38141  fi
38142
38143  # Call helper function which possibly converts this using DOS-style short mode.
38144  # If so, the updated path is stored in $new_path.
38145  new_path="$input_to_shortpath"
38146
38147  input_path="$input_to_shortpath"
38148  # Check if we need to convert this using DOS-style short mode. If the path
38149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38150  # take no chances and rewrite it.
38151  # Note: m4 eats our [], so we need to use [ and ] instead.
38152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38153  if test "x$has_forbidden_chars" != x; then
38154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38158      # Going to short mode and back again did indeed matter. Since short mode is
38159      # case insensitive, let's make it lowercase to improve readability.
38160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38161      # Now convert it back to Unix-style (cygpath)
38162      input_path=`$CYGPATH -u "$shortmode_path"`
38163      new_path="$input_path"
38164    fi
38165  fi
38166
38167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38168  if test "x$test_cygdrive_prefix" = x; then
38169    # As a simple fix, exclude /usr/bin since it's not a real path.
38170    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38172      # a path prefixed by /cygdrive for fixpath to work.
38173      new_path="$CYGWIN_ROOT_PATH$input_path"
38174    fi
38175  fi
38176
38177  # remove trailing .exe if any
38178  new_path="${new_path/%.exe/}"
38179
38180    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38181
38182  # First separate the path from the arguments. This will split at the first
38183  # space.
38184  complete="$MT"
38185  path="${complete%% *}"
38186  tmp="$complete EOL"
38187  arguments="${tmp#* }"
38188
38189  # Input might be given as Windows format, start by converting to
38190  # unix format.
38191  new_path="$path"
38192
38193  windows_path="$new_path"
38194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38195    unix_path=`$CYGPATH -u "$windows_path"`
38196    new_path="$unix_path"
38197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38199    new_path="$unix_path"
38200  fi
38201
38202
38203  # Now try to locate executable using which
38204  new_path=`$WHICH "$new_path" 2> /dev/null`
38205
38206  if test "x$new_path" = x; then
38207    # Oops. Which didn't find the executable.
38208    # The splitting of arguments from the executable at a space might have been incorrect,
38209    # since paths with space are more likely in Windows. Give it another try with the whole
38210    # argument.
38211    path="$complete"
38212    arguments="EOL"
38213    new_path="$path"
38214
38215  windows_path="$new_path"
38216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38217    unix_path=`$CYGPATH -u "$windows_path"`
38218    new_path="$unix_path"
38219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38221    new_path="$unix_path"
38222  fi
38223
38224
38225    new_path=`$WHICH "$new_path" 2> /dev/null`
38226    # bat and cmd files are not always considered executable in MSYS causing which
38227    # to not find them
38228    if test "x$new_path" = x \
38229        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38230        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38231      new_path="$path"
38232
38233  windows_path="$new_path"
38234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38235    unix_path=`$CYGPATH -u "$windows_path"`
38236    new_path="$unix_path"
38237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38239    new_path="$unix_path"
38240  fi
38241
38242    fi
38243
38244    if test "x$new_path" = x; then
38245      # It's still not found. Now this is an unrecoverable error.
38246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38247$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38248      has_space=`$ECHO "$complete" | $GREP " "`
38249      if test "x$has_space" != x; then
38250        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38251$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38252      fi
38253      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38254    fi
38255  fi
38256
38257  # Now new_path has a complete unix path to the binary
38258  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38259    # Keep paths in /bin as-is, but remove trailing .exe if any
38260    new_path="${new_path/%.exe/}"
38261    # Do not save /bin paths to all_fixpath_prefixes!
38262  else
38263    # Not in mixed or Windows style, start by that.
38264    new_path=`cmd //c echo $new_path`
38265
38266  input_path="$new_path"
38267  # Check if we need to convert this using DOS-style short mode. If the path
38268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38269  # take no chances and rewrite it.
38270  # Note: m4 eats our [], so we need to use [ and ] instead.
38271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38272  if test "x$has_forbidden_chars" != x; then
38273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38274    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38275  fi
38276
38277    # Output is in $new_path
38278
38279  windows_path="$new_path"
38280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38281    unix_path=`$CYGPATH -u "$windows_path"`
38282    new_path="$unix_path"
38283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38285    new_path="$unix_path"
38286  fi
38287
38288    # remove trailing .exe if any
38289    new_path="${new_path/%.exe/}"
38290
38291    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38292    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38293  fi
38294
38295    else
38296      # We're on a unix platform. Hooray! :)
38297      # First separate the path from the arguments. This will split at the first
38298      # space.
38299      complete="$MT"
38300      path="${complete%% *}"
38301      tmp="$complete EOL"
38302      arguments="${tmp#* }"
38303
38304      # Cannot rely on the command "which" here since it doesn't always work.
38305      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38306      if test -z "$is_absolute_path"; then
38307        # Path to executable is not absolute. Find it.
38308        IFS_save="$IFS"
38309        IFS=:
38310        for p in $PATH; do
38311          if test -f "$p/$path" && test -x "$p/$path"; then
38312            new_path="$p/$path"
38313            break
38314          fi
38315        done
38316        IFS="$IFS_save"
38317      else
38318        # This is an absolute path, we can use it without further modifications.
38319        new_path="$path"
38320      fi
38321
38322      if test "x$new_path" = x; then
38323        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38324$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38325        has_space=`$ECHO "$complete" | $GREP " "`
38326        if test "x$has_space" != x; then
38327          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38328$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38329        fi
38330        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38331      fi
38332    fi
38333
38334    # Now join together the path and the arguments once again
38335    if test "x$arguments" != xEOL; then
38336      new_complete="$new_path ${arguments% *}"
38337    else
38338      new_complete="$new_path"
38339    fi
38340
38341    if test "x$complete" != "x$new_complete"; then
38342      MT="$new_complete"
38343      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38344$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38345    fi
38346  fi
38347
38348    # Setup the resource compiler (RC)
38349    # Extract the first word of "rc", so it can be a program name with args.
38350set dummy rc; ac_word=$2
38351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38352$as_echo_n "checking for $ac_word... " >&6; }
38353if ${ac_cv_prog_RC+:} false; then :
38354  $as_echo_n "(cached) " >&6
38355else
38356  if test -n "$RC"; then
38357  ac_cv_prog_RC="$RC" # Let the user override the test.
38358else
38359  ac_prog_rejected=no
38360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38361for as_dir in $PATH
38362do
38363  IFS=$as_save_IFS
38364  test -z "$as_dir" && as_dir=.
38365    for ac_exec_ext in '' $ac_executable_extensions; do
38366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38367    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38368       ac_prog_rejected=yes
38369       continue
38370     fi
38371    ac_cv_prog_RC="rc"
38372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38373    break 2
38374  fi
38375done
38376  done
38377IFS=$as_save_IFS
38378
38379if test $ac_prog_rejected = yes; then
38380  # We found a bogon in the path, so make sure we never use it.
38381  set dummy $ac_cv_prog_RC
38382  shift
38383  if test $# != 0; then
38384    # We chose a different compiler from the bogus one.
38385    # However, it has the same basename, so the bogon will be chosen
38386    # first if we set RC to just the basename; use the full file name.
38387    shift
38388    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38389  fi
38390fi
38391fi
38392fi
38393RC=$ac_cv_prog_RC
38394if test -n "$RC"; then
38395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38396$as_echo "$RC" >&6; }
38397else
38398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38399$as_echo "no" >&6; }
38400fi
38401
38402
38403
38404  # Only process if variable expands to non-empty
38405
38406  if test "x$RC" != x; then
38407    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38408
38409  # First separate the path from the arguments. This will split at the first
38410  # space.
38411  complete="$RC"
38412  path="${complete%% *}"
38413  tmp="$complete EOL"
38414  arguments="${tmp#* }"
38415
38416  # Input might be given as Windows format, start by converting to
38417  # unix format.
38418  new_path=`$CYGPATH -u "$path"`
38419
38420  # Now try to locate executable using which
38421  new_path=`$WHICH "$new_path" 2> /dev/null`
38422  # bat and cmd files are not always considered executable in cygwin causing which
38423  # to not find them
38424  if test "x$new_path" = x \
38425      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38426      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38427    new_path=`$CYGPATH -u "$path"`
38428  fi
38429  if test "x$new_path" = x; then
38430    # Oops. Which didn't find the executable.
38431    # The splitting of arguments from the executable at a space might have been incorrect,
38432    # since paths with space are more likely in Windows. Give it another try with the whole
38433    # argument.
38434    path="$complete"
38435    arguments="EOL"
38436    new_path=`$CYGPATH -u "$path"`
38437    new_path=`$WHICH "$new_path" 2> /dev/null`
38438    # bat and cmd files are not always considered executable in cygwin causing which
38439    # to not find them
38440    if test "x$new_path" = x \
38441        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38442        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38443      new_path=`$CYGPATH -u "$path"`
38444    fi
38445    if test "x$new_path" = x; then
38446      # It's still not found. Now this is an unrecoverable error.
38447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38448$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38449      has_space=`$ECHO "$complete" | $GREP " "`
38450      if test "x$has_space" != x; then
38451        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38452$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38453      fi
38454      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38455    fi
38456  fi
38457
38458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38461  # "foo.exe" is OK but "foo" is an error.
38462  #
38463  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38464  # It is also a way to make sure we got the proper file name for the real test later on.
38465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38466  if test "x$test_shortpath" = x; then
38467    # Short path failed, file does not exist as specified.
38468    # Try adding .exe or .cmd
38469    if test -f "${new_path}.exe"; then
38470      input_to_shortpath="${new_path}.exe"
38471    elif test -f "${new_path}.cmd"; then
38472      input_to_shortpath="${new_path}.cmd"
38473    else
38474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38475$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38476      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38477$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38478      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38479    fi
38480  else
38481    input_to_shortpath="$new_path"
38482  fi
38483
38484  # Call helper function which possibly converts this using DOS-style short mode.
38485  # If so, the updated path is stored in $new_path.
38486  new_path="$input_to_shortpath"
38487
38488  input_path="$input_to_shortpath"
38489  # Check if we need to convert this using DOS-style short mode. If the path
38490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38491  # take no chances and rewrite it.
38492  # Note: m4 eats our [], so we need to use [ and ] instead.
38493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38494  if test "x$has_forbidden_chars" != x; then
38495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38499      # Going to short mode and back again did indeed matter. Since short mode is
38500      # case insensitive, let's make it lowercase to improve readability.
38501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38502      # Now convert it back to Unix-style (cygpath)
38503      input_path=`$CYGPATH -u "$shortmode_path"`
38504      new_path="$input_path"
38505    fi
38506  fi
38507
38508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38509  if test "x$test_cygdrive_prefix" = x; then
38510    # As a simple fix, exclude /usr/bin since it's not a real path.
38511    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38513      # a path prefixed by /cygdrive for fixpath to work.
38514      new_path="$CYGWIN_ROOT_PATH$input_path"
38515    fi
38516  fi
38517
38518  # remove trailing .exe if any
38519  new_path="${new_path/%.exe/}"
38520
38521    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38522
38523  # First separate the path from the arguments. This will split at the first
38524  # space.
38525  complete="$RC"
38526  path="${complete%% *}"
38527  tmp="$complete EOL"
38528  arguments="${tmp#* }"
38529
38530  # Input might be given as Windows format, start by converting to
38531  # unix format.
38532  new_path="$path"
38533
38534  windows_path="$new_path"
38535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38536    unix_path=`$CYGPATH -u "$windows_path"`
38537    new_path="$unix_path"
38538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38540    new_path="$unix_path"
38541  fi
38542
38543
38544  # Now try to locate executable using which
38545  new_path=`$WHICH "$new_path" 2> /dev/null`
38546
38547  if test "x$new_path" = x; then
38548    # Oops. Which didn't find the executable.
38549    # The splitting of arguments from the executable at a space might have been incorrect,
38550    # since paths with space are more likely in Windows. Give it another try with the whole
38551    # argument.
38552    path="$complete"
38553    arguments="EOL"
38554    new_path="$path"
38555
38556  windows_path="$new_path"
38557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38558    unix_path=`$CYGPATH -u "$windows_path"`
38559    new_path="$unix_path"
38560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38562    new_path="$unix_path"
38563  fi
38564
38565
38566    new_path=`$WHICH "$new_path" 2> /dev/null`
38567    # bat and cmd files are not always considered executable in MSYS causing which
38568    # to not find them
38569    if test "x$new_path" = x \
38570        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38571        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38572      new_path="$path"
38573
38574  windows_path="$new_path"
38575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38576    unix_path=`$CYGPATH -u "$windows_path"`
38577    new_path="$unix_path"
38578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38580    new_path="$unix_path"
38581  fi
38582
38583    fi
38584
38585    if test "x$new_path" = x; then
38586      # It's still not found. Now this is an unrecoverable error.
38587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38588$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38589      has_space=`$ECHO "$complete" | $GREP " "`
38590      if test "x$has_space" != x; then
38591        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38592$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38593      fi
38594      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38595    fi
38596  fi
38597
38598  # Now new_path has a complete unix path to the binary
38599  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38600    # Keep paths in /bin as-is, but remove trailing .exe if any
38601    new_path="${new_path/%.exe/}"
38602    # Do not save /bin paths to all_fixpath_prefixes!
38603  else
38604    # Not in mixed or Windows style, start by that.
38605    new_path=`cmd //c echo $new_path`
38606
38607  input_path="$new_path"
38608  # Check if we need to convert this using DOS-style short mode. If the path
38609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38610  # take no chances and rewrite it.
38611  # Note: m4 eats our [], so we need to use [ and ] instead.
38612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38613  if test "x$has_forbidden_chars" != x; then
38614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38616  fi
38617
38618    # Output is in $new_path
38619
38620  windows_path="$new_path"
38621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38622    unix_path=`$CYGPATH -u "$windows_path"`
38623    new_path="$unix_path"
38624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38626    new_path="$unix_path"
38627  fi
38628
38629    # remove trailing .exe if any
38630    new_path="${new_path/%.exe/}"
38631
38632    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38633    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38634  fi
38635
38636    else
38637      # We're on a unix platform. Hooray! :)
38638      # First separate the path from the arguments. This will split at the first
38639      # space.
38640      complete="$RC"
38641      path="${complete%% *}"
38642      tmp="$complete EOL"
38643      arguments="${tmp#* }"
38644
38645      # Cannot rely on the command "which" here since it doesn't always work.
38646      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38647      if test -z "$is_absolute_path"; then
38648        # Path to executable is not absolute. Find it.
38649        IFS_save="$IFS"
38650        IFS=:
38651        for p in $PATH; do
38652          if test -f "$p/$path" && test -x "$p/$path"; then
38653            new_path="$p/$path"
38654            break
38655          fi
38656        done
38657        IFS="$IFS_save"
38658      else
38659        # This is an absolute path, we can use it without further modifications.
38660        new_path="$path"
38661      fi
38662
38663      if test "x$new_path" = x; then
38664        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38665$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38666        has_space=`$ECHO "$complete" | $GREP " "`
38667        if test "x$has_space" != x; then
38668          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38669$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38670        fi
38671        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38672      fi
38673    fi
38674
38675    # Now join together the path and the arguments once again
38676    if test "x$arguments" != xEOL; then
38677      new_complete="$new_path ${arguments% *}"
38678    else
38679      new_complete="$new_path"
38680    fi
38681
38682    if test "x$complete" != "x$new_complete"; then
38683      RC="$new_complete"
38684      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38685$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38686    fi
38687  fi
38688
38689    # Extract the first word of "dumpbin", so it can be a program name with args.
38690set dummy dumpbin; ac_word=$2
38691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38692$as_echo_n "checking for $ac_word... " >&6; }
38693if ${ac_cv_prog_DUMPBIN+:} false; then :
38694  $as_echo_n "(cached) " >&6
38695else
38696  if test -n "$DUMPBIN"; then
38697  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38698else
38699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38700for as_dir in $PATH
38701do
38702  IFS=$as_save_IFS
38703  test -z "$as_dir" && as_dir=.
38704    for ac_exec_ext in '' $ac_executable_extensions; do
38705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38706    ac_cv_prog_DUMPBIN="dumpbin"
38707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38708    break 2
38709  fi
38710done
38711  done
38712IFS=$as_save_IFS
38713
38714fi
38715fi
38716DUMPBIN=$ac_cv_prog_DUMPBIN
38717if test -n "$DUMPBIN"; then
38718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38719$as_echo "$DUMPBIN" >&6; }
38720else
38721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38722$as_echo "no" >&6; }
38723fi
38724
38725
38726
38727  # Only process if variable expands to non-empty
38728
38729  if test "x$DUMPBIN" != x; then
38730    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38731
38732  # First separate the path from the arguments. This will split at the first
38733  # space.
38734  complete="$DUMPBIN"
38735  path="${complete%% *}"
38736  tmp="$complete EOL"
38737  arguments="${tmp#* }"
38738
38739  # Input might be given as Windows format, start by converting to
38740  # unix format.
38741  new_path=`$CYGPATH -u "$path"`
38742
38743  # Now try to locate executable using which
38744  new_path=`$WHICH "$new_path" 2> /dev/null`
38745  # bat and cmd files are not always considered executable in cygwin causing which
38746  # to not find them
38747  if test "x$new_path" = x \
38748      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38749      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38750    new_path=`$CYGPATH -u "$path"`
38751  fi
38752  if test "x$new_path" = x; then
38753    # Oops. Which didn't find the executable.
38754    # The splitting of arguments from the executable at a space might have been incorrect,
38755    # since paths with space are more likely in Windows. Give it another try with the whole
38756    # argument.
38757    path="$complete"
38758    arguments="EOL"
38759    new_path=`$CYGPATH -u "$path"`
38760    new_path=`$WHICH "$new_path" 2> /dev/null`
38761    # bat and cmd files are not always considered executable in cygwin causing which
38762    # to not find them
38763    if test "x$new_path" = x \
38764        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38765        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38766      new_path=`$CYGPATH -u "$path"`
38767    fi
38768    if test "x$new_path" = x; then
38769      # It's still not found. Now this is an unrecoverable error.
38770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38771$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38772      has_space=`$ECHO "$complete" | $GREP " "`
38773      if test "x$has_space" != x; then
38774        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38775$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38776      fi
38777      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38778    fi
38779  fi
38780
38781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38784  # "foo.exe" is OK but "foo" is an error.
38785  #
38786  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38787  # It is also a way to make sure we got the proper file name for the real test later on.
38788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38789  if test "x$test_shortpath" = x; then
38790    # Short path failed, file does not exist as specified.
38791    # Try adding .exe or .cmd
38792    if test -f "${new_path}.exe"; then
38793      input_to_shortpath="${new_path}.exe"
38794    elif test -f "${new_path}.cmd"; then
38795      input_to_shortpath="${new_path}.cmd"
38796    else
38797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38798$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38799      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38800$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38801      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38802    fi
38803  else
38804    input_to_shortpath="$new_path"
38805  fi
38806
38807  # Call helper function which possibly converts this using DOS-style short mode.
38808  # If so, the updated path is stored in $new_path.
38809  new_path="$input_to_shortpath"
38810
38811  input_path="$input_to_shortpath"
38812  # Check if we need to convert this using DOS-style short mode. If the path
38813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38814  # take no chances and rewrite it.
38815  # Note: m4 eats our [], so we need to use [ and ] instead.
38816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38817  if test "x$has_forbidden_chars" != x; then
38818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38819    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38820    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38821    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38822      # Going to short mode and back again did indeed matter. Since short mode is
38823      # case insensitive, let's make it lowercase to improve readability.
38824      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38825      # Now convert it back to Unix-style (cygpath)
38826      input_path=`$CYGPATH -u "$shortmode_path"`
38827      new_path="$input_path"
38828    fi
38829  fi
38830
38831  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38832  if test "x$test_cygdrive_prefix" = x; then
38833    # As a simple fix, exclude /usr/bin since it's not a real path.
38834    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38835      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38836      # a path prefixed by /cygdrive for fixpath to work.
38837      new_path="$CYGWIN_ROOT_PATH$input_path"
38838    fi
38839  fi
38840
38841  # remove trailing .exe if any
38842  new_path="${new_path/%.exe/}"
38843
38844    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38845
38846  # First separate the path from the arguments. This will split at the first
38847  # space.
38848  complete="$DUMPBIN"
38849  path="${complete%% *}"
38850  tmp="$complete EOL"
38851  arguments="${tmp#* }"
38852
38853  # Input might be given as Windows format, start by converting to
38854  # unix format.
38855  new_path="$path"
38856
38857  windows_path="$new_path"
38858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38859    unix_path=`$CYGPATH -u "$windows_path"`
38860    new_path="$unix_path"
38861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38863    new_path="$unix_path"
38864  fi
38865
38866
38867  # Now try to locate executable using which
38868  new_path=`$WHICH "$new_path" 2> /dev/null`
38869
38870  if test "x$new_path" = x; then
38871    # Oops. Which didn't find the executable.
38872    # The splitting of arguments from the executable at a space might have been incorrect,
38873    # since paths with space are more likely in Windows. Give it another try with the whole
38874    # argument.
38875    path="$complete"
38876    arguments="EOL"
38877    new_path="$path"
38878
38879  windows_path="$new_path"
38880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38881    unix_path=`$CYGPATH -u "$windows_path"`
38882    new_path="$unix_path"
38883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38885    new_path="$unix_path"
38886  fi
38887
38888
38889    new_path=`$WHICH "$new_path" 2> /dev/null`
38890    # bat and cmd files are not always considered executable in MSYS causing which
38891    # to not find them
38892    if test "x$new_path" = x \
38893        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38894        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38895      new_path="$path"
38896
38897  windows_path="$new_path"
38898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38899    unix_path=`$CYGPATH -u "$windows_path"`
38900    new_path="$unix_path"
38901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38903    new_path="$unix_path"
38904  fi
38905
38906    fi
38907
38908    if test "x$new_path" = x; then
38909      # It's still not found. Now this is an unrecoverable error.
38910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38911$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38912      has_space=`$ECHO "$complete" | $GREP " "`
38913      if test "x$has_space" != x; then
38914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38916      fi
38917      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38918    fi
38919  fi
38920
38921  # Now new_path has a complete unix path to the binary
38922  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38923    # Keep paths in /bin as-is, but remove trailing .exe if any
38924    new_path="${new_path/%.exe/}"
38925    # Do not save /bin paths to all_fixpath_prefixes!
38926  else
38927    # Not in mixed or Windows style, start by that.
38928    new_path=`cmd //c echo $new_path`
38929
38930  input_path="$new_path"
38931  # Check if we need to convert this using DOS-style short mode. If the path
38932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38933  # take no chances and rewrite it.
38934  # Note: m4 eats our [], so we need to use [ and ] instead.
38935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38936  if test "x$has_forbidden_chars" != x; then
38937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38939  fi
38940
38941    # Output is in $new_path
38942
38943  windows_path="$new_path"
38944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38945    unix_path=`$CYGPATH -u "$windows_path"`
38946    new_path="$unix_path"
38947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38949    new_path="$unix_path"
38950  fi
38951
38952    # remove trailing .exe if any
38953    new_path="${new_path/%.exe/}"
38954
38955    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38956    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38957  fi
38958
38959    else
38960      # We're on a unix platform. Hooray! :)
38961      # First separate the path from the arguments. This will split at the first
38962      # space.
38963      complete="$DUMPBIN"
38964      path="${complete%% *}"
38965      tmp="$complete EOL"
38966      arguments="${tmp#* }"
38967
38968      # Cannot rely on the command "which" here since it doesn't always work.
38969      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38970      if test -z "$is_absolute_path"; then
38971        # Path to executable is not absolute. Find it.
38972        IFS_save="$IFS"
38973        IFS=:
38974        for p in $PATH; do
38975          if test -f "$p/$path" && test -x "$p/$path"; then
38976            new_path="$p/$path"
38977            break
38978          fi
38979        done
38980        IFS="$IFS_save"
38981      else
38982        # This is an absolute path, we can use it without further modifications.
38983        new_path="$path"
38984      fi
38985
38986      if test "x$new_path" = x; then
38987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38988$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38989        has_space=`$ECHO "$complete" | $GREP " "`
38990        if test "x$has_space" != x; then
38991          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38992$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38993        fi
38994        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38995      fi
38996    fi
38997
38998    # Now join together the path and the arguments once again
38999    if test "x$arguments" != xEOL; then
39000      new_complete="$new_path ${arguments% *}"
39001    else
39002      new_complete="$new_path"
39003    fi
39004
39005    if test "x$complete" != "x$new_complete"; then
39006      DUMPBIN="$new_complete"
39007      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39008$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39009    fi
39010  fi
39011
39012    # We need to check for 'msbuild.exe' because at the place where we expect to
39013    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39014    # won't find the 'msbuild.exe' executable in that case (and the
39015    # 'ac_executable_extensions' is unusable due to performance reasons).
39016    # Notice that we intentionally don't fix up the path to MSBUILD because we
39017    # will call it in a DOS shell during freetype detection on Windows (see
39018    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39019    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39020set dummy msbuild.exe; ac_word=$2
39021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39022$as_echo_n "checking for $ac_word... " >&6; }
39023if ${ac_cv_prog_MSBUILD+:} false; then :
39024  $as_echo_n "(cached) " >&6
39025else
39026  if test -n "$MSBUILD"; then
39027  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39028else
39029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39030for as_dir in $PATH
39031do
39032  IFS=$as_save_IFS
39033  test -z "$as_dir" && as_dir=.
39034    for ac_exec_ext in '' $ac_executable_extensions; do
39035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39036    ac_cv_prog_MSBUILD="msbuild.exe"
39037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39038    break 2
39039  fi
39040done
39041  done
39042IFS=$as_save_IFS
39043
39044fi
39045fi
39046MSBUILD=$ac_cv_prog_MSBUILD
39047if test -n "$MSBUILD"; then
39048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39049$as_echo "$MSBUILD" >&6; }
39050else
39051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39052$as_echo "no" >&6; }
39053fi
39054
39055
39056  fi
39057
39058  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39059
39060
39061  # Publish this variable in the help.
39062
39063
39064  if [ -z "${STRIP+x}" ]; then
39065    # The variable is not set by user, try to locate tool using the code snippet
39066    for ac_prog in strip
39067do
39068  # Extract the first word of "$ac_prog", so it can be a program name with args.
39069set dummy $ac_prog; ac_word=$2
39070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39071$as_echo_n "checking for $ac_word... " >&6; }
39072if ${ac_cv_path_STRIP+:} false; then :
39073  $as_echo_n "(cached) " >&6
39074else
39075  case $STRIP in
39076  [\\/]* | ?:[\\/]*)
39077  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39078  ;;
39079  *)
39080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39081for as_dir in $PATH
39082do
39083  IFS=$as_save_IFS
39084  test -z "$as_dir" && as_dir=.
39085    for ac_exec_ext in '' $ac_executable_extensions; do
39086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39087    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39089    break 2
39090  fi
39091done
39092  done
39093IFS=$as_save_IFS
39094
39095  ;;
39096esac
39097fi
39098STRIP=$ac_cv_path_STRIP
39099if test -n "$STRIP"; then
39100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39101$as_echo "$STRIP" >&6; }
39102else
39103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39104$as_echo "no" >&6; }
39105fi
39106
39107
39108  test -n "$STRIP" && break
39109done
39110
39111  else
39112    # The variable is set, but is it from the command line or the environment?
39113
39114    # Try to remove the string !STRIP! from our list.
39115    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39116    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39117      # If it failed, the variable was not from the command line. Ignore it,
39118      # but warn the user (except for BASH, which is always set by the calling BASH).
39119      if test "xSTRIP" != xBASH; then
39120        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39121$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39122      fi
39123      # Try to locate tool using the code snippet
39124      for ac_prog in strip
39125do
39126  # Extract the first word of "$ac_prog", so it can be a program name with args.
39127set dummy $ac_prog; ac_word=$2
39128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39129$as_echo_n "checking for $ac_word... " >&6; }
39130if ${ac_cv_path_STRIP+:} false; then :
39131  $as_echo_n "(cached) " >&6
39132else
39133  case $STRIP in
39134  [\\/]* | ?:[\\/]*)
39135  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39136  ;;
39137  *)
39138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39139for as_dir in $PATH
39140do
39141  IFS=$as_save_IFS
39142  test -z "$as_dir" && as_dir=.
39143    for ac_exec_ext in '' $ac_executable_extensions; do
39144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39145    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39147    break 2
39148  fi
39149done
39150  done
39151IFS=$as_save_IFS
39152
39153  ;;
39154esac
39155fi
39156STRIP=$ac_cv_path_STRIP
39157if test -n "$STRIP"; then
39158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39159$as_echo "$STRIP" >&6; }
39160else
39161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39162$as_echo "no" >&6; }
39163fi
39164
39165
39166  test -n "$STRIP" && break
39167done
39168
39169    else
39170      # If it succeeded, then it was overridden by the user. We will use it
39171      # for the tool.
39172
39173      # First remove it from the list of overridden variables, so we can test
39174      # for unknown variables in the end.
39175      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39176
39177      # Check if we try to supply an empty value
39178      if test "x$STRIP" = x; then
39179        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39180$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39181        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39182$as_echo_n "checking for STRIP... " >&6; }
39183        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39184$as_echo "disabled" >&6; }
39185      else
39186        # Check if the provided tool contains a complete path.
39187        tool_specified="$STRIP"
39188        tool_basename="${tool_specified##*/}"
39189        if test "x$tool_basename" = "x$tool_specified"; then
39190          # A command without a complete path is provided, search $PATH.
39191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39192$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39193          # Extract the first word of "$tool_basename", so it can be a program name with args.
39194set dummy $tool_basename; ac_word=$2
39195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39196$as_echo_n "checking for $ac_word... " >&6; }
39197if ${ac_cv_path_STRIP+:} false; then :
39198  $as_echo_n "(cached) " >&6
39199else
39200  case $STRIP in
39201  [\\/]* | ?:[\\/]*)
39202  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39203  ;;
39204  *)
39205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39206for as_dir in $PATH
39207do
39208  IFS=$as_save_IFS
39209  test -z "$as_dir" && as_dir=.
39210    for ac_exec_ext in '' $ac_executable_extensions; do
39211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39212    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39214    break 2
39215  fi
39216done
39217  done
39218IFS=$as_save_IFS
39219
39220  ;;
39221esac
39222fi
39223STRIP=$ac_cv_path_STRIP
39224if test -n "$STRIP"; then
39225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39226$as_echo "$STRIP" >&6; }
39227else
39228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39229$as_echo "no" >&6; }
39230fi
39231
39232
39233          if test "x$STRIP" = x; then
39234            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39235          fi
39236        else
39237          # Otherwise we believe it is a complete path. Use it as it is.
39238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39239$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39240          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39241$as_echo_n "checking for STRIP... " >&6; }
39242          if test ! -x "$tool_specified"; then
39243            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39244$as_echo "not found" >&6; }
39245            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39246          fi
39247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39248$as_echo "$tool_specified" >&6; }
39249        fi
39250      fi
39251    fi
39252
39253  fi
39254
39255
39256
39257  # Only process if variable expands to non-empty
39258
39259  if test "x$STRIP" != x; then
39260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39261
39262  # First separate the path from the arguments. This will split at the first
39263  # space.
39264  complete="$STRIP"
39265  path="${complete%% *}"
39266  tmp="$complete EOL"
39267  arguments="${tmp#* }"
39268
39269  # Input might be given as Windows format, start by converting to
39270  # unix format.
39271  new_path=`$CYGPATH -u "$path"`
39272
39273  # Now try to locate executable using which
39274  new_path=`$WHICH "$new_path" 2> /dev/null`
39275  # bat and cmd files are not always considered executable in cygwin causing which
39276  # to not find them
39277  if test "x$new_path" = x \
39278      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39279      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39280    new_path=`$CYGPATH -u "$path"`
39281  fi
39282  if test "x$new_path" = x; then
39283    # Oops. Which didn't find the executable.
39284    # The splitting of arguments from the executable at a space might have been incorrect,
39285    # since paths with space are more likely in Windows. Give it another try with the whole
39286    # argument.
39287    path="$complete"
39288    arguments="EOL"
39289    new_path=`$CYGPATH -u "$path"`
39290    new_path=`$WHICH "$new_path" 2> /dev/null`
39291    # bat and cmd files are not always considered executable in cygwin causing which
39292    # to not find them
39293    if test "x$new_path" = x \
39294        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39295        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39296      new_path=`$CYGPATH -u "$path"`
39297    fi
39298    if test "x$new_path" = x; then
39299      # It's still not found. Now this is an unrecoverable error.
39300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39301$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39302      has_space=`$ECHO "$complete" | $GREP " "`
39303      if test "x$has_space" != x; then
39304        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39305$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39306      fi
39307      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39308    fi
39309  fi
39310
39311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39314  # "foo.exe" is OK but "foo" is an error.
39315  #
39316  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39317  # It is also a way to make sure we got the proper file name for the real test later on.
39318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39319  if test "x$test_shortpath" = x; then
39320    # Short path failed, file does not exist as specified.
39321    # Try adding .exe or .cmd
39322    if test -f "${new_path}.exe"; then
39323      input_to_shortpath="${new_path}.exe"
39324    elif test -f "${new_path}.cmd"; then
39325      input_to_shortpath="${new_path}.cmd"
39326    else
39327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39328$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39329      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39330$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39331      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39332    fi
39333  else
39334    input_to_shortpath="$new_path"
39335  fi
39336
39337  # Call helper function which possibly converts this using DOS-style short mode.
39338  # If so, the updated path is stored in $new_path.
39339  new_path="$input_to_shortpath"
39340
39341  input_path="$input_to_shortpath"
39342  # Check if we need to convert this using DOS-style short mode. If the path
39343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39344  # take no chances and rewrite it.
39345  # Note: m4 eats our [], so we need to use [ and ] instead.
39346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39347  if test "x$has_forbidden_chars" != x; then
39348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39352      # Going to short mode and back again did indeed matter. Since short mode is
39353      # case insensitive, let's make it lowercase to improve readability.
39354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39355      # Now convert it back to Unix-style (cygpath)
39356      input_path=`$CYGPATH -u "$shortmode_path"`
39357      new_path="$input_path"
39358    fi
39359  fi
39360
39361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39362  if test "x$test_cygdrive_prefix" = x; then
39363    # As a simple fix, exclude /usr/bin since it's not a real path.
39364    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39366      # a path prefixed by /cygdrive for fixpath to work.
39367      new_path="$CYGWIN_ROOT_PATH$input_path"
39368    fi
39369  fi
39370
39371  # remove trailing .exe if any
39372  new_path="${new_path/%.exe/}"
39373
39374    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39375
39376  # First separate the path from the arguments. This will split at the first
39377  # space.
39378  complete="$STRIP"
39379  path="${complete%% *}"
39380  tmp="$complete EOL"
39381  arguments="${tmp#* }"
39382
39383  # Input might be given as Windows format, start by converting to
39384  # unix format.
39385  new_path="$path"
39386
39387  windows_path="$new_path"
39388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39389    unix_path=`$CYGPATH -u "$windows_path"`
39390    new_path="$unix_path"
39391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39393    new_path="$unix_path"
39394  fi
39395
39396
39397  # Now try to locate executable using which
39398  new_path=`$WHICH "$new_path" 2> /dev/null`
39399
39400  if test "x$new_path" = x; then
39401    # Oops. Which didn't find the executable.
39402    # The splitting of arguments from the executable at a space might have been incorrect,
39403    # since paths with space are more likely in Windows. Give it another try with the whole
39404    # argument.
39405    path="$complete"
39406    arguments="EOL"
39407    new_path="$path"
39408
39409  windows_path="$new_path"
39410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39411    unix_path=`$CYGPATH -u "$windows_path"`
39412    new_path="$unix_path"
39413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39415    new_path="$unix_path"
39416  fi
39417
39418
39419    new_path=`$WHICH "$new_path" 2> /dev/null`
39420    # bat and cmd files are not always considered executable in MSYS causing which
39421    # to not find them
39422    if test "x$new_path" = x \
39423        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39424        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39425      new_path="$path"
39426
39427  windows_path="$new_path"
39428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39429    unix_path=`$CYGPATH -u "$windows_path"`
39430    new_path="$unix_path"
39431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39433    new_path="$unix_path"
39434  fi
39435
39436    fi
39437
39438    if test "x$new_path" = x; then
39439      # It's still not found. Now this is an unrecoverable error.
39440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39441$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39442      has_space=`$ECHO "$complete" | $GREP " "`
39443      if test "x$has_space" != x; then
39444        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39445$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39446      fi
39447      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39448    fi
39449  fi
39450
39451  # Now new_path has a complete unix path to the binary
39452  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39453    # Keep paths in /bin as-is, but remove trailing .exe if any
39454    new_path="${new_path/%.exe/}"
39455    # Do not save /bin paths to all_fixpath_prefixes!
39456  else
39457    # Not in mixed or Windows style, start by that.
39458    new_path=`cmd //c echo $new_path`
39459
39460  input_path="$new_path"
39461  # Check if we need to convert this using DOS-style short mode. If the path
39462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39463  # take no chances and rewrite it.
39464  # Note: m4 eats our [], so we need to use [ and ] instead.
39465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39466  if test "x$has_forbidden_chars" != x; then
39467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39469  fi
39470
39471    # Output is in $new_path
39472
39473  windows_path="$new_path"
39474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39475    unix_path=`$CYGPATH -u "$windows_path"`
39476    new_path="$unix_path"
39477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39479    new_path="$unix_path"
39480  fi
39481
39482    # remove trailing .exe if any
39483    new_path="${new_path/%.exe/}"
39484
39485    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39486    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39487  fi
39488
39489    else
39490      # We're on a unix platform. Hooray! :)
39491      # First separate the path from the arguments. This will split at the first
39492      # space.
39493      complete="$STRIP"
39494      path="${complete%% *}"
39495      tmp="$complete EOL"
39496      arguments="${tmp#* }"
39497
39498      # Cannot rely on the command "which" here since it doesn't always work.
39499      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39500      if test -z "$is_absolute_path"; then
39501        # Path to executable is not absolute. Find it.
39502        IFS_save="$IFS"
39503        IFS=:
39504        for p in $PATH; do
39505          if test -f "$p/$path" && test -x "$p/$path"; then
39506            new_path="$p/$path"
39507            break
39508          fi
39509        done
39510        IFS="$IFS_save"
39511      else
39512        # This is an absolute path, we can use it without further modifications.
39513        new_path="$path"
39514      fi
39515
39516      if test "x$new_path" = x; then
39517        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39518$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39519        has_space=`$ECHO "$complete" | $GREP " "`
39520        if test "x$has_space" != x; then
39521          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39522$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39523        fi
39524        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39525      fi
39526    fi
39527
39528    # Now join together the path and the arguments once again
39529    if test "x$arguments" != xEOL; then
39530      new_complete="$new_path ${arguments% *}"
39531    else
39532      new_complete="$new_path"
39533    fi
39534
39535    if test "x$complete" != "x$new_complete"; then
39536      STRIP="$new_complete"
39537      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39538$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39539    fi
39540  fi
39541
39542
39543
39544  # Publish this variable in the help.
39545
39546
39547  if [ -z "${NM+x}" ]; then
39548    # The variable is not set by user, try to locate tool using the code snippet
39549    for ac_prog in nm
39550do
39551  # Extract the first word of "$ac_prog", so it can be a program name with args.
39552set dummy $ac_prog; ac_word=$2
39553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39554$as_echo_n "checking for $ac_word... " >&6; }
39555if ${ac_cv_path_NM+:} false; then :
39556  $as_echo_n "(cached) " >&6
39557else
39558  case $NM in
39559  [\\/]* | ?:[\\/]*)
39560  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39561  ;;
39562  *)
39563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39564for as_dir in $PATH
39565do
39566  IFS=$as_save_IFS
39567  test -z "$as_dir" && as_dir=.
39568    for ac_exec_ext in '' $ac_executable_extensions; do
39569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39570    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39572    break 2
39573  fi
39574done
39575  done
39576IFS=$as_save_IFS
39577
39578  ;;
39579esac
39580fi
39581NM=$ac_cv_path_NM
39582if test -n "$NM"; then
39583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39584$as_echo "$NM" >&6; }
39585else
39586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39587$as_echo "no" >&6; }
39588fi
39589
39590
39591  test -n "$NM" && break
39592done
39593
39594  else
39595    # The variable is set, but is it from the command line or the environment?
39596
39597    # Try to remove the string !NM! from our list.
39598    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39599    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39600      # If it failed, the variable was not from the command line. Ignore it,
39601      # but warn the user (except for BASH, which is always set by the calling BASH).
39602      if test "xNM" != xBASH; then
39603        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39604$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39605      fi
39606      # Try to locate tool using the code snippet
39607      for ac_prog in nm
39608do
39609  # Extract the first word of "$ac_prog", so it can be a program name with args.
39610set dummy $ac_prog; ac_word=$2
39611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39612$as_echo_n "checking for $ac_word... " >&6; }
39613if ${ac_cv_path_NM+:} false; then :
39614  $as_echo_n "(cached) " >&6
39615else
39616  case $NM in
39617  [\\/]* | ?:[\\/]*)
39618  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39619  ;;
39620  *)
39621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39622for as_dir in $PATH
39623do
39624  IFS=$as_save_IFS
39625  test -z "$as_dir" && as_dir=.
39626    for ac_exec_ext in '' $ac_executable_extensions; do
39627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39628    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39630    break 2
39631  fi
39632done
39633  done
39634IFS=$as_save_IFS
39635
39636  ;;
39637esac
39638fi
39639NM=$ac_cv_path_NM
39640if test -n "$NM"; then
39641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39642$as_echo "$NM" >&6; }
39643else
39644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39645$as_echo "no" >&6; }
39646fi
39647
39648
39649  test -n "$NM" && break
39650done
39651
39652    else
39653      # If it succeeded, then it was overridden by the user. We will use it
39654      # for the tool.
39655
39656      # First remove it from the list of overridden variables, so we can test
39657      # for unknown variables in the end.
39658      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39659
39660      # Check if we try to supply an empty value
39661      if test "x$NM" = x; then
39662        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39663$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39664        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39665$as_echo_n "checking for NM... " >&6; }
39666        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39667$as_echo "disabled" >&6; }
39668      else
39669        # Check if the provided tool contains a complete path.
39670        tool_specified="$NM"
39671        tool_basename="${tool_specified##*/}"
39672        if test "x$tool_basename" = "x$tool_specified"; then
39673          # A command without a complete path is provided, search $PATH.
39674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39675$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39676          # Extract the first word of "$tool_basename", so it can be a program name with args.
39677set dummy $tool_basename; ac_word=$2
39678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39679$as_echo_n "checking for $ac_word... " >&6; }
39680if ${ac_cv_path_NM+:} false; then :
39681  $as_echo_n "(cached) " >&6
39682else
39683  case $NM in
39684  [\\/]* | ?:[\\/]*)
39685  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39686  ;;
39687  *)
39688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39689for as_dir in $PATH
39690do
39691  IFS=$as_save_IFS
39692  test -z "$as_dir" && as_dir=.
39693    for ac_exec_ext in '' $ac_executable_extensions; do
39694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39695    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39697    break 2
39698  fi
39699done
39700  done
39701IFS=$as_save_IFS
39702
39703  ;;
39704esac
39705fi
39706NM=$ac_cv_path_NM
39707if test -n "$NM"; then
39708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39709$as_echo "$NM" >&6; }
39710else
39711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39712$as_echo "no" >&6; }
39713fi
39714
39715
39716          if test "x$NM" = x; then
39717            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39718          fi
39719        else
39720          # Otherwise we believe it is a complete path. Use it as it is.
39721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39722$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39723          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39724$as_echo_n "checking for NM... " >&6; }
39725          if test ! -x "$tool_specified"; then
39726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39727$as_echo "not found" >&6; }
39728            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39729          fi
39730          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39731$as_echo "$tool_specified" >&6; }
39732        fi
39733      fi
39734    fi
39735
39736  fi
39737
39738
39739
39740  # Only process if variable expands to non-empty
39741
39742  if test "x$NM" != x; then
39743    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39744
39745  # First separate the path from the arguments. This will split at the first
39746  # space.
39747  complete="$NM"
39748  path="${complete%% *}"
39749  tmp="$complete EOL"
39750  arguments="${tmp#* }"
39751
39752  # Input might be given as Windows format, start by converting to
39753  # unix format.
39754  new_path=`$CYGPATH -u "$path"`
39755
39756  # Now try to locate executable using which
39757  new_path=`$WHICH "$new_path" 2> /dev/null`
39758  # bat and cmd files are not always considered executable in cygwin causing which
39759  # to not find them
39760  if test "x$new_path" = x \
39761      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39762      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39763    new_path=`$CYGPATH -u "$path"`
39764  fi
39765  if test "x$new_path" = x; then
39766    # Oops. Which didn't find the executable.
39767    # The splitting of arguments from the executable at a space might have been incorrect,
39768    # since paths with space are more likely in Windows. Give it another try with the whole
39769    # argument.
39770    path="$complete"
39771    arguments="EOL"
39772    new_path=`$CYGPATH -u "$path"`
39773    new_path=`$WHICH "$new_path" 2> /dev/null`
39774    # bat and cmd files are not always considered executable in cygwin causing which
39775    # to not find them
39776    if test "x$new_path" = x \
39777        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39778        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39779      new_path=`$CYGPATH -u "$path"`
39780    fi
39781    if test "x$new_path" = x; then
39782      # It's still not found. Now this is an unrecoverable error.
39783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39784$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39785      has_space=`$ECHO "$complete" | $GREP " "`
39786      if test "x$has_space" != x; then
39787        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39788$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39789      fi
39790      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39791    fi
39792  fi
39793
39794  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39795  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39796  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39797  # "foo.exe" is OK but "foo" is an error.
39798  #
39799  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39800  # It is also a way to make sure we got the proper file name for the real test later on.
39801  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39802  if test "x$test_shortpath" = x; then
39803    # Short path failed, file does not exist as specified.
39804    # Try adding .exe or .cmd
39805    if test -f "${new_path}.exe"; then
39806      input_to_shortpath="${new_path}.exe"
39807    elif test -f "${new_path}.cmd"; then
39808      input_to_shortpath="${new_path}.cmd"
39809    else
39810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39811$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39812      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39813$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39814      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39815    fi
39816  else
39817    input_to_shortpath="$new_path"
39818  fi
39819
39820  # Call helper function which possibly converts this using DOS-style short mode.
39821  # If so, the updated path is stored in $new_path.
39822  new_path="$input_to_shortpath"
39823
39824  input_path="$input_to_shortpath"
39825  # Check if we need to convert this using DOS-style short mode. If the path
39826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39827  # take no chances and rewrite it.
39828  # Note: m4 eats our [], so we need to use [ and ] instead.
39829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39830  if test "x$has_forbidden_chars" != x; then
39831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39835      # Going to short mode and back again did indeed matter. Since short mode is
39836      # case insensitive, let's make it lowercase to improve readability.
39837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39838      # Now convert it back to Unix-style (cygpath)
39839      input_path=`$CYGPATH -u "$shortmode_path"`
39840      new_path="$input_path"
39841    fi
39842  fi
39843
39844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39845  if test "x$test_cygdrive_prefix" = x; then
39846    # As a simple fix, exclude /usr/bin since it's not a real path.
39847    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39849      # a path prefixed by /cygdrive for fixpath to work.
39850      new_path="$CYGWIN_ROOT_PATH$input_path"
39851    fi
39852  fi
39853
39854  # remove trailing .exe if any
39855  new_path="${new_path/%.exe/}"
39856
39857    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39858
39859  # First separate the path from the arguments. This will split at the first
39860  # space.
39861  complete="$NM"
39862  path="${complete%% *}"
39863  tmp="$complete EOL"
39864  arguments="${tmp#* }"
39865
39866  # Input might be given as Windows format, start by converting to
39867  # unix format.
39868  new_path="$path"
39869
39870  windows_path="$new_path"
39871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39872    unix_path=`$CYGPATH -u "$windows_path"`
39873    new_path="$unix_path"
39874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39876    new_path="$unix_path"
39877  fi
39878
39879
39880  # Now try to locate executable using which
39881  new_path=`$WHICH "$new_path" 2> /dev/null`
39882
39883  if test "x$new_path" = x; then
39884    # Oops. Which didn't find the executable.
39885    # The splitting of arguments from the executable at a space might have been incorrect,
39886    # since paths with space are more likely in Windows. Give it another try with the whole
39887    # argument.
39888    path="$complete"
39889    arguments="EOL"
39890    new_path="$path"
39891
39892  windows_path="$new_path"
39893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39894    unix_path=`$CYGPATH -u "$windows_path"`
39895    new_path="$unix_path"
39896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39898    new_path="$unix_path"
39899  fi
39900
39901
39902    new_path=`$WHICH "$new_path" 2> /dev/null`
39903    # bat and cmd files are not always considered executable in MSYS causing which
39904    # to not find them
39905    if test "x$new_path" = x \
39906        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39907        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39908      new_path="$path"
39909
39910  windows_path="$new_path"
39911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39912    unix_path=`$CYGPATH -u "$windows_path"`
39913    new_path="$unix_path"
39914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39916    new_path="$unix_path"
39917  fi
39918
39919    fi
39920
39921    if test "x$new_path" = x; then
39922      # It's still not found. Now this is an unrecoverable error.
39923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39924$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39925      has_space=`$ECHO "$complete" | $GREP " "`
39926      if test "x$has_space" != x; then
39927        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39928$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39929      fi
39930      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39931    fi
39932  fi
39933
39934  # Now new_path has a complete unix path to the binary
39935  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39936    # Keep paths in /bin as-is, but remove trailing .exe if any
39937    new_path="${new_path/%.exe/}"
39938    # Do not save /bin paths to all_fixpath_prefixes!
39939  else
39940    # Not in mixed or Windows style, start by that.
39941    new_path=`cmd //c echo $new_path`
39942
39943  input_path="$new_path"
39944  # Check if we need to convert this using DOS-style short mode. If the path
39945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39946  # take no chances and rewrite it.
39947  # Note: m4 eats our [], so we need to use [ and ] instead.
39948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39949  if test "x$has_forbidden_chars" != x; then
39950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39952  fi
39953
39954    # Output is in $new_path
39955
39956  windows_path="$new_path"
39957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39958    unix_path=`$CYGPATH -u "$windows_path"`
39959    new_path="$unix_path"
39960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39962    new_path="$unix_path"
39963  fi
39964
39965    # remove trailing .exe if any
39966    new_path="${new_path/%.exe/}"
39967
39968    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39969    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39970  fi
39971
39972    else
39973      # We're on a unix platform. Hooray! :)
39974      # First separate the path from the arguments. This will split at the first
39975      # space.
39976      complete="$NM"
39977      path="${complete%% *}"
39978      tmp="$complete EOL"
39979      arguments="${tmp#* }"
39980
39981      # Cannot rely on the command "which" here since it doesn't always work.
39982      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39983      if test -z "$is_absolute_path"; then
39984        # Path to executable is not absolute. Find it.
39985        IFS_save="$IFS"
39986        IFS=:
39987        for p in $PATH; do
39988          if test -f "$p/$path" && test -x "$p/$path"; then
39989            new_path="$p/$path"
39990            break
39991          fi
39992        done
39993        IFS="$IFS_save"
39994      else
39995        # This is an absolute path, we can use it without further modifications.
39996        new_path="$path"
39997      fi
39998
39999      if test "x$new_path" = x; then
40000        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40001$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40002        has_space=`$ECHO "$complete" | $GREP " "`
40003        if test "x$has_space" != x; then
40004          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40005$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40006        fi
40007        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40008      fi
40009    fi
40010
40011    # Now join together the path and the arguments once again
40012    if test "x$arguments" != xEOL; then
40013      new_complete="$new_path ${arguments% *}"
40014    else
40015      new_complete="$new_path"
40016    fi
40017
40018    if test "x$complete" != "x$new_complete"; then
40019      NM="$new_complete"
40020      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40021$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40022    fi
40023  fi
40024
40025
40026
40027  # Publish this variable in the help.
40028
40029
40030  if [ -z "${GNM+x}" ]; then
40031    # The variable is not set by user, try to locate tool using the code snippet
40032    for ac_prog in gnm
40033do
40034  # Extract the first word of "$ac_prog", so it can be a program name with args.
40035set dummy $ac_prog; ac_word=$2
40036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40037$as_echo_n "checking for $ac_word... " >&6; }
40038if ${ac_cv_path_GNM+:} false; then :
40039  $as_echo_n "(cached) " >&6
40040else
40041  case $GNM in
40042  [\\/]* | ?:[\\/]*)
40043  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40044  ;;
40045  *)
40046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40047for as_dir in $PATH
40048do
40049  IFS=$as_save_IFS
40050  test -z "$as_dir" && as_dir=.
40051    for ac_exec_ext in '' $ac_executable_extensions; do
40052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40053    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40055    break 2
40056  fi
40057done
40058  done
40059IFS=$as_save_IFS
40060
40061  ;;
40062esac
40063fi
40064GNM=$ac_cv_path_GNM
40065if test -n "$GNM"; then
40066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40067$as_echo "$GNM" >&6; }
40068else
40069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40070$as_echo "no" >&6; }
40071fi
40072
40073
40074  test -n "$GNM" && break
40075done
40076
40077  else
40078    # The variable is set, but is it from the command line or the environment?
40079
40080    # Try to remove the string !GNM! from our list.
40081    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40082    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40083      # If it failed, the variable was not from the command line. Ignore it,
40084      # but warn the user (except for BASH, which is always set by the calling BASH).
40085      if test "xGNM" != xBASH; then
40086        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40087$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40088      fi
40089      # Try to locate tool using the code snippet
40090      for ac_prog in gnm
40091do
40092  # Extract the first word of "$ac_prog", so it can be a program name with args.
40093set dummy $ac_prog; ac_word=$2
40094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40095$as_echo_n "checking for $ac_word... " >&6; }
40096if ${ac_cv_path_GNM+:} false; then :
40097  $as_echo_n "(cached) " >&6
40098else
40099  case $GNM in
40100  [\\/]* | ?:[\\/]*)
40101  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40102  ;;
40103  *)
40104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40105for as_dir in $PATH
40106do
40107  IFS=$as_save_IFS
40108  test -z "$as_dir" && as_dir=.
40109    for ac_exec_ext in '' $ac_executable_extensions; do
40110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40111    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40113    break 2
40114  fi
40115done
40116  done
40117IFS=$as_save_IFS
40118
40119  ;;
40120esac
40121fi
40122GNM=$ac_cv_path_GNM
40123if test -n "$GNM"; then
40124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40125$as_echo "$GNM" >&6; }
40126else
40127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40128$as_echo "no" >&6; }
40129fi
40130
40131
40132  test -n "$GNM" && break
40133done
40134
40135    else
40136      # If it succeeded, then it was overridden by the user. We will use it
40137      # for the tool.
40138
40139      # First remove it from the list of overridden variables, so we can test
40140      # for unknown variables in the end.
40141      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40142
40143      # Check if we try to supply an empty value
40144      if test "x$GNM" = x; then
40145        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40146$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40147        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40148$as_echo_n "checking for GNM... " >&6; }
40149        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40150$as_echo "disabled" >&6; }
40151      else
40152        # Check if the provided tool contains a complete path.
40153        tool_specified="$GNM"
40154        tool_basename="${tool_specified##*/}"
40155        if test "x$tool_basename" = "x$tool_specified"; then
40156          # A command without a complete path is provided, search $PATH.
40157          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40158$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40159          # Extract the first word of "$tool_basename", so it can be a program name with args.
40160set dummy $tool_basename; ac_word=$2
40161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40162$as_echo_n "checking for $ac_word... " >&6; }
40163if ${ac_cv_path_GNM+:} false; then :
40164  $as_echo_n "(cached) " >&6
40165else
40166  case $GNM in
40167  [\\/]* | ?:[\\/]*)
40168  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40169  ;;
40170  *)
40171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40172for as_dir in $PATH
40173do
40174  IFS=$as_save_IFS
40175  test -z "$as_dir" && as_dir=.
40176    for ac_exec_ext in '' $ac_executable_extensions; do
40177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40178    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40180    break 2
40181  fi
40182done
40183  done
40184IFS=$as_save_IFS
40185
40186  ;;
40187esac
40188fi
40189GNM=$ac_cv_path_GNM
40190if test -n "$GNM"; then
40191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40192$as_echo "$GNM" >&6; }
40193else
40194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40195$as_echo "no" >&6; }
40196fi
40197
40198
40199          if test "x$GNM" = x; then
40200            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40201          fi
40202        else
40203          # Otherwise we believe it is a complete path. Use it as it is.
40204          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40205$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40206          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40207$as_echo_n "checking for GNM... " >&6; }
40208          if test ! -x "$tool_specified"; then
40209            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40210$as_echo "not found" >&6; }
40211            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40212          fi
40213          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40214$as_echo "$tool_specified" >&6; }
40215        fi
40216      fi
40217    fi
40218
40219  fi
40220
40221
40222
40223  # Only process if variable expands to non-empty
40224
40225  if test "x$GNM" != x; then
40226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40227
40228  # First separate the path from the arguments. This will split at the first
40229  # space.
40230  complete="$GNM"
40231  path="${complete%% *}"
40232  tmp="$complete EOL"
40233  arguments="${tmp#* }"
40234
40235  # Input might be given as Windows format, start by converting to
40236  # unix format.
40237  new_path=`$CYGPATH -u "$path"`
40238
40239  # Now try to locate executable using which
40240  new_path=`$WHICH "$new_path" 2> /dev/null`
40241  # bat and cmd files are not always considered executable in cygwin causing which
40242  # to not find them
40243  if test "x$new_path" = x \
40244      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40245      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40246    new_path=`$CYGPATH -u "$path"`
40247  fi
40248  if test "x$new_path" = x; then
40249    # Oops. Which didn't find the executable.
40250    # The splitting of arguments from the executable at a space might have been incorrect,
40251    # since paths with space are more likely in Windows. Give it another try with the whole
40252    # argument.
40253    path="$complete"
40254    arguments="EOL"
40255    new_path=`$CYGPATH -u "$path"`
40256    new_path=`$WHICH "$new_path" 2> /dev/null`
40257    # bat and cmd files are not always considered executable in cygwin causing which
40258    # to not find them
40259    if test "x$new_path" = x \
40260        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40261        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40262      new_path=`$CYGPATH -u "$path"`
40263    fi
40264    if test "x$new_path" = x; then
40265      # It's still not found. Now this is an unrecoverable error.
40266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40267$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40268      has_space=`$ECHO "$complete" | $GREP " "`
40269      if test "x$has_space" != x; then
40270        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40271$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40272      fi
40273      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40274    fi
40275  fi
40276
40277  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40278  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40279  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40280  # "foo.exe" is OK but "foo" is an error.
40281  #
40282  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40283  # It is also a way to make sure we got the proper file name for the real test later on.
40284  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40285  if test "x$test_shortpath" = x; then
40286    # Short path failed, file does not exist as specified.
40287    # Try adding .exe or .cmd
40288    if test -f "${new_path}.exe"; then
40289      input_to_shortpath="${new_path}.exe"
40290    elif test -f "${new_path}.cmd"; then
40291      input_to_shortpath="${new_path}.cmd"
40292    else
40293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40294$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40295      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40296$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40297      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40298    fi
40299  else
40300    input_to_shortpath="$new_path"
40301  fi
40302
40303  # Call helper function which possibly converts this using DOS-style short mode.
40304  # If so, the updated path is stored in $new_path.
40305  new_path="$input_to_shortpath"
40306
40307  input_path="$input_to_shortpath"
40308  # Check if we need to convert this using DOS-style short mode. If the path
40309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40310  # take no chances and rewrite it.
40311  # Note: m4 eats our [], so we need to use [ and ] instead.
40312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40313  if test "x$has_forbidden_chars" != x; then
40314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40318      # Going to short mode and back again did indeed matter. Since short mode is
40319      # case insensitive, let's make it lowercase to improve readability.
40320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40321      # Now convert it back to Unix-style (cygpath)
40322      input_path=`$CYGPATH -u "$shortmode_path"`
40323      new_path="$input_path"
40324    fi
40325  fi
40326
40327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40328  if test "x$test_cygdrive_prefix" = x; then
40329    # As a simple fix, exclude /usr/bin since it's not a real path.
40330    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40332      # a path prefixed by /cygdrive for fixpath to work.
40333      new_path="$CYGWIN_ROOT_PATH$input_path"
40334    fi
40335  fi
40336
40337  # remove trailing .exe if any
40338  new_path="${new_path/%.exe/}"
40339
40340    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40341
40342  # First separate the path from the arguments. This will split at the first
40343  # space.
40344  complete="$GNM"
40345  path="${complete%% *}"
40346  tmp="$complete EOL"
40347  arguments="${tmp#* }"
40348
40349  # Input might be given as Windows format, start by converting to
40350  # unix format.
40351  new_path="$path"
40352
40353  windows_path="$new_path"
40354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40355    unix_path=`$CYGPATH -u "$windows_path"`
40356    new_path="$unix_path"
40357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40359    new_path="$unix_path"
40360  fi
40361
40362
40363  # Now try to locate executable using which
40364  new_path=`$WHICH "$new_path" 2> /dev/null`
40365
40366  if test "x$new_path" = x; then
40367    # Oops. Which didn't find the executable.
40368    # The splitting of arguments from the executable at a space might have been incorrect,
40369    # since paths with space are more likely in Windows. Give it another try with the whole
40370    # argument.
40371    path="$complete"
40372    arguments="EOL"
40373    new_path="$path"
40374
40375  windows_path="$new_path"
40376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40377    unix_path=`$CYGPATH -u "$windows_path"`
40378    new_path="$unix_path"
40379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40381    new_path="$unix_path"
40382  fi
40383
40384
40385    new_path=`$WHICH "$new_path" 2> /dev/null`
40386    # bat and cmd files are not always considered executable in MSYS causing which
40387    # to not find them
40388    if test "x$new_path" = x \
40389        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40390        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40391      new_path="$path"
40392
40393  windows_path="$new_path"
40394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40395    unix_path=`$CYGPATH -u "$windows_path"`
40396    new_path="$unix_path"
40397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40399    new_path="$unix_path"
40400  fi
40401
40402    fi
40403
40404    if test "x$new_path" = x; then
40405      # It's still not found. Now this is an unrecoverable error.
40406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40407$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40408      has_space=`$ECHO "$complete" | $GREP " "`
40409      if test "x$has_space" != x; then
40410        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40411$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40412      fi
40413      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40414    fi
40415  fi
40416
40417  # Now new_path has a complete unix path to the binary
40418  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40419    # Keep paths in /bin as-is, but remove trailing .exe if any
40420    new_path="${new_path/%.exe/}"
40421    # Do not save /bin paths to all_fixpath_prefixes!
40422  else
40423    # Not in mixed or Windows style, start by that.
40424    new_path=`cmd //c echo $new_path`
40425
40426  input_path="$new_path"
40427  # Check if we need to convert this using DOS-style short mode. If the path
40428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40429  # take no chances and rewrite it.
40430  # Note: m4 eats our [], so we need to use [ and ] instead.
40431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40432  if test "x$has_forbidden_chars" != x; then
40433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40435  fi
40436
40437    # Output is in $new_path
40438
40439  windows_path="$new_path"
40440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40441    unix_path=`$CYGPATH -u "$windows_path"`
40442    new_path="$unix_path"
40443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40445    new_path="$unix_path"
40446  fi
40447
40448    # remove trailing .exe if any
40449    new_path="${new_path/%.exe/}"
40450
40451    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40452    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40453  fi
40454
40455    else
40456      # We're on a unix platform. Hooray! :)
40457      # First separate the path from the arguments. This will split at the first
40458      # space.
40459      complete="$GNM"
40460      path="${complete%% *}"
40461      tmp="$complete EOL"
40462      arguments="${tmp#* }"
40463
40464      # Cannot rely on the command "which" here since it doesn't always work.
40465      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40466      if test -z "$is_absolute_path"; then
40467        # Path to executable is not absolute. Find it.
40468        IFS_save="$IFS"
40469        IFS=:
40470        for p in $PATH; do
40471          if test -f "$p/$path" && test -x "$p/$path"; then
40472            new_path="$p/$path"
40473            break
40474          fi
40475        done
40476        IFS="$IFS_save"
40477      else
40478        # This is an absolute path, we can use it without further modifications.
40479        new_path="$path"
40480      fi
40481
40482      if test "x$new_path" = x; then
40483        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40484$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40485        has_space=`$ECHO "$complete" | $GREP " "`
40486        if test "x$has_space" != x; then
40487          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40488$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40489        fi
40490        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40491      fi
40492    fi
40493
40494    # Now join together the path and the arguments once again
40495    if test "x$arguments" != xEOL; then
40496      new_complete="$new_path ${arguments% *}"
40497    else
40498      new_complete="$new_path"
40499    fi
40500
40501    if test "x$complete" != "x$new_complete"; then
40502      GNM="$new_complete"
40503      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40504$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40505    fi
40506  fi
40507
40508  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40509    # FIXME: we should unify this with the solaris case above.
40510
40511
40512  # Publish this variable in the help.
40513
40514
40515  if [ -z "${STRIP+x}" ]; then
40516    # The variable is not set by user, try to locate tool using the code snippet
40517    if test -n "$ac_tool_prefix"; then
40518  for ac_prog in strip
40519  do
40520    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40521set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40523$as_echo_n "checking for $ac_word... " >&6; }
40524if ${ac_cv_prog_STRIP+:} false; then :
40525  $as_echo_n "(cached) " >&6
40526else
40527  if test -n "$STRIP"; then
40528  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40529else
40530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40531for as_dir in $PATH
40532do
40533  IFS=$as_save_IFS
40534  test -z "$as_dir" && as_dir=.
40535    for ac_exec_ext in '' $ac_executable_extensions; do
40536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40537    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40539    break 2
40540  fi
40541done
40542  done
40543IFS=$as_save_IFS
40544
40545fi
40546fi
40547STRIP=$ac_cv_prog_STRIP
40548if test -n "$STRIP"; then
40549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40550$as_echo "$STRIP" >&6; }
40551else
40552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40553$as_echo "no" >&6; }
40554fi
40555
40556
40557    test -n "$STRIP" && break
40558  done
40559fi
40560if test -z "$STRIP"; then
40561  ac_ct_STRIP=$STRIP
40562  for ac_prog in strip
40563do
40564  # Extract the first word of "$ac_prog", so it can be a program name with args.
40565set dummy $ac_prog; ac_word=$2
40566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40567$as_echo_n "checking for $ac_word... " >&6; }
40568if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40569  $as_echo_n "(cached) " >&6
40570else
40571  if test -n "$ac_ct_STRIP"; then
40572  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40573else
40574as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40575for as_dir in $PATH
40576do
40577  IFS=$as_save_IFS
40578  test -z "$as_dir" && as_dir=.
40579    for ac_exec_ext in '' $ac_executable_extensions; do
40580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40581    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40583    break 2
40584  fi
40585done
40586  done
40587IFS=$as_save_IFS
40588
40589fi
40590fi
40591ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40592if test -n "$ac_ct_STRIP"; then
40593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40594$as_echo "$ac_ct_STRIP" >&6; }
40595else
40596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40597$as_echo "no" >&6; }
40598fi
40599
40600
40601  test -n "$ac_ct_STRIP" && break
40602done
40603
40604  if test "x$ac_ct_STRIP" = x; then
40605    STRIP=""
40606  else
40607    case $cross_compiling:$ac_tool_warned in
40608yes:)
40609{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40610$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40611ac_tool_warned=yes ;;
40612esac
40613    STRIP=$ac_ct_STRIP
40614  fi
40615fi
40616
40617  else
40618    # The variable is set, but is it from the command line or the environment?
40619
40620    # Try to remove the string !STRIP! from our list.
40621    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40622    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40623      # If it failed, the variable was not from the command line. Ignore it,
40624      # but warn the user (except for BASH, which is always set by the calling BASH).
40625      if test "xSTRIP" != xBASH; then
40626        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40627$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40628      fi
40629      # Try to locate tool using the code snippet
40630      if test -n "$ac_tool_prefix"; then
40631  for ac_prog in strip
40632  do
40633    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40634set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40636$as_echo_n "checking for $ac_word... " >&6; }
40637if ${ac_cv_prog_STRIP+:} false; then :
40638  $as_echo_n "(cached) " >&6
40639else
40640  if test -n "$STRIP"; then
40641  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40642else
40643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40644for as_dir in $PATH
40645do
40646  IFS=$as_save_IFS
40647  test -z "$as_dir" && as_dir=.
40648    for ac_exec_ext in '' $ac_executable_extensions; do
40649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40650    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40652    break 2
40653  fi
40654done
40655  done
40656IFS=$as_save_IFS
40657
40658fi
40659fi
40660STRIP=$ac_cv_prog_STRIP
40661if test -n "$STRIP"; then
40662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40663$as_echo "$STRIP" >&6; }
40664else
40665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40666$as_echo "no" >&6; }
40667fi
40668
40669
40670    test -n "$STRIP" && break
40671  done
40672fi
40673if test -z "$STRIP"; then
40674  ac_ct_STRIP=$STRIP
40675  for ac_prog in strip
40676do
40677  # Extract the first word of "$ac_prog", so it can be a program name with args.
40678set dummy $ac_prog; ac_word=$2
40679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40680$as_echo_n "checking for $ac_word... " >&6; }
40681if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40682  $as_echo_n "(cached) " >&6
40683else
40684  if test -n "$ac_ct_STRIP"; then
40685  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40686else
40687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40688for as_dir in $PATH
40689do
40690  IFS=$as_save_IFS
40691  test -z "$as_dir" && as_dir=.
40692    for ac_exec_ext in '' $ac_executable_extensions; do
40693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40694    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40696    break 2
40697  fi
40698done
40699  done
40700IFS=$as_save_IFS
40701
40702fi
40703fi
40704ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40705if test -n "$ac_ct_STRIP"; then
40706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40707$as_echo "$ac_ct_STRIP" >&6; }
40708else
40709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40710$as_echo "no" >&6; }
40711fi
40712
40713
40714  test -n "$ac_ct_STRIP" && break
40715done
40716
40717  if test "x$ac_ct_STRIP" = x; then
40718    STRIP=""
40719  else
40720    case $cross_compiling:$ac_tool_warned in
40721yes:)
40722{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40723$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40724ac_tool_warned=yes ;;
40725esac
40726    STRIP=$ac_ct_STRIP
40727  fi
40728fi
40729
40730    else
40731      # If it succeeded, then it was overridden by the user. We will use it
40732      # for the tool.
40733
40734      # First remove it from the list of overridden variables, so we can test
40735      # for unknown variables in the end.
40736      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40737
40738      # Check if we try to supply an empty value
40739      if test "x$STRIP" = x; then
40740        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40741$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40742        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40743$as_echo_n "checking for STRIP... " >&6; }
40744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40745$as_echo "disabled" >&6; }
40746      else
40747        # Check if the provided tool contains a complete path.
40748        tool_specified="$STRIP"
40749        tool_basename="${tool_specified##*/}"
40750        if test "x$tool_basename" = "x$tool_specified"; then
40751          # A command without a complete path is provided, search $PATH.
40752          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40753$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40754          # Extract the first word of "$tool_basename", so it can be a program name with args.
40755set dummy $tool_basename; ac_word=$2
40756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40757$as_echo_n "checking for $ac_word... " >&6; }
40758if ${ac_cv_path_STRIP+:} false; then :
40759  $as_echo_n "(cached) " >&6
40760else
40761  case $STRIP in
40762  [\\/]* | ?:[\\/]*)
40763  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40764  ;;
40765  *)
40766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40767for as_dir in $PATH
40768do
40769  IFS=$as_save_IFS
40770  test -z "$as_dir" && as_dir=.
40771    for ac_exec_ext in '' $ac_executable_extensions; do
40772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40773    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40775    break 2
40776  fi
40777done
40778  done
40779IFS=$as_save_IFS
40780
40781  ;;
40782esac
40783fi
40784STRIP=$ac_cv_path_STRIP
40785if test -n "$STRIP"; then
40786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40787$as_echo "$STRIP" >&6; }
40788else
40789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40790$as_echo "no" >&6; }
40791fi
40792
40793
40794          if test "x$STRIP" = x; then
40795            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40796          fi
40797        else
40798          # Otherwise we believe it is a complete path. Use it as it is.
40799          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40800$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40801          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40802$as_echo_n "checking for STRIP... " >&6; }
40803          if test ! -x "$tool_specified"; then
40804            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40805$as_echo "not found" >&6; }
40806            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40807          fi
40808          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40809$as_echo "$tool_specified" >&6; }
40810        fi
40811      fi
40812    fi
40813
40814  fi
40815
40816
40817
40818  # Only process if variable expands to non-empty
40819
40820  if test "x$STRIP" != x; then
40821    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40822
40823  # First separate the path from the arguments. This will split at the first
40824  # space.
40825  complete="$STRIP"
40826  path="${complete%% *}"
40827  tmp="$complete EOL"
40828  arguments="${tmp#* }"
40829
40830  # Input might be given as Windows format, start by converting to
40831  # unix format.
40832  new_path=`$CYGPATH -u "$path"`
40833
40834  # Now try to locate executable using which
40835  new_path=`$WHICH "$new_path" 2> /dev/null`
40836  # bat and cmd files are not always considered executable in cygwin causing which
40837  # to not find them
40838  if test "x$new_path" = x \
40839      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40840      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40841    new_path=`$CYGPATH -u "$path"`
40842  fi
40843  if test "x$new_path" = x; then
40844    # Oops. Which didn't find the executable.
40845    # The splitting of arguments from the executable at a space might have been incorrect,
40846    # since paths with space are more likely in Windows. Give it another try with the whole
40847    # argument.
40848    path="$complete"
40849    arguments="EOL"
40850    new_path=`$CYGPATH -u "$path"`
40851    new_path=`$WHICH "$new_path" 2> /dev/null`
40852    # bat and cmd files are not always considered executable in cygwin causing which
40853    # to not find them
40854    if test "x$new_path" = x \
40855        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40856        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40857      new_path=`$CYGPATH -u "$path"`
40858    fi
40859    if test "x$new_path" = x; then
40860      # It's still not found. Now this is an unrecoverable error.
40861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40862$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40863      has_space=`$ECHO "$complete" | $GREP " "`
40864      if test "x$has_space" != x; then
40865        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40866$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40867      fi
40868      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40869    fi
40870  fi
40871
40872  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40873  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40874  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40875  # "foo.exe" is OK but "foo" is an error.
40876  #
40877  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40878  # It is also a way to make sure we got the proper file name for the real test later on.
40879  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40880  if test "x$test_shortpath" = x; then
40881    # Short path failed, file does not exist as specified.
40882    # Try adding .exe or .cmd
40883    if test -f "${new_path}.exe"; then
40884      input_to_shortpath="${new_path}.exe"
40885    elif test -f "${new_path}.cmd"; then
40886      input_to_shortpath="${new_path}.cmd"
40887    else
40888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40889$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40890      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40891$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40892      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40893    fi
40894  else
40895    input_to_shortpath="$new_path"
40896  fi
40897
40898  # Call helper function which possibly converts this using DOS-style short mode.
40899  # If so, the updated path is stored in $new_path.
40900  new_path="$input_to_shortpath"
40901
40902  input_path="$input_to_shortpath"
40903  # Check if we need to convert this using DOS-style short mode. If the path
40904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40905  # take no chances and rewrite it.
40906  # Note: m4 eats our [], so we need to use [ and ] instead.
40907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40908  if test "x$has_forbidden_chars" != x; then
40909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40910    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40911    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40912    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40913      # Going to short mode and back again did indeed matter. Since short mode is
40914      # case insensitive, let's make it lowercase to improve readability.
40915      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40916      # Now convert it back to Unix-style (cygpath)
40917      input_path=`$CYGPATH -u "$shortmode_path"`
40918      new_path="$input_path"
40919    fi
40920  fi
40921
40922  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40923  if test "x$test_cygdrive_prefix" = x; then
40924    # As a simple fix, exclude /usr/bin since it's not a real path.
40925    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40926      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40927      # a path prefixed by /cygdrive for fixpath to work.
40928      new_path="$CYGWIN_ROOT_PATH$input_path"
40929    fi
40930  fi
40931
40932  # remove trailing .exe if any
40933  new_path="${new_path/%.exe/}"
40934
40935    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40936
40937  # First separate the path from the arguments. This will split at the first
40938  # space.
40939  complete="$STRIP"
40940  path="${complete%% *}"
40941  tmp="$complete EOL"
40942  arguments="${tmp#* }"
40943
40944  # Input might be given as Windows format, start by converting to
40945  # unix format.
40946  new_path="$path"
40947
40948  windows_path="$new_path"
40949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40950    unix_path=`$CYGPATH -u "$windows_path"`
40951    new_path="$unix_path"
40952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40954    new_path="$unix_path"
40955  fi
40956
40957
40958  # Now try to locate executable using which
40959  new_path=`$WHICH "$new_path" 2> /dev/null`
40960
40961  if test "x$new_path" = x; then
40962    # Oops. Which didn't find the executable.
40963    # The splitting of arguments from the executable at a space might have been incorrect,
40964    # since paths with space are more likely in Windows. Give it another try with the whole
40965    # argument.
40966    path="$complete"
40967    arguments="EOL"
40968    new_path="$path"
40969
40970  windows_path="$new_path"
40971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40972    unix_path=`$CYGPATH -u "$windows_path"`
40973    new_path="$unix_path"
40974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40976    new_path="$unix_path"
40977  fi
40978
40979
40980    new_path=`$WHICH "$new_path" 2> /dev/null`
40981    # bat and cmd files are not always considered executable in MSYS causing which
40982    # to not find them
40983    if test "x$new_path" = x \
40984        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40985        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40986      new_path="$path"
40987
40988  windows_path="$new_path"
40989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40990    unix_path=`$CYGPATH -u "$windows_path"`
40991    new_path="$unix_path"
40992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40994    new_path="$unix_path"
40995  fi
40996
40997    fi
40998
40999    if test "x$new_path" = x; then
41000      # It's still not found. Now this is an unrecoverable error.
41001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41002$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41003      has_space=`$ECHO "$complete" | $GREP " "`
41004      if test "x$has_space" != x; then
41005        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41006$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41007      fi
41008      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41009    fi
41010  fi
41011
41012  # Now new_path has a complete unix path to the binary
41013  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41014    # Keep paths in /bin as-is, but remove trailing .exe if any
41015    new_path="${new_path/%.exe/}"
41016    # Do not save /bin paths to all_fixpath_prefixes!
41017  else
41018    # Not in mixed or Windows style, start by that.
41019    new_path=`cmd //c echo $new_path`
41020
41021  input_path="$new_path"
41022  # Check if we need to convert this using DOS-style short mode. If the path
41023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41024  # take no chances and rewrite it.
41025  # Note: m4 eats our [], so we need to use [ and ] instead.
41026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41027  if test "x$has_forbidden_chars" != x; then
41028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41029    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41030  fi
41031
41032    # Output is in $new_path
41033
41034  windows_path="$new_path"
41035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41036    unix_path=`$CYGPATH -u "$windows_path"`
41037    new_path="$unix_path"
41038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41040    new_path="$unix_path"
41041  fi
41042
41043    # remove trailing .exe if any
41044    new_path="${new_path/%.exe/}"
41045
41046    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41047    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41048  fi
41049
41050    else
41051      # We're on a unix platform. Hooray! :)
41052      # First separate the path from the arguments. This will split at the first
41053      # space.
41054      complete="$STRIP"
41055      path="${complete%% *}"
41056      tmp="$complete EOL"
41057      arguments="${tmp#* }"
41058
41059      # Cannot rely on the command "which" here since it doesn't always work.
41060      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41061      if test -z "$is_absolute_path"; then
41062        # Path to executable is not absolute. Find it.
41063        IFS_save="$IFS"
41064        IFS=:
41065        for p in $PATH; do
41066          if test -f "$p/$path" && test -x "$p/$path"; then
41067            new_path="$p/$path"
41068            break
41069          fi
41070        done
41071        IFS="$IFS_save"
41072      else
41073        # This is an absolute path, we can use it without further modifications.
41074        new_path="$path"
41075      fi
41076
41077      if test "x$new_path" = x; then
41078        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41079$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41080        has_space=`$ECHO "$complete" | $GREP " "`
41081        if test "x$has_space" != x; then
41082          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41083$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41084        fi
41085        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41086      fi
41087    fi
41088
41089    # Now join together the path and the arguments once again
41090    if test "x$arguments" != xEOL; then
41091      new_complete="$new_path ${arguments% *}"
41092    else
41093      new_complete="$new_path"
41094    fi
41095
41096    if test "x$complete" != "x$new_complete"; then
41097      STRIP="$new_complete"
41098      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41099$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41100    fi
41101  fi
41102
41103    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41104
41105
41106  # Publish this variable in the help.
41107
41108
41109  if [ -z "${NM+x}" ]; then
41110    # The variable is not set by user, try to locate tool using the code snippet
41111    if test -n "$ac_tool_prefix"; then
41112  for ac_prog in nm gcc-nm
41113  do
41114    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41115set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41117$as_echo_n "checking for $ac_word... " >&6; }
41118if ${ac_cv_prog_NM+:} false; then :
41119  $as_echo_n "(cached) " >&6
41120else
41121  if test -n "$NM"; then
41122  ac_cv_prog_NM="$NM" # Let the user override the test.
41123else
41124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41125for as_dir in $PATH
41126do
41127  IFS=$as_save_IFS
41128  test -z "$as_dir" && as_dir=.
41129    for ac_exec_ext in '' $ac_executable_extensions; do
41130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41131    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41133    break 2
41134  fi
41135done
41136  done
41137IFS=$as_save_IFS
41138
41139fi
41140fi
41141NM=$ac_cv_prog_NM
41142if test -n "$NM"; then
41143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41144$as_echo "$NM" >&6; }
41145else
41146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41147$as_echo "no" >&6; }
41148fi
41149
41150
41151    test -n "$NM" && break
41152  done
41153fi
41154if test -z "$NM"; then
41155  ac_ct_NM=$NM
41156  for ac_prog in nm gcc-nm
41157do
41158  # Extract the first word of "$ac_prog", so it can be a program name with args.
41159set dummy $ac_prog; ac_word=$2
41160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41161$as_echo_n "checking for $ac_word... " >&6; }
41162if ${ac_cv_prog_ac_ct_NM+:} false; then :
41163  $as_echo_n "(cached) " >&6
41164else
41165  if test -n "$ac_ct_NM"; then
41166  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41167else
41168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41169for as_dir in $PATH
41170do
41171  IFS=$as_save_IFS
41172  test -z "$as_dir" && as_dir=.
41173    for ac_exec_ext in '' $ac_executable_extensions; do
41174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41175    ac_cv_prog_ac_ct_NM="$ac_prog"
41176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41177    break 2
41178  fi
41179done
41180  done
41181IFS=$as_save_IFS
41182
41183fi
41184fi
41185ac_ct_NM=$ac_cv_prog_ac_ct_NM
41186if test -n "$ac_ct_NM"; then
41187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41188$as_echo "$ac_ct_NM" >&6; }
41189else
41190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41191$as_echo "no" >&6; }
41192fi
41193
41194
41195  test -n "$ac_ct_NM" && break
41196done
41197
41198  if test "x$ac_ct_NM" = x; then
41199    NM=""
41200  else
41201    case $cross_compiling:$ac_tool_warned in
41202yes:)
41203{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41204$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41205ac_tool_warned=yes ;;
41206esac
41207    NM=$ac_ct_NM
41208  fi
41209fi
41210
41211  else
41212    # The variable is set, but is it from the command line or the environment?
41213
41214    # Try to remove the string !NM! from our list.
41215    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41216    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41217      # If it failed, the variable was not from the command line. Ignore it,
41218      # but warn the user (except for BASH, which is always set by the calling BASH).
41219      if test "xNM" != xBASH; then
41220        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41221$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41222      fi
41223      # Try to locate tool using the code snippet
41224      if test -n "$ac_tool_prefix"; then
41225  for ac_prog in nm gcc-nm
41226  do
41227    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41228set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41230$as_echo_n "checking for $ac_word... " >&6; }
41231if ${ac_cv_prog_NM+:} false; then :
41232  $as_echo_n "(cached) " >&6
41233else
41234  if test -n "$NM"; then
41235  ac_cv_prog_NM="$NM" # Let the user override the test.
41236else
41237as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41238for as_dir in $PATH
41239do
41240  IFS=$as_save_IFS
41241  test -z "$as_dir" && as_dir=.
41242    for ac_exec_ext in '' $ac_executable_extensions; do
41243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41244    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41246    break 2
41247  fi
41248done
41249  done
41250IFS=$as_save_IFS
41251
41252fi
41253fi
41254NM=$ac_cv_prog_NM
41255if test -n "$NM"; then
41256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41257$as_echo "$NM" >&6; }
41258else
41259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41260$as_echo "no" >&6; }
41261fi
41262
41263
41264    test -n "$NM" && break
41265  done
41266fi
41267if test -z "$NM"; then
41268  ac_ct_NM=$NM
41269  for ac_prog in nm gcc-nm
41270do
41271  # Extract the first word of "$ac_prog", so it can be a program name with args.
41272set dummy $ac_prog; ac_word=$2
41273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41274$as_echo_n "checking for $ac_word... " >&6; }
41275if ${ac_cv_prog_ac_ct_NM+:} false; then :
41276  $as_echo_n "(cached) " >&6
41277else
41278  if test -n "$ac_ct_NM"; then
41279  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41280else
41281as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41282for as_dir in $PATH
41283do
41284  IFS=$as_save_IFS
41285  test -z "$as_dir" && as_dir=.
41286    for ac_exec_ext in '' $ac_executable_extensions; do
41287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41288    ac_cv_prog_ac_ct_NM="$ac_prog"
41289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41290    break 2
41291  fi
41292done
41293  done
41294IFS=$as_save_IFS
41295
41296fi
41297fi
41298ac_ct_NM=$ac_cv_prog_ac_ct_NM
41299if test -n "$ac_ct_NM"; then
41300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41301$as_echo "$ac_ct_NM" >&6; }
41302else
41303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41304$as_echo "no" >&6; }
41305fi
41306
41307
41308  test -n "$ac_ct_NM" && break
41309done
41310
41311  if test "x$ac_ct_NM" = x; then
41312    NM=""
41313  else
41314    case $cross_compiling:$ac_tool_warned in
41315yes:)
41316{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41317$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41318ac_tool_warned=yes ;;
41319esac
41320    NM=$ac_ct_NM
41321  fi
41322fi
41323
41324    else
41325      # If it succeeded, then it was overridden by the user. We will use it
41326      # for the tool.
41327
41328      # First remove it from the list of overridden variables, so we can test
41329      # for unknown variables in the end.
41330      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41331
41332      # Check if we try to supply an empty value
41333      if test "x$NM" = x; then
41334        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41335$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41336        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41337$as_echo_n "checking for NM... " >&6; }
41338        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41339$as_echo "disabled" >&6; }
41340      else
41341        # Check if the provided tool contains a complete path.
41342        tool_specified="$NM"
41343        tool_basename="${tool_specified##*/}"
41344        if test "x$tool_basename" = "x$tool_specified"; then
41345          # A command without a complete path is provided, search $PATH.
41346          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41347$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41348          # Extract the first word of "$tool_basename", so it can be a program name with args.
41349set dummy $tool_basename; ac_word=$2
41350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41351$as_echo_n "checking for $ac_word... " >&6; }
41352if ${ac_cv_path_NM+:} false; then :
41353  $as_echo_n "(cached) " >&6
41354else
41355  case $NM in
41356  [\\/]* | ?:[\\/]*)
41357  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41358  ;;
41359  *)
41360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41361for as_dir in $PATH
41362do
41363  IFS=$as_save_IFS
41364  test -z "$as_dir" && as_dir=.
41365    for ac_exec_ext in '' $ac_executable_extensions; do
41366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41367    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41369    break 2
41370  fi
41371done
41372  done
41373IFS=$as_save_IFS
41374
41375  ;;
41376esac
41377fi
41378NM=$ac_cv_path_NM
41379if test -n "$NM"; then
41380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41381$as_echo "$NM" >&6; }
41382else
41383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41384$as_echo "no" >&6; }
41385fi
41386
41387
41388          if test "x$NM" = x; then
41389            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41390          fi
41391        else
41392          # Otherwise we believe it is a complete path. Use it as it is.
41393          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41394$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41395          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41396$as_echo_n "checking for NM... " >&6; }
41397          if test ! -x "$tool_specified"; then
41398            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41399$as_echo "not found" >&6; }
41400            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41401          fi
41402          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41403$as_echo "$tool_specified" >&6; }
41404        fi
41405      fi
41406    fi
41407
41408  fi
41409
41410
41411    else
41412
41413
41414  # Publish this variable in the help.
41415
41416
41417  if [ -z "${NM+x}" ]; then
41418    # The variable is not set by user, try to locate tool using the code snippet
41419    if test -n "$ac_tool_prefix"; then
41420  for ac_prog in nm
41421  do
41422    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41423set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41425$as_echo_n "checking for $ac_word... " >&6; }
41426if ${ac_cv_prog_NM+:} false; then :
41427  $as_echo_n "(cached) " >&6
41428else
41429  if test -n "$NM"; then
41430  ac_cv_prog_NM="$NM" # Let the user override the test.
41431else
41432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41433for as_dir in $PATH
41434do
41435  IFS=$as_save_IFS
41436  test -z "$as_dir" && as_dir=.
41437    for ac_exec_ext in '' $ac_executable_extensions; do
41438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41439    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41441    break 2
41442  fi
41443done
41444  done
41445IFS=$as_save_IFS
41446
41447fi
41448fi
41449NM=$ac_cv_prog_NM
41450if test -n "$NM"; then
41451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41452$as_echo "$NM" >&6; }
41453else
41454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41455$as_echo "no" >&6; }
41456fi
41457
41458
41459    test -n "$NM" && break
41460  done
41461fi
41462if test -z "$NM"; then
41463  ac_ct_NM=$NM
41464  for ac_prog in nm
41465do
41466  # Extract the first word of "$ac_prog", so it can be a program name with args.
41467set dummy $ac_prog; ac_word=$2
41468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41469$as_echo_n "checking for $ac_word... " >&6; }
41470if ${ac_cv_prog_ac_ct_NM+:} false; then :
41471  $as_echo_n "(cached) " >&6
41472else
41473  if test -n "$ac_ct_NM"; then
41474  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41475else
41476as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41477for as_dir in $PATH
41478do
41479  IFS=$as_save_IFS
41480  test -z "$as_dir" && as_dir=.
41481    for ac_exec_ext in '' $ac_executable_extensions; do
41482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41483    ac_cv_prog_ac_ct_NM="$ac_prog"
41484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41485    break 2
41486  fi
41487done
41488  done
41489IFS=$as_save_IFS
41490
41491fi
41492fi
41493ac_ct_NM=$ac_cv_prog_ac_ct_NM
41494if test -n "$ac_ct_NM"; then
41495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41496$as_echo "$ac_ct_NM" >&6; }
41497else
41498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41499$as_echo "no" >&6; }
41500fi
41501
41502
41503  test -n "$ac_ct_NM" && break
41504done
41505
41506  if test "x$ac_ct_NM" = x; then
41507    NM=""
41508  else
41509    case $cross_compiling:$ac_tool_warned in
41510yes:)
41511{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41512$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41513ac_tool_warned=yes ;;
41514esac
41515    NM=$ac_ct_NM
41516  fi
41517fi
41518
41519  else
41520    # The variable is set, but is it from the command line or the environment?
41521
41522    # Try to remove the string !NM! from our list.
41523    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41524    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41525      # If it failed, the variable was not from the command line. Ignore it,
41526      # but warn the user (except for BASH, which is always set by the calling BASH).
41527      if test "xNM" != xBASH; then
41528        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41529$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41530      fi
41531      # Try to locate tool using the code snippet
41532      if test -n "$ac_tool_prefix"; then
41533  for ac_prog in nm
41534  do
41535    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41536set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41538$as_echo_n "checking for $ac_word... " >&6; }
41539if ${ac_cv_prog_NM+:} false; then :
41540  $as_echo_n "(cached) " >&6
41541else
41542  if test -n "$NM"; then
41543  ac_cv_prog_NM="$NM" # Let the user override the test.
41544else
41545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41546for as_dir in $PATH
41547do
41548  IFS=$as_save_IFS
41549  test -z "$as_dir" && as_dir=.
41550    for ac_exec_ext in '' $ac_executable_extensions; do
41551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41552    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41554    break 2
41555  fi
41556done
41557  done
41558IFS=$as_save_IFS
41559
41560fi
41561fi
41562NM=$ac_cv_prog_NM
41563if test -n "$NM"; then
41564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41565$as_echo "$NM" >&6; }
41566else
41567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41568$as_echo "no" >&6; }
41569fi
41570
41571
41572    test -n "$NM" && break
41573  done
41574fi
41575if test -z "$NM"; then
41576  ac_ct_NM=$NM
41577  for ac_prog in nm
41578do
41579  # Extract the first word of "$ac_prog", so it can be a program name with args.
41580set dummy $ac_prog; ac_word=$2
41581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41582$as_echo_n "checking for $ac_word... " >&6; }
41583if ${ac_cv_prog_ac_ct_NM+:} false; then :
41584  $as_echo_n "(cached) " >&6
41585else
41586  if test -n "$ac_ct_NM"; then
41587  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41588else
41589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41590for as_dir in $PATH
41591do
41592  IFS=$as_save_IFS
41593  test -z "$as_dir" && as_dir=.
41594    for ac_exec_ext in '' $ac_executable_extensions; do
41595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41596    ac_cv_prog_ac_ct_NM="$ac_prog"
41597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41598    break 2
41599  fi
41600done
41601  done
41602IFS=$as_save_IFS
41603
41604fi
41605fi
41606ac_ct_NM=$ac_cv_prog_ac_ct_NM
41607if test -n "$ac_ct_NM"; then
41608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41609$as_echo "$ac_ct_NM" >&6; }
41610else
41611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41612$as_echo "no" >&6; }
41613fi
41614
41615
41616  test -n "$ac_ct_NM" && break
41617done
41618
41619  if test "x$ac_ct_NM" = x; then
41620    NM=""
41621  else
41622    case $cross_compiling:$ac_tool_warned in
41623yes:)
41624{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41625$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41626ac_tool_warned=yes ;;
41627esac
41628    NM=$ac_ct_NM
41629  fi
41630fi
41631
41632    else
41633      # If it succeeded, then it was overridden by the user. We will use it
41634      # for the tool.
41635
41636      # First remove it from the list of overridden variables, so we can test
41637      # for unknown variables in the end.
41638      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41639
41640      # Check if we try to supply an empty value
41641      if test "x$NM" = x; then
41642        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41643$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41644        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41645$as_echo_n "checking for NM... " >&6; }
41646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41647$as_echo "disabled" >&6; }
41648      else
41649        # Check if the provided tool contains a complete path.
41650        tool_specified="$NM"
41651        tool_basename="${tool_specified##*/}"
41652        if test "x$tool_basename" = "x$tool_specified"; then
41653          # A command without a complete path is provided, search $PATH.
41654          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41655$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41656          # Extract the first word of "$tool_basename", so it can be a program name with args.
41657set dummy $tool_basename; ac_word=$2
41658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41659$as_echo_n "checking for $ac_word... " >&6; }
41660if ${ac_cv_path_NM+:} false; then :
41661  $as_echo_n "(cached) " >&6
41662else
41663  case $NM in
41664  [\\/]* | ?:[\\/]*)
41665  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41666  ;;
41667  *)
41668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41669for as_dir in $PATH
41670do
41671  IFS=$as_save_IFS
41672  test -z "$as_dir" && as_dir=.
41673    for ac_exec_ext in '' $ac_executable_extensions; do
41674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41675    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41677    break 2
41678  fi
41679done
41680  done
41681IFS=$as_save_IFS
41682
41683  ;;
41684esac
41685fi
41686NM=$ac_cv_path_NM
41687if test -n "$NM"; then
41688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41689$as_echo "$NM" >&6; }
41690else
41691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41692$as_echo "no" >&6; }
41693fi
41694
41695
41696          if test "x$NM" = x; then
41697            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41698          fi
41699        else
41700          # Otherwise we believe it is a complete path. Use it as it is.
41701          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41702$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41703          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41704$as_echo_n "checking for NM... " >&6; }
41705          if test ! -x "$tool_specified"; then
41706            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41707$as_echo "not found" >&6; }
41708            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41709          fi
41710          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41711$as_echo "$tool_specified" >&6; }
41712        fi
41713      fi
41714    fi
41715
41716  fi
41717
41718
41719    fi
41720
41721  # Only process if variable expands to non-empty
41722
41723  if test "x$NM" != x; then
41724    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41725
41726  # First separate the path from the arguments. This will split at the first
41727  # space.
41728  complete="$NM"
41729  path="${complete%% *}"
41730  tmp="$complete EOL"
41731  arguments="${tmp#* }"
41732
41733  # Input might be given as Windows format, start by converting to
41734  # unix format.
41735  new_path=`$CYGPATH -u "$path"`
41736
41737  # Now try to locate executable using which
41738  new_path=`$WHICH "$new_path" 2> /dev/null`
41739  # bat and cmd files are not always considered executable in cygwin causing which
41740  # to not find them
41741  if test "x$new_path" = x \
41742      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41743      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41744    new_path=`$CYGPATH -u "$path"`
41745  fi
41746  if test "x$new_path" = x; then
41747    # Oops. Which didn't find the executable.
41748    # The splitting of arguments from the executable at a space might have been incorrect,
41749    # since paths with space are more likely in Windows. Give it another try with the whole
41750    # argument.
41751    path="$complete"
41752    arguments="EOL"
41753    new_path=`$CYGPATH -u "$path"`
41754    new_path=`$WHICH "$new_path" 2> /dev/null`
41755    # bat and cmd files are not always considered executable in cygwin causing which
41756    # to not find them
41757    if test "x$new_path" = x \
41758        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41759        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41760      new_path=`$CYGPATH -u "$path"`
41761    fi
41762    if test "x$new_path" = x; then
41763      # It's still not found. Now this is an unrecoverable error.
41764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41765$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41766      has_space=`$ECHO "$complete" | $GREP " "`
41767      if test "x$has_space" != x; then
41768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41770      fi
41771      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41772    fi
41773  fi
41774
41775  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41776  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41777  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41778  # "foo.exe" is OK but "foo" is an error.
41779  #
41780  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41781  # It is also a way to make sure we got the proper file name for the real test later on.
41782  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41783  if test "x$test_shortpath" = x; then
41784    # Short path failed, file does not exist as specified.
41785    # Try adding .exe or .cmd
41786    if test -f "${new_path}.exe"; then
41787      input_to_shortpath="${new_path}.exe"
41788    elif test -f "${new_path}.cmd"; then
41789      input_to_shortpath="${new_path}.cmd"
41790    else
41791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41792$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41793      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41794$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41795      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41796    fi
41797  else
41798    input_to_shortpath="$new_path"
41799  fi
41800
41801  # Call helper function which possibly converts this using DOS-style short mode.
41802  # If so, the updated path is stored in $new_path.
41803  new_path="$input_to_shortpath"
41804
41805  input_path="$input_to_shortpath"
41806  # Check if we need to convert this using DOS-style short mode. If the path
41807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41808  # take no chances and rewrite it.
41809  # Note: m4 eats our [], so we need to use [ and ] instead.
41810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41811  if test "x$has_forbidden_chars" != x; then
41812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41816      # Going to short mode and back again did indeed matter. Since short mode is
41817      # case insensitive, let's make it lowercase to improve readability.
41818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41819      # Now convert it back to Unix-style (cygpath)
41820      input_path=`$CYGPATH -u "$shortmode_path"`
41821      new_path="$input_path"
41822    fi
41823  fi
41824
41825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41826  if test "x$test_cygdrive_prefix" = x; then
41827    # As a simple fix, exclude /usr/bin since it's not a real path.
41828    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41830      # a path prefixed by /cygdrive for fixpath to work.
41831      new_path="$CYGWIN_ROOT_PATH$input_path"
41832    fi
41833  fi
41834
41835  # remove trailing .exe if any
41836  new_path="${new_path/%.exe/}"
41837
41838    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41839
41840  # First separate the path from the arguments. This will split at the first
41841  # space.
41842  complete="$NM"
41843  path="${complete%% *}"
41844  tmp="$complete EOL"
41845  arguments="${tmp#* }"
41846
41847  # Input might be given as Windows format, start by converting to
41848  # unix format.
41849  new_path="$path"
41850
41851  windows_path="$new_path"
41852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41853    unix_path=`$CYGPATH -u "$windows_path"`
41854    new_path="$unix_path"
41855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41857    new_path="$unix_path"
41858  fi
41859
41860
41861  # Now try to locate executable using which
41862  new_path=`$WHICH "$new_path" 2> /dev/null`
41863
41864  if test "x$new_path" = x; then
41865    # Oops. Which didn't find the executable.
41866    # The splitting of arguments from the executable at a space might have been incorrect,
41867    # since paths with space are more likely in Windows. Give it another try with the whole
41868    # argument.
41869    path="$complete"
41870    arguments="EOL"
41871    new_path="$path"
41872
41873  windows_path="$new_path"
41874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41875    unix_path=`$CYGPATH -u "$windows_path"`
41876    new_path="$unix_path"
41877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41879    new_path="$unix_path"
41880  fi
41881
41882
41883    new_path=`$WHICH "$new_path" 2> /dev/null`
41884    # bat and cmd files are not always considered executable in MSYS causing which
41885    # to not find them
41886    if test "x$new_path" = x \
41887        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41888        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41889      new_path="$path"
41890
41891  windows_path="$new_path"
41892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41893    unix_path=`$CYGPATH -u "$windows_path"`
41894    new_path="$unix_path"
41895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41897    new_path="$unix_path"
41898  fi
41899
41900    fi
41901
41902    if test "x$new_path" = x; then
41903      # It's still not found. Now this is an unrecoverable error.
41904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41905$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41906      has_space=`$ECHO "$complete" | $GREP " "`
41907      if test "x$has_space" != x; then
41908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41910      fi
41911      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41912    fi
41913  fi
41914
41915  # Now new_path has a complete unix path to the binary
41916  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41917    # Keep paths in /bin as-is, but remove trailing .exe if any
41918    new_path="${new_path/%.exe/}"
41919    # Do not save /bin paths to all_fixpath_prefixes!
41920  else
41921    # Not in mixed or Windows style, start by that.
41922    new_path=`cmd //c echo $new_path`
41923
41924  input_path="$new_path"
41925  # Check if we need to convert this using DOS-style short mode. If the path
41926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41927  # take no chances and rewrite it.
41928  # Note: m4 eats our [], so we need to use [ and ] instead.
41929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41930  if test "x$has_forbidden_chars" != x; then
41931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41933  fi
41934
41935    # Output is in $new_path
41936
41937  windows_path="$new_path"
41938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41939    unix_path=`$CYGPATH -u "$windows_path"`
41940    new_path="$unix_path"
41941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41943    new_path="$unix_path"
41944  fi
41945
41946    # remove trailing .exe if any
41947    new_path="${new_path/%.exe/}"
41948
41949    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41950    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41951  fi
41952
41953    else
41954      # We're on a unix platform. Hooray! :)
41955      # First separate the path from the arguments. This will split at the first
41956      # space.
41957      complete="$NM"
41958      path="${complete%% *}"
41959      tmp="$complete EOL"
41960      arguments="${tmp#* }"
41961
41962      # Cannot rely on the command "which" here since it doesn't always work.
41963      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41964      if test -z "$is_absolute_path"; then
41965        # Path to executable is not absolute. Find it.
41966        IFS_save="$IFS"
41967        IFS=:
41968        for p in $PATH; do
41969          if test -f "$p/$path" && test -x "$p/$path"; then
41970            new_path="$p/$path"
41971            break
41972          fi
41973        done
41974        IFS="$IFS_save"
41975      else
41976        # This is an absolute path, we can use it without further modifications.
41977        new_path="$path"
41978      fi
41979
41980      if test "x$new_path" = x; then
41981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41982$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41983        has_space=`$ECHO "$complete" | $GREP " "`
41984        if test "x$has_space" != x; then
41985          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41986$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41987        fi
41988        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41989      fi
41990    fi
41991
41992    # Now join together the path and the arguments once again
41993    if test "x$arguments" != xEOL; then
41994      new_complete="$new_path ${arguments% *}"
41995    else
41996      new_complete="$new_path"
41997    fi
41998
41999    if test "x$complete" != "x$new_complete"; then
42000      NM="$new_complete"
42001      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42002$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42003    fi
42004  fi
42005
42006    GNM="$NM"
42007
42008  fi
42009
42010  # objcopy is used for moving debug symbols to separate files when
42011  # full debug symbols are enabled.
42012  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42013
42014
42015  # Publish this variable in the help.
42016
42017
42018  if [ -z "${OBJCOPY+x}" ]; then
42019    # The variable is not set by user, try to locate tool using the code snippet
42020    if test -n "$ac_tool_prefix"; then
42021  for ac_prog in gobjcopy objcopy
42022  do
42023    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42024set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42026$as_echo_n "checking for $ac_word... " >&6; }
42027if ${ac_cv_prog_OBJCOPY+:} false; then :
42028  $as_echo_n "(cached) " >&6
42029else
42030  if test -n "$OBJCOPY"; then
42031  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42032else
42033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42034for as_dir in $PATH
42035do
42036  IFS=$as_save_IFS
42037  test -z "$as_dir" && as_dir=.
42038    for ac_exec_ext in '' $ac_executable_extensions; do
42039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42040    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42042    break 2
42043  fi
42044done
42045  done
42046IFS=$as_save_IFS
42047
42048fi
42049fi
42050OBJCOPY=$ac_cv_prog_OBJCOPY
42051if test -n "$OBJCOPY"; then
42052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42053$as_echo "$OBJCOPY" >&6; }
42054else
42055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42056$as_echo "no" >&6; }
42057fi
42058
42059
42060    test -n "$OBJCOPY" && break
42061  done
42062fi
42063if test -z "$OBJCOPY"; then
42064  ac_ct_OBJCOPY=$OBJCOPY
42065  for ac_prog in gobjcopy objcopy
42066do
42067  # Extract the first word of "$ac_prog", so it can be a program name with args.
42068set dummy $ac_prog; ac_word=$2
42069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42070$as_echo_n "checking for $ac_word... " >&6; }
42071if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42072  $as_echo_n "(cached) " >&6
42073else
42074  if test -n "$ac_ct_OBJCOPY"; then
42075  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42076else
42077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42078for as_dir in $PATH
42079do
42080  IFS=$as_save_IFS
42081  test -z "$as_dir" && as_dir=.
42082    for ac_exec_ext in '' $ac_executable_extensions; do
42083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42084    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42086    break 2
42087  fi
42088done
42089  done
42090IFS=$as_save_IFS
42091
42092fi
42093fi
42094ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42095if test -n "$ac_ct_OBJCOPY"; then
42096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42097$as_echo "$ac_ct_OBJCOPY" >&6; }
42098else
42099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42100$as_echo "no" >&6; }
42101fi
42102
42103
42104  test -n "$ac_ct_OBJCOPY" && break
42105done
42106
42107  if test "x$ac_ct_OBJCOPY" = x; then
42108    OBJCOPY=""
42109  else
42110    case $cross_compiling:$ac_tool_warned in
42111yes:)
42112{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42113$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42114ac_tool_warned=yes ;;
42115esac
42116    OBJCOPY=$ac_ct_OBJCOPY
42117  fi
42118fi
42119
42120  else
42121    # The variable is set, but is it from the command line or the environment?
42122
42123    # Try to remove the string !OBJCOPY! from our list.
42124    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42125    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42126      # If it failed, the variable was not from the command line. Ignore it,
42127      # but warn the user (except for BASH, which is always set by the calling BASH).
42128      if test "xOBJCOPY" != xBASH; then
42129        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42130$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42131      fi
42132      # Try to locate tool using the code snippet
42133      if test -n "$ac_tool_prefix"; then
42134  for ac_prog in gobjcopy objcopy
42135  do
42136    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42137set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42139$as_echo_n "checking for $ac_word... " >&6; }
42140if ${ac_cv_prog_OBJCOPY+:} false; then :
42141  $as_echo_n "(cached) " >&6
42142else
42143  if test -n "$OBJCOPY"; then
42144  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42145else
42146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42147for as_dir in $PATH
42148do
42149  IFS=$as_save_IFS
42150  test -z "$as_dir" && as_dir=.
42151    for ac_exec_ext in '' $ac_executable_extensions; do
42152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42153    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42155    break 2
42156  fi
42157done
42158  done
42159IFS=$as_save_IFS
42160
42161fi
42162fi
42163OBJCOPY=$ac_cv_prog_OBJCOPY
42164if test -n "$OBJCOPY"; then
42165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42166$as_echo "$OBJCOPY" >&6; }
42167else
42168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42169$as_echo "no" >&6; }
42170fi
42171
42172
42173    test -n "$OBJCOPY" && break
42174  done
42175fi
42176if test -z "$OBJCOPY"; then
42177  ac_ct_OBJCOPY=$OBJCOPY
42178  for ac_prog in gobjcopy objcopy
42179do
42180  # Extract the first word of "$ac_prog", so it can be a program name with args.
42181set dummy $ac_prog; ac_word=$2
42182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42183$as_echo_n "checking for $ac_word... " >&6; }
42184if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42185  $as_echo_n "(cached) " >&6
42186else
42187  if test -n "$ac_ct_OBJCOPY"; then
42188  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42189else
42190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42191for as_dir in $PATH
42192do
42193  IFS=$as_save_IFS
42194  test -z "$as_dir" && as_dir=.
42195    for ac_exec_ext in '' $ac_executable_extensions; do
42196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42197    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42199    break 2
42200  fi
42201done
42202  done
42203IFS=$as_save_IFS
42204
42205fi
42206fi
42207ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42208if test -n "$ac_ct_OBJCOPY"; then
42209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42210$as_echo "$ac_ct_OBJCOPY" >&6; }
42211else
42212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42213$as_echo "no" >&6; }
42214fi
42215
42216
42217  test -n "$ac_ct_OBJCOPY" && break
42218done
42219
42220  if test "x$ac_ct_OBJCOPY" = x; then
42221    OBJCOPY=""
42222  else
42223    case $cross_compiling:$ac_tool_warned in
42224yes:)
42225{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42226$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42227ac_tool_warned=yes ;;
42228esac
42229    OBJCOPY=$ac_ct_OBJCOPY
42230  fi
42231fi
42232
42233    else
42234      # If it succeeded, then it was overridden by the user. We will use it
42235      # for the tool.
42236
42237      # First remove it from the list of overridden variables, so we can test
42238      # for unknown variables in the end.
42239      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42240
42241      # Check if we try to supply an empty value
42242      if test "x$OBJCOPY" = x; then
42243        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42244$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42245        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42246$as_echo_n "checking for OBJCOPY... " >&6; }
42247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42248$as_echo "disabled" >&6; }
42249      else
42250        # Check if the provided tool contains a complete path.
42251        tool_specified="$OBJCOPY"
42252        tool_basename="${tool_specified##*/}"
42253        if test "x$tool_basename" = "x$tool_specified"; then
42254          # A command without a complete path is provided, search $PATH.
42255          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42256$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42257          # Extract the first word of "$tool_basename", so it can be a program name with args.
42258set dummy $tool_basename; ac_word=$2
42259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42260$as_echo_n "checking for $ac_word... " >&6; }
42261if ${ac_cv_path_OBJCOPY+:} false; then :
42262  $as_echo_n "(cached) " >&6
42263else
42264  case $OBJCOPY in
42265  [\\/]* | ?:[\\/]*)
42266  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42267  ;;
42268  *)
42269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42270for as_dir in $PATH
42271do
42272  IFS=$as_save_IFS
42273  test -z "$as_dir" && as_dir=.
42274    for ac_exec_ext in '' $ac_executable_extensions; do
42275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42276    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42278    break 2
42279  fi
42280done
42281  done
42282IFS=$as_save_IFS
42283
42284  ;;
42285esac
42286fi
42287OBJCOPY=$ac_cv_path_OBJCOPY
42288if test -n "$OBJCOPY"; then
42289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42290$as_echo "$OBJCOPY" >&6; }
42291else
42292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42293$as_echo "no" >&6; }
42294fi
42295
42296
42297          if test "x$OBJCOPY" = x; then
42298            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42299          fi
42300        else
42301          # Otherwise we believe it is a complete path. Use it as it is.
42302          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42303$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42304          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42305$as_echo_n "checking for OBJCOPY... " >&6; }
42306          if test ! -x "$tool_specified"; then
42307            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42308$as_echo "not found" >&6; }
42309            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42310          fi
42311          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42312$as_echo "$tool_specified" >&6; }
42313        fi
42314      fi
42315    fi
42316
42317  fi
42318
42319
42320    # Only call fixup if objcopy was found.
42321    if test -n "$OBJCOPY"; then
42322
42323  # Only process if variable expands to non-empty
42324
42325  if test "x$OBJCOPY" != x; then
42326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42327
42328  # First separate the path from the arguments. This will split at the first
42329  # space.
42330  complete="$OBJCOPY"
42331  path="${complete%% *}"
42332  tmp="$complete EOL"
42333  arguments="${tmp#* }"
42334
42335  # Input might be given as Windows format, start by converting to
42336  # unix format.
42337  new_path=`$CYGPATH -u "$path"`
42338
42339  # Now try to locate executable using which
42340  new_path=`$WHICH "$new_path" 2> /dev/null`
42341  # bat and cmd files are not always considered executable in cygwin causing which
42342  # to not find them
42343  if test "x$new_path" = x \
42344      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42345      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42346    new_path=`$CYGPATH -u "$path"`
42347  fi
42348  if test "x$new_path" = x; then
42349    # Oops. Which didn't find the executable.
42350    # The splitting of arguments from the executable at a space might have been incorrect,
42351    # since paths with space are more likely in Windows. Give it another try with the whole
42352    # argument.
42353    path="$complete"
42354    arguments="EOL"
42355    new_path=`$CYGPATH -u "$path"`
42356    new_path=`$WHICH "$new_path" 2> /dev/null`
42357    # bat and cmd files are not always considered executable in cygwin causing which
42358    # to not find them
42359    if test "x$new_path" = x \
42360        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42361        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42362      new_path=`$CYGPATH -u "$path"`
42363    fi
42364    if test "x$new_path" = x; then
42365      # It's still not found. Now this is an unrecoverable error.
42366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42367$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42368      has_space=`$ECHO "$complete" | $GREP " "`
42369      if test "x$has_space" != x; then
42370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42372      fi
42373      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42374    fi
42375  fi
42376
42377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42380  # "foo.exe" is OK but "foo" is an error.
42381  #
42382  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42383  # It is also a way to make sure we got the proper file name for the real test later on.
42384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42385  if test "x$test_shortpath" = x; then
42386    # Short path failed, file does not exist as specified.
42387    # Try adding .exe or .cmd
42388    if test -f "${new_path}.exe"; then
42389      input_to_shortpath="${new_path}.exe"
42390    elif test -f "${new_path}.cmd"; then
42391      input_to_shortpath="${new_path}.cmd"
42392    else
42393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42394$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42395      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42396$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42397      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42398    fi
42399  else
42400    input_to_shortpath="$new_path"
42401  fi
42402
42403  # Call helper function which possibly converts this using DOS-style short mode.
42404  # If so, the updated path is stored in $new_path.
42405  new_path="$input_to_shortpath"
42406
42407  input_path="$input_to_shortpath"
42408  # Check if we need to convert this using DOS-style short mode. If the path
42409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42410  # take no chances and rewrite it.
42411  # Note: m4 eats our [], so we need to use [ and ] instead.
42412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42413  if test "x$has_forbidden_chars" != x; then
42414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42418      # Going to short mode and back again did indeed matter. Since short mode is
42419      # case insensitive, let's make it lowercase to improve readability.
42420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42421      # Now convert it back to Unix-style (cygpath)
42422      input_path=`$CYGPATH -u "$shortmode_path"`
42423      new_path="$input_path"
42424    fi
42425  fi
42426
42427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42428  if test "x$test_cygdrive_prefix" = x; then
42429    # As a simple fix, exclude /usr/bin since it's not a real path.
42430    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42432      # a path prefixed by /cygdrive for fixpath to work.
42433      new_path="$CYGWIN_ROOT_PATH$input_path"
42434    fi
42435  fi
42436
42437  # remove trailing .exe if any
42438  new_path="${new_path/%.exe/}"
42439
42440    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42441
42442  # First separate the path from the arguments. This will split at the first
42443  # space.
42444  complete="$OBJCOPY"
42445  path="${complete%% *}"
42446  tmp="$complete EOL"
42447  arguments="${tmp#* }"
42448
42449  # Input might be given as Windows format, start by converting to
42450  # unix format.
42451  new_path="$path"
42452
42453  windows_path="$new_path"
42454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42455    unix_path=`$CYGPATH -u "$windows_path"`
42456    new_path="$unix_path"
42457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42459    new_path="$unix_path"
42460  fi
42461
42462
42463  # Now try to locate executable using which
42464  new_path=`$WHICH "$new_path" 2> /dev/null`
42465
42466  if test "x$new_path" = x; then
42467    # Oops. Which didn't find the executable.
42468    # The splitting of arguments from the executable at a space might have been incorrect,
42469    # since paths with space are more likely in Windows. Give it another try with the whole
42470    # argument.
42471    path="$complete"
42472    arguments="EOL"
42473    new_path="$path"
42474
42475  windows_path="$new_path"
42476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42477    unix_path=`$CYGPATH -u "$windows_path"`
42478    new_path="$unix_path"
42479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42481    new_path="$unix_path"
42482  fi
42483
42484
42485    new_path=`$WHICH "$new_path" 2> /dev/null`
42486    # bat and cmd files are not always considered executable in MSYS causing which
42487    # to not find them
42488    if test "x$new_path" = x \
42489        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42490        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42491      new_path="$path"
42492
42493  windows_path="$new_path"
42494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42495    unix_path=`$CYGPATH -u "$windows_path"`
42496    new_path="$unix_path"
42497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42499    new_path="$unix_path"
42500  fi
42501
42502    fi
42503
42504    if test "x$new_path" = x; then
42505      # It's still not found. Now this is an unrecoverable error.
42506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42507$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42508      has_space=`$ECHO "$complete" | $GREP " "`
42509      if test "x$has_space" != x; then
42510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42512      fi
42513      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42514    fi
42515  fi
42516
42517  # Now new_path has a complete unix path to the binary
42518  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42519    # Keep paths in /bin as-is, but remove trailing .exe if any
42520    new_path="${new_path/%.exe/}"
42521    # Do not save /bin paths to all_fixpath_prefixes!
42522  else
42523    # Not in mixed or Windows style, start by that.
42524    new_path=`cmd //c echo $new_path`
42525
42526  input_path="$new_path"
42527  # Check if we need to convert this using DOS-style short mode. If the path
42528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42529  # take no chances and rewrite it.
42530  # Note: m4 eats our [], so we need to use [ and ] instead.
42531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42532  if test "x$has_forbidden_chars" != x; then
42533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42535  fi
42536
42537    # Output is in $new_path
42538
42539  windows_path="$new_path"
42540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42541    unix_path=`$CYGPATH -u "$windows_path"`
42542    new_path="$unix_path"
42543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42545    new_path="$unix_path"
42546  fi
42547
42548    # remove trailing .exe if any
42549    new_path="${new_path/%.exe/}"
42550
42551    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42552    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42553  fi
42554
42555    else
42556      # We're on a unix platform. Hooray! :)
42557      # First separate the path from the arguments. This will split at the first
42558      # space.
42559      complete="$OBJCOPY"
42560      path="${complete%% *}"
42561      tmp="$complete EOL"
42562      arguments="${tmp#* }"
42563
42564      # Cannot rely on the command "which" here since it doesn't always work.
42565      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42566      if test -z "$is_absolute_path"; then
42567        # Path to executable is not absolute. Find it.
42568        IFS_save="$IFS"
42569        IFS=:
42570        for p in $PATH; do
42571          if test -f "$p/$path" && test -x "$p/$path"; then
42572            new_path="$p/$path"
42573            break
42574          fi
42575        done
42576        IFS="$IFS_save"
42577      else
42578        # This is an absolute path, we can use it without further modifications.
42579        new_path="$path"
42580      fi
42581
42582      if test "x$new_path" = x; then
42583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42584$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42585        has_space=`$ECHO "$complete" | $GREP " "`
42586        if test "x$has_space" != x; then
42587          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42588$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42589        fi
42590        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42591      fi
42592    fi
42593
42594    # Now join together the path and the arguments once again
42595    if test "x$arguments" != xEOL; then
42596      new_complete="$new_path ${arguments% *}"
42597    else
42598      new_complete="$new_path"
42599    fi
42600
42601    if test "x$complete" != "x$new_complete"; then
42602      OBJCOPY="$new_complete"
42603      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42604$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42605    fi
42606  fi
42607
42608      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42609        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42610        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42611        # - version number is last blank separate word on first line
42612        # - version number formats that have been seen:
42613        #   - <major>.<minor>
42614        #   - <major>.<minor>.<micro>
42615        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42616        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42617         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42618              -e 's/.* //' \
42619              -e '/^[01]\./b bad' \
42620              -e '/^2\./{' \
42621              -e '  s/^2\.//' \
42622              -e '  /^[0-9]$/b bad' \
42623              -e '  /^[0-9]\./b bad' \
42624              -e '  /^1[0-9]$/b bad' \
42625              -e '  /^1[0-9]\./b bad' \
42626              -e '  /^20\./b bad' \
42627              -e '  /^21\.0$/b bad' \
42628              -e '  /^21\.0\./b bad' \
42629              -e '}' \
42630              -e ':good' \
42631              -e 's/.*/VALID_VERSION/p' \
42632              -e 'q' \
42633              -e ':bad' \
42634              -e 's/.*/BAD_VERSION/p' \
42635              -e 'q'`
42636        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42637          OBJCOPY=
42638          { $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
42639$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42640          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42641$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42642          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42643$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42644          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42645$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42646          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42647$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42648        fi
42649      fi
42650    fi
42651  fi
42652
42653
42654
42655  # Publish this variable in the help.
42656
42657
42658  if [ -z "${OBJDUMP+x}" ]; then
42659    # The variable is not set by user, try to locate tool using the code snippet
42660    if test -n "$ac_tool_prefix"; then
42661  for ac_prog in gobjdump objdump
42662  do
42663    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42664set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42666$as_echo_n "checking for $ac_word... " >&6; }
42667if ${ac_cv_prog_OBJDUMP+:} false; then :
42668  $as_echo_n "(cached) " >&6
42669else
42670  if test -n "$OBJDUMP"; then
42671  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42672else
42673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42674for as_dir in $PATH
42675do
42676  IFS=$as_save_IFS
42677  test -z "$as_dir" && as_dir=.
42678    for ac_exec_ext in '' $ac_executable_extensions; do
42679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42680    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42682    break 2
42683  fi
42684done
42685  done
42686IFS=$as_save_IFS
42687
42688fi
42689fi
42690OBJDUMP=$ac_cv_prog_OBJDUMP
42691if test -n "$OBJDUMP"; then
42692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42693$as_echo "$OBJDUMP" >&6; }
42694else
42695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42696$as_echo "no" >&6; }
42697fi
42698
42699
42700    test -n "$OBJDUMP" && break
42701  done
42702fi
42703if test -z "$OBJDUMP"; then
42704  ac_ct_OBJDUMP=$OBJDUMP
42705  for ac_prog in gobjdump objdump
42706do
42707  # Extract the first word of "$ac_prog", so it can be a program name with args.
42708set dummy $ac_prog; ac_word=$2
42709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42710$as_echo_n "checking for $ac_word... " >&6; }
42711if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42712  $as_echo_n "(cached) " >&6
42713else
42714  if test -n "$ac_ct_OBJDUMP"; then
42715  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42716else
42717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42718for as_dir in $PATH
42719do
42720  IFS=$as_save_IFS
42721  test -z "$as_dir" && as_dir=.
42722    for ac_exec_ext in '' $ac_executable_extensions; do
42723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42724    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42726    break 2
42727  fi
42728done
42729  done
42730IFS=$as_save_IFS
42731
42732fi
42733fi
42734ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42735if test -n "$ac_ct_OBJDUMP"; then
42736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42737$as_echo "$ac_ct_OBJDUMP" >&6; }
42738else
42739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42740$as_echo "no" >&6; }
42741fi
42742
42743
42744  test -n "$ac_ct_OBJDUMP" && break
42745done
42746
42747  if test "x$ac_ct_OBJDUMP" = x; then
42748    OBJDUMP=""
42749  else
42750    case $cross_compiling:$ac_tool_warned in
42751yes:)
42752{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42753$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42754ac_tool_warned=yes ;;
42755esac
42756    OBJDUMP=$ac_ct_OBJDUMP
42757  fi
42758fi
42759
42760  else
42761    # The variable is set, but is it from the command line or the environment?
42762
42763    # Try to remove the string !OBJDUMP! from our list.
42764    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42765    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42766      # If it failed, the variable was not from the command line. Ignore it,
42767      # but warn the user (except for BASH, which is always set by the calling BASH).
42768      if test "xOBJDUMP" != xBASH; then
42769        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42770$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42771      fi
42772      # Try to locate tool using the code snippet
42773      if test -n "$ac_tool_prefix"; then
42774  for ac_prog in gobjdump objdump
42775  do
42776    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42777set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42779$as_echo_n "checking for $ac_word... " >&6; }
42780if ${ac_cv_prog_OBJDUMP+:} false; then :
42781  $as_echo_n "(cached) " >&6
42782else
42783  if test -n "$OBJDUMP"; then
42784  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42785else
42786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42787for as_dir in $PATH
42788do
42789  IFS=$as_save_IFS
42790  test -z "$as_dir" && as_dir=.
42791    for ac_exec_ext in '' $ac_executable_extensions; do
42792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42793    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42795    break 2
42796  fi
42797done
42798  done
42799IFS=$as_save_IFS
42800
42801fi
42802fi
42803OBJDUMP=$ac_cv_prog_OBJDUMP
42804if test -n "$OBJDUMP"; then
42805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42806$as_echo "$OBJDUMP" >&6; }
42807else
42808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42809$as_echo "no" >&6; }
42810fi
42811
42812
42813    test -n "$OBJDUMP" && break
42814  done
42815fi
42816if test -z "$OBJDUMP"; then
42817  ac_ct_OBJDUMP=$OBJDUMP
42818  for ac_prog in gobjdump objdump
42819do
42820  # Extract the first word of "$ac_prog", so it can be a program name with args.
42821set dummy $ac_prog; ac_word=$2
42822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42823$as_echo_n "checking for $ac_word... " >&6; }
42824if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42825  $as_echo_n "(cached) " >&6
42826else
42827  if test -n "$ac_ct_OBJDUMP"; then
42828  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42829else
42830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42831for as_dir in $PATH
42832do
42833  IFS=$as_save_IFS
42834  test -z "$as_dir" && as_dir=.
42835    for ac_exec_ext in '' $ac_executable_extensions; do
42836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42837    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42839    break 2
42840  fi
42841done
42842  done
42843IFS=$as_save_IFS
42844
42845fi
42846fi
42847ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42848if test -n "$ac_ct_OBJDUMP"; then
42849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42850$as_echo "$ac_ct_OBJDUMP" >&6; }
42851else
42852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42853$as_echo "no" >&6; }
42854fi
42855
42856
42857  test -n "$ac_ct_OBJDUMP" && break
42858done
42859
42860  if test "x$ac_ct_OBJDUMP" = x; then
42861    OBJDUMP=""
42862  else
42863    case $cross_compiling:$ac_tool_warned in
42864yes:)
42865{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42866$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42867ac_tool_warned=yes ;;
42868esac
42869    OBJDUMP=$ac_ct_OBJDUMP
42870  fi
42871fi
42872
42873    else
42874      # If it succeeded, then it was overridden by the user. We will use it
42875      # for the tool.
42876
42877      # First remove it from the list of overridden variables, so we can test
42878      # for unknown variables in the end.
42879      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42880
42881      # Check if we try to supply an empty value
42882      if test "x$OBJDUMP" = x; then
42883        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42884$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42885        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42886$as_echo_n "checking for OBJDUMP... " >&6; }
42887        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42888$as_echo "disabled" >&6; }
42889      else
42890        # Check if the provided tool contains a complete path.
42891        tool_specified="$OBJDUMP"
42892        tool_basename="${tool_specified##*/}"
42893        if test "x$tool_basename" = "x$tool_specified"; then
42894          # A command without a complete path is provided, search $PATH.
42895          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42896$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42897          # Extract the first word of "$tool_basename", so it can be a program name with args.
42898set dummy $tool_basename; ac_word=$2
42899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42900$as_echo_n "checking for $ac_word... " >&6; }
42901if ${ac_cv_path_OBJDUMP+:} false; then :
42902  $as_echo_n "(cached) " >&6
42903else
42904  case $OBJDUMP in
42905  [\\/]* | ?:[\\/]*)
42906  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42907  ;;
42908  *)
42909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42910for as_dir in $PATH
42911do
42912  IFS=$as_save_IFS
42913  test -z "$as_dir" && as_dir=.
42914    for ac_exec_ext in '' $ac_executable_extensions; do
42915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42916    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42918    break 2
42919  fi
42920done
42921  done
42922IFS=$as_save_IFS
42923
42924  ;;
42925esac
42926fi
42927OBJDUMP=$ac_cv_path_OBJDUMP
42928if test -n "$OBJDUMP"; then
42929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42930$as_echo "$OBJDUMP" >&6; }
42931else
42932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42933$as_echo "no" >&6; }
42934fi
42935
42936
42937          if test "x$OBJDUMP" = x; then
42938            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42939          fi
42940        else
42941          # Otherwise we believe it is a complete path. Use it as it is.
42942          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42943$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42944          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42945$as_echo_n "checking for OBJDUMP... " >&6; }
42946          if test ! -x "$tool_specified"; then
42947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42948$as_echo "not found" >&6; }
42949            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42950          fi
42951          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42952$as_echo "$tool_specified" >&6; }
42953        fi
42954      fi
42955    fi
42956
42957  fi
42958
42959
42960  if test "x$OBJDUMP" != x; then
42961    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42962    # bails if argument is missing.
42963
42964  # Only process if variable expands to non-empty
42965
42966  if test "x$OBJDUMP" != x; then
42967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42968
42969  # First separate the path from the arguments. This will split at the first
42970  # space.
42971  complete="$OBJDUMP"
42972  path="${complete%% *}"
42973  tmp="$complete EOL"
42974  arguments="${tmp#* }"
42975
42976  # Input might be given as Windows format, start by converting to
42977  # unix format.
42978  new_path=`$CYGPATH -u "$path"`
42979
42980  # Now try to locate executable using which
42981  new_path=`$WHICH "$new_path" 2> /dev/null`
42982  # bat and cmd files are not always considered executable in cygwin causing which
42983  # to not find them
42984  if test "x$new_path" = x \
42985      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42986      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42987    new_path=`$CYGPATH -u "$path"`
42988  fi
42989  if test "x$new_path" = x; then
42990    # Oops. Which didn't find the executable.
42991    # The splitting of arguments from the executable at a space might have been incorrect,
42992    # since paths with space are more likely in Windows. Give it another try with the whole
42993    # argument.
42994    path="$complete"
42995    arguments="EOL"
42996    new_path=`$CYGPATH -u "$path"`
42997    new_path=`$WHICH "$new_path" 2> /dev/null`
42998    # bat and cmd files are not always considered executable in cygwin causing which
42999    # to not find them
43000    if test "x$new_path" = x \
43001        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43002        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43003      new_path=`$CYGPATH -u "$path"`
43004    fi
43005    if test "x$new_path" = x; then
43006      # It's still not found. Now this is an unrecoverable error.
43007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43008$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43009      has_space=`$ECHO "$complete" | $GREP " "`
43010      if test "x$has_space" != x; then
43011        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43012$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43013      fi
43014      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43015    fi
43016  fi
43017
43018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43021  # "foo.exe" is OK but "foo" is an error.
43022  #
43023  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43024  # It is also a way to make sure we got the proper file name for the real test later on.
43025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43026  if test "x$test_shortpath" = x; then
43027    # Short path failed, file does not exist as specified.
43028    # Try adding .exe or .cmd
43029    if test -f "${new_path}.exe"; then
43030      input_to_shortpath="${new_path}.exe"
43031    elif test -f "${new_path}.cmd"; then
43032      input_to_shortpath="${new_path}.cmd"
43033    else
43034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43035$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43036      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43037$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43038      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43039    fi
43040  else
43041    input_to_shortpath="$new_path"
43042  fi
43043
43044  # Call helper function which possibly converts this using DOS-style short mode.
43045  # If so, the updated path is stored in $new_path.
43046  new_path="$input_to_shortpath"
43047
43048  input_path="$input_to_shortpath"
43049  # Check if we need to convert this using DOS-style short mode. If the path
43050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43051  # take no chances and rewrite it.
43052  # Note: m4 eats our [], so we need to use [ and ] instead.
43053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43054  if test "x$has_forbidden_chars" != x; then
43055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43059      # Going to short mode and back again did indeed matter. Since short mode is
43060      # case insensitive, let's make it lowercase to improve readability.
43061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43062      # Now convert it back to Unix-style (cygpath)
43063      input_path=`$CYGPATH -u "$shortmode_path"`
43064      new_path="$input_path"
43065    fi
43066  fi
43067
43068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43069  if test "x$test_cygdrive_prefix" = x; then
43070    # As a simple fix, exclude /usr/bin since it's not a real path.
43071    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43073      # a path prefixed by /cygdrive for fixpath to work.
43074      new_path="$CYGWIN_ROOT_PATH$input_path"
43075    fi
43076  fi
43077
43078  # remove trailing .exe if any
43079  new_path="${new_path/%.exe/}"
43080
43081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43082
43083  # First separate the path from the arguments. This will split at the first
43084  # space.
43085  complete="$OBJDUMP"
43086  path="${complete%% *}"
43087  tmp="$complete EOL"
43088  arguments="${tmp#* }"
43089
43090  # Input might be given as Windows format, start by converting to
43091  # unix format.
43092  new_path="$path"
43093
43094  windows_path="$new_path"
43095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43096    unix_path=`$CYGPATH -u "$windows_path"`
43097    new_path="$unix_path"
43098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43100    new_path="$unix_path"
43101  fi
43102
43103
43104  # Now try to locate executable using which
43105  new_path=`$WHICH "$new_path" 2> /dev/null`
43106
43107  if test "x$new_path" = x; then
43108    # Oops. Which didn't find the executable.
43109    # The splitting of arguments from the executable at a space might have been incorrect,
43110    # since paths with space are more likely in Windows. Give it another try with the whole
43111    # argument.
43112    path="$complete"
43113    arguments="EOL"
43114    new_path="$path"
43115
43116  windows_path="$new_path"
43117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43118    unix_path=`$CYGPATH -u "$windows_path"`
43119    new_path="$unix_path"
43120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43122    new_path="$unix_path"
43123  fi
43124
43125
43126    new_path=`$WHICH "$new_path" 2> /dev/null`
43127    # bat and cmd files are not always considered executable in MSYS causing which
43128    # to not find them
43129    if test "x$new_path" = x \
43130        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43131        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43132      new_path="$path"
43133
43134  windows_path="$new_path"
43135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43136    unix_path=`$CYGPATH -u "$windows_path"`
43137    new_path="$unix_path"
43138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43140    new_path="$unix_path"
43141  fi
43142
43143    fi
43144
43145    if test "x$new_path" = x; then
43146      # It's still not found. Now this is an unrecoverable error.
43147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43148$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43149      has_space=`$ECHO "$complete" | $GREP " "`
43150      if test "x$has_space" != x; then
43151        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43152$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43153      fi
43154      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43155    fi
43156  fi
43157
43158  # Now new_path has a complete unix path to the binary
43159  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43160    # Keep paths in /bin as-is, but remove trailing .exe if any
43161    new_path="${new_path/%.exe/}"
43162    # Do not save /bin paths to all_fixpath_prefixes!
43163  else
43164    # Not in mixed or Windows style, start by that.
43165    new_path=`cmd //c echo $new_path`
43166
43167  input_path="$new_path"
43168  # Check if we need to convert this using DOS-style short mode. If the path
43169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43170  # take no chances and rewrite it.
43171  # Note: m4 eats our [], so we need to use [ and ] instead.
43172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43173  if test "x$has_forbidden_chars" != x; then
43174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43176  fi
43177
43178    # Output is in $new_path
43179
43180  windows_path="$new_path"
43181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43182    unix_path=`$CYGPATH -u "$windows_path"`
43183    new_path="$unix_path"
43184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43186    new_path="$unix_path"
43187  fi
43188
43189    # remove trailing .exe if any
43190    new_path="${new_path/%.exe/}"
43191
43192    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43193    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43194  fi
43195
43196    else
43197      # We're on a unix platform. Hooray! :)
43198      # First separate the path from the arguments. This will split at the first
43199      # space.
43200      complete="$OBJDUMP"
43201      path="${complete%% *}"
43202      tmp="$complete EOL"
43203      arguments="${tmp#* }"
43204
43205      # Cannot rely on the command "which" here since it doesn't always work.
43206      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43207      if test -z "$is_absolute_path"; then
43208        # Path to executable is not absolute. Find it.
43209        IFS_save="$IFS"
43210        IFS=:
43211        for p in $PATH; do
43212          if test -f "$p/$path" && test -x "$p/$path"; then
43213            new_path="$p/$path"
43214            break
43215          fi
43216        done
43217        IFS="$IFS_save"
43218      else
43219        # This is an absolute path, we can use it without further modifications.
43220        new_path="$path"
43221      fi
43222
43223      if test "x$new_path" = x; then
43224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43225$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43226        has_space=`$ECHO "$complete" | $GREP " "`
43227        if test "x$has_space" != x; then
43228          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43229$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43230        fi
43231        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43232      fi
43233    fi
43234
43235    # Now join together the path and the arguments once again
43236    if test "x$arguments" != xEOL; then
43237      new_complete="$new_path ${arguments% *}"
43238    else
43239      new_complete="$new_path"
43240    fi
43241
43242    if test "x$complete" != "x$new_complete"; then
43243      OBJDUMP="$new_complete"
43244      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43245$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43246    fi
43247  fi
43248
43249  fi
43250
43251
43252  # Restore old path.
43253  PATH="$OLD_PATH"
43254
43255  # Restore the flags to the user specified values.
43256  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43257  CFLAGS="$ORG_CFLAGS"
43258  CXXFLAGS="$ORG_CXXFLAGS"
43259
43260
43261# Finally do some processing after the detection phase
43262
43263  if test "x$COMPILE_TYPE" = "xcross"; then
43264    # Now we need to find a C/C++ compiler that can build executables for the
43265    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43266    # used once. Also, we need to do this without adding a tools dir to the
43267    # path, otherwise we might pick up cross-compilers which don't use standard
43268    # naming.
43269
43270    OLDPATH="$PATH"
43271
43272
43273# Check whether --with-build-devkit was given.
43274if test "${with_build_devkit+set}" = set; then :
43275  withval=$with_build_devkit;
43276fi
43277
43278    if test "x$with_build_devkit" = "xyes"; then
43279      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43280    elif test -n "$with_build_devkit"; then
43281      if test ! -d "$with_build_devkit"; then
43282        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43283      else
43284
43285  # Only process if variable expands to non-empty
43286
43287  if test "x$with_build_devkit" != x; then
43288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43289
43290  # Input might be given as Windows format, start by converting to
43291  # unix format.
43292  path="$with_build_devkit"
43293  new_path=`$CYGPATH -u "$path"`
43294
43295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43298  # "foo.exe" is OK but "foo" is an error.
43299  #
43300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43301  # It is also a way to make sure we got the proper file name for the real test later on.
43302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43303  if test "x$test_shortpath" = x; then
43304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43305$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43306    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43307  fi
43308
43309  # Call helper function which possibly converts this using DOS-style short mode.
43310  # If so, the updated path is stored in $new_path.
43311
43312  input_path="$new_path"
43313  # Check if we need to convert this using DOS-style short mode. If the path
43314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43315  # take no chances and rewrite it.
43316  # Note: m4 eats our [], so we need to use [ and ] instead.
43317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43318  if test "x$has_forbidden_chars" != x; then
43319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43323      # Going to short mode and back again did indeed matter. Since short mode is
43324      # case insensitive, let's make it lowercase to improve readability.
43325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43326      # Now convert it back to Unix-style (cygpath)
43327      input_path=`$CYGPATH -u "$shortmode_path"`
43328      new_path="$input_path"
43329    fi
43330  fi
43331
43332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43333  if test "x$test_cygdrive_prefix" = x; then
43334    # As a simple fix, exclude /usr/bin since it's not a real path.
43335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43337      # a path prefixed by /cygdrive for fixpath to work.
43338      new_path="$CYGWIN_ROOT_PATH$input_path"
43339    fi
43340  fi
43341
43342
43343  if test "x$path" != "x$new_path"; then
43344    with_build_devkit="$new_path"
43345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43346$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43347  fi
43348
43349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43350
43351  path="$with_build_devkit"
43352  has_colon=`$ECHO $path | $GREP ^.:`
43353  new_path="$path"
43354  if test "x$has_colon" = x; then
43355    # Not in mixed or Windows style, start by that.
43356    new_path=`cmd //c echo $path`
43357  fi
43358
43359
43360  input_path="$new_path"
43361  # Check if we need to convert this using DOS-style short mode. If the path
43362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43363  # take no chances and rewrite it.
43364  # Note: m4 eats our [], so we need to use [ and ] instead.
43365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43366  if test "x$has_forbidden_chars" != x; then
43367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43369  fi
43370
43371
43372  windows_path="$new_path"
43373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43374    unix_path=`$CYGPATH -u "$windows_path"`
43375    new_path="$unix_path"
43376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43378    new_path="$unix_path"
43379  fi
43380
43381  if test "x$path" != "x$new_path"; then
43382    with_build_devkit="$new_path"
43383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43384$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43385  fi
43386
43387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43389
43390    else
43391      # We're on a unix platform. Hooray! :)
43392      path="$with_build_devkit"
43393      has_space=`$ECHO "$path" | $GREP " "`
43394      if test "x$has_space" != x; then
43395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43396$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43397        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43398      fi
43399
43400      # Use eval to expand a potential ~
43401      eval path="$path"
43402      if test ! -f "$path" && test ! -d "$path"; then
43403        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43404      fi
43405
43406      if test -d "$path"; then
43407        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43408      else
43409        dir="`$DIRNAME "$path"`"
43410        base="`$BASENAME "$path"`"
43411        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43412      fi
43413    fi
43414  fi
43415
43416        BUILD_DEVKIT_ROOT="$with_build_devkit"
43417        # Check for a meta data info file in the root of the devkit
43418        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43419          # Process devkit.info so that existing devkit variables are not
43420          # modified by this
43421          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43422              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43423              -e "s/\$host/\$build/g" \
43424              $BUILD_DEVKIT_ROOT/devkit.info \
43425              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43426          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43427          # This potentially sets the following:
43428          # A descriptive name of the devkit
43429
43430  if test "x$BUILD_DEVKIT_NAME" = x; then
43431    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43432  fi
43433
43434          # Corresponds to --with-extra-path
43435
43436  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43437    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43438  fi
43439
43440          # Corresponds to --with-toolchain-path
43441
43442  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43443    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43444  fi
43445
43446          # Corresponds to --with-sysroot
43447
43448  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43449    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43450  fi
43451
43452          # Skip the Window specific parts
43453        fi
43454
43455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43456$as_echo_n "checking for build platform devkit... " >&6; }
43457        if test "x$BUILD_DEVKIT_NAME" != x; then
43458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43459$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43460        else
43461          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43462$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43463        fi
43464
43465        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43466
43467  if test "x$BUILD_SYSROOT" != "x"; then
43468    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43469      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43470        # Solaris Studio does not have a concept of sysroot. Instead we must
43471        # make sure the default include and lib dirs are appended to each
43472        # compile and link command line. Must also add -I-xbuiltin to enable
43473        # inlining of system functions and intrinsics.
43474        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43475        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43476            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43477            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43478      fi
43479    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43480      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43481      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43482    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43483      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43484      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43485    fi
43486    # Propagate the sysroot args to hotspot
43487    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43488    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43489    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43490    # The global CFLAGS and LDFLAGS variables need these for configure to function
43491    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43492    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43493    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43494    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43495  fi
43496
43497  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43498    # We also need -iframework<path>/System/Library/Frameworks
43499    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43500    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43501    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43502    # set this here so it doesn't have to be peppered throughout the forest
43503    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43504    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43505  fi
43506
43507
43508
43509
43510
43511         # Fallback default of just /bin if DEVKIT_PATH is not defined
43512        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43513          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43514        fi
43515        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43516      fi
43517    fi
43518
43519    # FIXME: we should list the discovered compilers as an exclude pattern!
43520    # If we do that, we can do this detection before POST_DETECTION, and still
43521    # find the build compilers in the tools dir, if needed.
43522
43523
43524
43525  # Publish this variable in the help.
43526
43527
43528  if [ -z "${BUILD_CC+x}" ]; then
43529    # The variable is not set by user, try to locate tool using the code snippet
43530    for ac_prog in cl cc gcc
43531do
43532  # Extract the first word of "$ac_prog", so it can be a program name with args.
43533set dummy $ac_prog; ac_word=$2
43534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43535$as_echo_n "checking for $ac_word... " >&6; }
43536if ${ac_cv_path_BUILD_CC+:} false; then :
43537  $as_echo_n "(cached) " >&6
43538else
43539  case $BUILD_CC in
43540  [\\/]* | ?:[\\/]*)
43541  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43542  ;;
43543  *)
43544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43545for as_dir in $PATH
43546do
43547  IFS=$as_save_IFS
43548  test -z "$as_dir" && as_dir=.
43549    for ac_exec_ext in '' $ac_executable_extensions; do
43550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43551    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43553    break 2
43554  fi
43555done
43556  done
43557IFS=$as_save_IFS
43558
43559  ;;
43560esac
43561fi
43562BUILD_CC=$ac_cv_path_BUILD_CC
43563if test -n "$BUILD_CC"; then
43564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43565$as_echo "$BUILD_CC" >&6; }
43566else
43567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43568$as_echo "no" >&6; }
43569fi
43570
43571
43572  test -n "$BUILD_CC" && break
43573done
43574
43575  else
43576    # The variable is set, but is it from the command line or the environment?
43577
43578    # Try to remove the string !BUILD_CC! from our list.
43579    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43580    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43581      # If it failed, the variable was not from the command line. Ignore it,
43582      # but warn the user (except for BASH, which is always set by the calling BASH).
43583      if test "xBUILD_CC" != xBASH; then
43584        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43585$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43586      fi
43587      # Try to locate tool using the code snippet
43588      for ac_prog in cl cc gcc
43589do
43590  # Extract the first word of "$ac_prog", so it can be a program name with args.
43591set dummy $ac_prog; ac_word=$2
43592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43593$as_echo_n "checking for $ac_word... " >&6; }
43594if ${ac_cv_path_BUILD_CC+:} false; then :
43595  $as_echo_n "(cached) " >&6
43596else
43597  case $BUILD_CC in
43598  [\\/]* | ?:[\\/]*)
43599  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43600  ;;
43601  *)
43602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43603for as_dir in $PATH
43604do
43605  IFS=$as_save_IFS
43606  test -z "$as_dir" && as_dir=.
43607    for ac_exec_ext in '' $ac_executable_extensions; do
43608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43609    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43611    break 2
43612  fi
43613done
43614  done
43615IFS=$as_save_IFS
43616
43617  ;;
43618esac
43619fi
43620BUILD_CC=$ac_cv_path_BUILD_CC
43621if test -n "$BUILD_CC"; then
43622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43623$as_echo "$BUILD_CC" >&6; }
43624else
43625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43626$as_echo "no" >&6; }
43627fi
43628
43629
43630  test -n "$BUILD_CC" && break
43631done
43632
43633    else
43634      # If it succeeded, then it was overridden by the user. We will use it
43635      # for the tool.
43636
43637      # First remove it from the list of overridden variables, so we can test
43638      # for unknown variables in the end.
43639      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43640
43641      # Check if we try to supply an empty value
43642      if test "x$BUILD_CC" = x; then
43643        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43644$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43645        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43646$as_echo_n "checking for BUILD_CC... " >&6; }
43647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43648$as_echo "disabled" >&6; }
43649      else
43650        # Check if the provided tool contains a complete path.
43651        tool_specified="$BUILD_CC"
43652        tool_basename="${tool_specified##*/}"
43653        if test "x$tool_basename" = "x$tool_specified"; then
43654          # A command without a complete path is provided, search $PATH.
43655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43656$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43657          # Extract the first word of "$tool_basename", so it can be a program name with args.
43658set dummy $tool_basename; ac_word=$2
43659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43660$as_echo_n "checking for $ac_word... " >&6; }
43661if ${ac_cv_path_BUILD_CC+:} false; then :
43662  $as_echo_n "(cached) " >&6
43663else
43664  case $BUILD_CC in
43665  [\\/]* | ?:[\\/]*)
43666  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43667  ;;
43668  *)
43669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43670for as_dir in $PATH
43671do
43672  IFS=$as_save_IFS
43673  test -z "$as_dir" && as_dir=.
43674    for ac_exec_ext in '' $ac_executable_extensions; do
43675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43676    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43678    break 2
43679  fi
43680done
43681  done
43682IFS=$as_save_IFS
43683
43684  ;;
43685esac
43686fi
43687BUILD_CC=$ac_cv_path_BUILD_CC
43688if test -n "$BUILD_CC"; then
43689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43690$as_echo "$BUILD_CC" >&6; }
43691else
43692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43693$as_echo "no" >&6; }
43694fi
43695
43696
43697          if test "x$BUILD_CC" = x; then
43698            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43699          fi
43700        else
43701          # Otherwise we believe it is a complete path. Use it as it is.
43702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43703$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43704          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43705$as_echo_n "checking for BUILD_CC... " >&6; }
43706          if test ! -x "$tool_specified"; then
43707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43708$as_echo "not found" >&6; }
43709            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43710          fi
43711          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43712$as_echo "$tool_specified" >&6; }
43713        fi
43714      fi
43715    fi
43716
43717  fi
43718
43719
43720
43721  if test "x$BUILD_CC" = x; then
43722    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43723  fi
43724
43725
43726
43727  # Only process if variable expands to non-empty
43728
43729  if test "x$BUILD_CC" != x; then
43730    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43731
43732  # First separate the path from the arguments. This will split at the first
43733  # space.
43734  complete="$BUILD_CC"
43735  path="${complete%% *}"
43736  tmp="$complete EOL"
43737  arguments="${tmp#* }"
43738
43739  # Input might be given as Windows format, start by converting to
43740  # unix format.
43741  new_path=`$CYGPATH -u "$path"`
43742
43743  # Now try to locate executable using which
43744  new_path=`$WHICH "$new_path" 2> /dev/null`
43745  # bat and cmd files are not always considered executable in cygwin causing which
43746  # to not find them
43747  if test "x$new_path" = x \
43748      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43749      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43750    new_path=`$CYGPATH -u "$path"`
43751  fi
43752  if test "x$new_path" = x; then
43753    # Oops. Which didn't find the executable.
43754    # The splitting of arguments from the executable at a space might have been incorrect,
43755    # since paths with space are more likely in Windows. Give it another try with the whole
43756    # argument.
43757    path="$complete"
43758    arguments="EOL"
43759    new_path=`$CYGPATH -u "$path"`
43760    new_path=`$WHICH "$new_path" 2> /dev/null`
43761    # bat and cmd files are not always considered executable in cygwin causing which
43762    # to not find them
43763    if test "x$new_path" = x \
43764        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43765        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43766      new_path=`$CYGPATH -u "$path"`
43767    fi
43768    if test "x$new_path" = x; then
43769      # It's still not found. Now this is an unrecoverable error.
43770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43771$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43772      has_space=`$ECHO "$complete" | $GREP " "`
43773      if test "x$has_space" != x; then
43774        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43775$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43776      fi
43777      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43778    fi
43779  fi
43780
43781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43784  # "foo.exe" is OK but "foo" is an error.
43785  #
43786  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43787  # It is also a way to make sure we got the proper file name for the real test later on.
43788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43789  if test "x$test_shortpath" = x; then
43790    # Short path failed, file does not exist as specified.
43791    # Try adding .exe or .cmd
43792    if test -f "${new_path}.exe"; then
43793      input_to_shortpath="${new_path}.exe"
43794    elif test -f "${new_path}.cmd"; then
43795      input_to_shortpath="${new_path}.cmd"
43796    else
43797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43798$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43799      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43800$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43801      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43802    fi
43803  else
43804    input_to_shortpath="$new_path"
43805  fi
43806
43807  # Call helper function which possibly converts this using DOS-style short mode.
43808  # If so, the updated path is stored in $new_path.
43809  new_path="$input_to_shortpath"
43810
43811  input_path="$input_to_shortpath"
43812  # Check if we need to convert this using DOS-style short mode. If the path
43813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43814  # take no chances and rewrite it.
43815  # Note: m4 eats our [], so we need to use [ and ] instead.
43816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43817  if test "x$has_forbidden_chars" != x; then
43818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43819    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43820    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43821    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43822      # Going to short mode and back again did indeed matter. Since short mode is
43823      # case insensitive, let's make it lowercase to improve readability.
43824      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43825      # Now convert it back to Unix-style (cygpath)
43826      input_path=`$CYGPATH -u "$shortmode_path"`
43827      new_path="$input_path"
43828    fi
43829  fi
43830
43831  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43832  if test "x$test_cygdrive_prefix" = x; then
43833    # As a simple fix, exclude /usr/bin since it's not a real path.
43834    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43835      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43836      # a path prefixed by /cygdrive for fixpath to work.
43837      new_path="$CYGWIN_ROOT_PATH$input_path"
43838    fi
43839  fi
43840
43841  # remove trailing .exe if any
43842  new_path="${new_path/%.exe/}"
43843
43844    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43845
43846  # First separate the path from the arguments. This will split at the first
43847  # space.
43848  complete="$BUILD_CC"
43849  path="${complete%% *}"
43850  tmp="$complete EOL"
43851  arguments="${tmp#* }"
43852
43853  # Input might be given as Windows format, start by converting to
43854  # unix format.
43855  new_path="$path"
43856
43857  windows_path="$new_path"
43858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43859    unix_path=`$CYGPATH -u "$windows_path"`
43860    new_path="$unix_path"
43861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43863    new_path="$unix_path"
43864  fi
43865
43866
43867  # Now try to locate executable using which
43868  new_path=`$WHICH "$new_path" 2> /dev/null`
43869
43870  if test "x$new_path" = x; then
43871    # Oops. Which didn't find the executable.
43872    # The splitting of arguments from the executable at a space might have been incorrect,
43873    # since paths with space are more likely in Windows. Give it another try with the whole
43874    # argument.
43875    path="$complete"
43876    arguments="EOL"
43877    new_path="$path"
43878
43879  windows_path="$new_path"
43880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43881    unix_path=`$CYGPATH -u "$windows_path"`
43882    new_path="$unix_path"
43883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43885    new_path="$unix_path"
43886  fi
43887
43888
43889    new_path=`$WHICH "$new_path" 2> /dev/null`
43890    # bat and cmd files are not always considered executable in MSYS causing which
43891    # to not find them
43892    if test "x$new_path" = x \
43893        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43894        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43895      new_path="$path"
43896
43897  windows_path="$new_path"
43898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43899    unix_path=`$CYGPATH -u "$windows_path"`
43900    new_path="$unix_path"
43901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43903    new_path="$unix_path"
43904  fi
43905
43906    fi
43907
43908    if test "x$new_path" = x; then
43909      # It's still not found. Now this is an unrecoverable error.
43910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43911$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43912      has_space=`$ECHO "$complete" | $GREP " "`
43913      if test "x$has_space" != x; then
43914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43916      fi
43917      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43918    fi
43919  fi
43920
43921  # Now new_path has a complete unix path to the binary
43922  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43923    # Keep paths in /bin as-is, but remove trailing .exe if any
43924    new_path="${new_path/%.exe/}"
43925    # Do not save /bin paths to all_fixpath_prefixes!
43926  else
43927    # Not in mixed or Windows style, start by that.
43928    new_path=`cmd //c echo $new_path`
43929
43930  input_path="$new_path"
43931  # Check if we need to convert this using DOS-style short mode. If the path
43932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43933  # take no chances and rewrite it.
43934  # Note: m4 eats our [], so we need to use [ and ] instead.
43935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43936  if test "x$has_forbidden_chars" != x; then
43937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43939  fi
43940
43941    # Output is in $new_path
43942
43943  windows_path="$new_path"
43944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43945    unix_path=`$CYGPATH -u "$windows_path"`
43946    new_path="$unix_path"
43947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43949    new_path="$unix_path"
43950  fi
43951
43952    # remove trailing .exe if any
43953    new_path="${new_path/%.exe/}"
43954
43955    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43956    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43957  fi
43958
43959    else
43960      # We're on a unix platform. Hooray! :)
43961      # First separate the path from the arguments. This will split at the first
43962      # space.
43963      complete="$BUILD_CC"
43964      path="${complete%% *}"
43965      tmp="$complete EOL"
43966      arguments="${tmp#* }"
43967
43968      # Cannot rely on the command "which" here since it doesn't always work.
43969      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43970      if test -z "$is_absolute_path"; then
43971        # Path to executable is not absolute. Find it.
43972        IFS_save="$IFS"
43973        IFS=:
43974        for p in $PATH; do
43975          if test -f "$p/$path" && test -x "$p/$path"; then
43976            new_path="$p/$path"
43977            break
43978          fi
43979        done
43980        IFS="$IFS_save"
43981      else
43982        # This is an absolute path, we can use it without further modifications.
43983        new_path="$path"
43984      fi
43985
43986      if test "x$new_path" = x; then
43987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43988$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43989        has_space=`$ECHO "$complete" | $GREP " "`
43990        if test "x$has_space" != x; then
43991          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43992$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43993        fi
43994        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43995      fi
43996    fi
43997
43998    # Now join together the path and the arguments once again
43999    if test "x$arguments" != xEOL; then
44000      new_complete="$new_path ${arguments% *}"
44001    else
44002      new_complete="$new_path"
44003    fi
44004
44005    if test "x$complete" != "x$new_complete"; then
44006      BUILD_CC="$new_complete"
44007      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44008$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44009    fi
44010  fi
44011
44012
44013
44014
44015  # Publish this variable in the help.
44016
44017
44018  if [ -z "${BUILD_CXX+x}" ]; then
44019    # The variable is not set by user, try to locate tool using the code snippet
44020    for ac_prog in cl CC g++
44021do
44022  # Extract the first word of "$ac_prog", so it can be a program name with args.
44023set dummy $ac_prog; ac_word=$2
44024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44025$as_echo_n "checking for $ac_word... " >&6; }
44026if ${ac_cv_path_BUILD_CXX+:} false; then :
44027  $as_echo_n "(cached) " >&6
44028else
44029  case $BUILD_CXX in
44030  [\\/]* | ?:[\\/]*)
44031  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44032  ;;
44033  *)
44034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44035for as_dir in $PATH
44036do
44037  IFS=$as_save_IFS
44038  test -z "$as_dir" && as_dir=.
44039    for ac_exec_ext in '' $ac_executable_extensions; do
44040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44041    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44043    break 2
44044  fi
44045done
44046  done
44047IFS=$as_save_IFS
44048
44049  ;;
44050esac
44051fi
44052BUILD_CXX=$ac_cv_path_BUILD_CXX
44053if test -n "$BUILD_CXX"; then
44054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44055$as_echo "$BUILD_CXX" >&6; }
44056else
44057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44058$as_echo "no" >&6; }
44059fi
44060
44061
44062  test -n "$BUILD_CXX" && break
44063done
44064
44065  else
44066    # The variable is set, but is it from the command line or the environment?
44067
44068    # Try to remove the string !BUILD_CXX! from our list.
44069    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44070    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44071      # If it failed, the variable was not from the command line. Ignore it,
44072      # but warn the user (except for BASH, which is always set by the calling BASH).
44073      if test "xBUILD_CXX" != xBASH; then
44074        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44075$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44076      fi
44077      # Try to locate tool using the code snippet
44078      for ac_prog in cl CC g++
44079do
44080  # Extract the first word of "$ac_prog", so it can be a program name with args.
44081set dummy $ac_prog; ac_word=$2
44082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44083$as_echo_n "checking for $ac_word... " >&6; }
44084if ${ac_cv_path_BUILD_CXX+:} false; then :
44085  $as_echo_n "(cached) " >&6
44086else
44087  case $BUILD_CXX in
44088  [\\/]* | ?:[\\/]*)
44089  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44090  ;;
44091  *)
44092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44093for as_dir in $PATH
44094do
44095  IFS=$as_save_IFS
44096  test -z "$as_dir" && as_dir=.
44097    for ac_exec_ext in '' $ac_executable_extensions; do
44098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44099    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44101    break 2
44102  fi
44103done
44104  done
44105IFS=$as_save_IFS
44106
44107  ;;
44108esac
44109fi
44110BUILD_CXX=$ac_cv_path_BUILD_CXX
44111if test -n "$BUILD_CXX"; then
44112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44113$as_echo "$BUILD_CXX" >&6; }
44114else
44115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44116$as_echo "no" >&6; }
44117fi
44118
44119
44120  test -n "$BUILD_CXX" && break
44121done
44122
44123    else
44124      # If it succeeded, then it was overridden by the user. We will use it
44125      # for the tool.
44126
44127      # First remove it from the list of overridden variables, so we can test
44128      # for unknown variables in the end.
44129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44130
44131      # Check if we try to supply an empty value
44132      if test "x$BUILD_CXX" = x; then
44133        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44134$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44135        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44136$as_echo_n "checking for BUILD_CXX... " >&6; }
44137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44138$as_echo "disabled" >&6; }
44139      else
44140        # Check if the provided tool contains a complete path.
44141        tool_specified="$BUILD_CXX"
44142        tool_basename="${tool_specified##*/}"
44143        if test "x$tool_basename" = "x$tool_specified"; then
44144          # A command without a complete path is provided, search $PATH.
44145          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44146$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44147          # Extract the first word of "$tool_basename", so it can be a program name with args.
44148set dummy $tool_basename; ac_word=$2
44149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44150$as_echo_n "checking for $ac_word... " >&6; }
44151if ${ac_cv_path_BUILD_CXX+:} false; then :
44152  $as_echo_n "(cached) " >&6
44153else
44154  case $BUILD_CXX in
44155  [\\/]* | ?:[\\/]*)
44156  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44157  ;;
44158  *)
44159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44160for as_dir in $PATH
44161do
44162  IFS=$as_save_IFS
44163  test -z "$as_dir" && as_dir=.
44164    for ac_exec_ext in '' $ac_executable_extensions; do
44165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44166    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44168    break 2
44169  fi
44170done
44171  done
44172IFS=$as_save_IFS
44173
44174  ;;
44175esac
44176fi
44177BUILD_CXX=$ac_cv_path_BUILD_CXX
44178if test -n "$BUILD_CXX"; then
44179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44180$as_echo "$BUILD_CXX" >&6; }
44181else
44182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44183$as_echo "no" >&6; }
44184fi
44185
44186
44187          if test "x$BUILD_CXX" = x; then
44188            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44189          fi
44190        else
44191          # Otherwise we believe it is a complete path. Use it as it is.
44192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44193$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44194          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44195$as_echo_n "checking for BUILD_CXX... " >&6; }
44196          if test ! -x "$tool_specified"; then
44197            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44198$as_echo "not found" >&6; }
44199            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44200          fi
44201          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44202$as_echo "$tool_specified" >&6; }
44203        fi
44204      fi
44205    fi
44206
44207  fi
44208
44209
44210
44211  if test "x$BUILD_CXX" = x; then
44212    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44213  fi
44214
44215
44216
44217  # Only process if variable expands to non-empty
44218
44219  if test "x$BUILD_CXX" != x; then
44220    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44221
44222  # First separate the path from the arguments. This will split at the first
44223  # space.
44224  complete="$BUILD_CXX"
44225  path="${complete%% *}"
44226  tmp="$complete EOL"
44227  arguments="${tmp#* }"
44228
44229  # Input might be given as Windows format, start by converting to
44230  # unix format.
44231  new_path=`$CYGPATH -u "$path"`
44232
44233  # Now try to locate executable using which
44234  new_path=`$WHICH "$new_path" 2> /dev/null`
44235  # bat and cmd files are not always considered executable in cygwin causing which
44236  # to not find them
44237  if test "x$new_path" = x \
44238      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44239      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44240    new_path=`$CYGPATH -u "$path"`
44241  fi
44242  if test "x$new_path" = x; then
44243    # Oops. Which didn't find the executable.
44244    # The splitting of arguments from the executable at a space might have been incorrect,
44245    # since paths with space are more likely in Windows. Give it another try with the whole
44246    # argument.
44247    path="$complete"
44248    arguments="EOL"
44249    new_path=`$CYGPATH -u "$path"`
44250    new_path=`$WHICH "$new_path" 2> /dev/null`
44251    # bat and cmd files are not always considered executable in cygwin causing which
44252    # to not find them
44253    if test "x$new_path" = x \
44254        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44255        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44256      new_path=`$CYGPATH -u "$path"`
44257    fi
44258    if test "x$new_path" = x; then
44259      # It's still not found. Now this is an unrecoverable error.
44260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44261$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44262      has_space=`$ECHO "$complete" | $GREP " "`
44263      if test "x$has_space" != x; then
44264        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44265$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44266      fi
44267      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44268    fi
44269  fi
44270
44271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44274  # "foo.exe" is OK but "foo" is an error.
44275  #
44276  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44277  # It is also a way to make sure we got the proper file name for the real test later on.
44278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44279  if test "x$test_shortpath" = x; then
44280    # Short path failed, file does not exist as specified.
44281    # Try adding .exe or .cmd
44282    if test -f "${new_path}.exe"; then
44283      input_to_shortpath="${new_path}.exe"
44284    elif test -f "${new_path}.cmd"; then
44285      input_to_shortpath="${new_path}.cmd"
44286    else
44287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44288$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44289      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44290$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44291      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44292    fi
44293  else
44294    input_to_shortpath="$new_path"
44295  fi
44296
44297  # Call helper function which possibly converts this using DOS-style short mode.
44298  # If so, the updated path is stored in $new_path.
44299  new_path="$input_to_shortpath"
44300
44301  input_path="$input_to_shortpath"
44302  # Check if we need to convert this using DOS-style short mode. If the path
44303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44304  # take no chances and rewrite it.
44305  # Note: m4 eats our [], so we need to use [ and ] instead.
44306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44307  if test "x$has_forbidden_chars" != x; then
44308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44309    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44310    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44311    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44312      # Going to short mode and back again did indeed matter. Since short mode is
44313      # case insensitive, let's make it lowercase to improve readability.
44314      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44315      # Now convert it back to Unix-style (cygpath)
44316      input_path=`$CYGPATH -u "$shortmode_path"`
44317      new_path="$input_path"
44318    fi
44319  fi
44320
44321  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44322  if test "x$test_cygdrive_prefix" = x; then
44323    # As a simple fix, exclude /usr/bin since it's not a real path.
44324    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44325      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44326      # a path prefixed by /cygdrive for fixpath to work.
44327      new_path="$CYGWIN_ROOT_PATH$input_path"
44328    fi
44329  fi
44330
44331  # remove trailing .exe if any
44332  new_path="${new_path/%.exe/}"
44333
44334    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44335
44336  # First separate the path from the arguments. This will split at the first
44337  # space.
44338  complete="$BUILD_CXX"
44339  path="${complete%% *}"
44340  tmp="$complete EOL"
44341  arguments="${tmp#* }"
44342
44343  # Input might be given as Windows format, start by converting to
44344  # unix format.
44345  new_path="$path"
44346
44347  windows_path="$new_path"
44348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44349    unix_path=`$CYGPATH -u "$windows_path"`
44350    new_path="$unix_path"
44351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44353    new_path="$unix_path"
44354  fi
44355
44356
44357  # Now try to locate executable using which
44358  new_path=`$WHICH "$new_path" 2> /dev/null`
44359
44360  if test "x$new_path" = x; then
44361    # Oops. Which didn't find the executable.
44362    # The splitting of arguments from the executable at a space might have been incorrect,
44363    # since paths with space are more likely in Windows. Give it another try with the whole
44364    # argument.
44365    path="$complete"
44366    arguments="EOL"
44367    new_path="$path"
44368
44369  windows_path="$new_path"
44370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44371    unix_path=`$CYGPATH -u "$windows_path"`
44372    new_path="$unix_path"
44373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44375    new_path="$unix_path"
44376  fi
44377
44378
44379    new_path=`$WHICH "$new_path" 2> /dev/null`
44380    # bat and cmd files are not always considered executable in MSYS causing which
44381    # to not find them
44382    if test "x$new_path" = x \
44383        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44384        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44385      new_path="$path"
44386
44387  windows_path="$new_path"
44388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44389    unix_path=`$CYGPATH -u "$windows_path"`
44390    new_path="$unix_path"
44391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44393    new_path="$unix_path"
44394  fi
44395
44396    fi
44397
44398    if test "x$new_path" = x; then
44399      # It's still not found. Now this is an unrecoverable error.
44400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44401$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44402      has_space=`$ECHO "$complete" | $GREP " "`
44403      if test "x$has_space" != x; then
44404        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44405$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44406      fi
44407      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44408    fi
44409  fi
44410
44411  # Now new_path has a complete unix path to the binary
44412  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44413    # Keep paths in /bin as-is, but remove trailing .exe if any
44414    new_path="${new_path/%.exe/}"
44415    # Do not save /bin paths to all_fixpath_prefixes!
44416  else
44417    # Not in mixed or Windows style, start by that.
44418    new_path=`cmd //c echo $new_path`
44419
44420  input_path="$new_path"
44421  # Check if we need to convert this using DOS-style short mode. If the path
44422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44423  # take no chances and rewrite it.
44424  # Note: m4 eats our [], so we need to use [ and ] instead.
44425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44426  if test "x$has_forbidden_chars" != x; then
44427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44429  fi
44430
44431    # Output is in $new_path
44432
44433  windows_path="$new_path"
44434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44435    unix_path=`$CYGPATH -u "$windows_path"`
44436    new_path="$unix_path"
44437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44439    new_path="$unix_path"
44440  fi
44441
44442    # remove trailing .exe if any
44443    new_path="${new_path/%.exe/}"
44444
44445    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44446    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44447  fi
44448
44449    else
44450      # We're on a unix platform. Hooray! :)
44451      # First separate the path from the arguments. This will split at the first
44452      # space.
44453      complete="$BUILD_CXX"
44454      path="${complete%% *}"
44455      tmp="$complete EOL"
44456      arguments="${tmp#* }"
44457
44458      # Cannot rely on the command "which" here since it doesn't always work.
44459      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44460      if test -z "$is_absolute_path"; then
44461        # Path to executable is not absolute. Find it.
44462        IFS_save="$IFS"
44463        IFS=:
44464        for p in $PATH; do
44465          if test -f "$p/$path" && test -x "$p/$path"; then
44466            new_path="$p/$path"
44467            break
44468          fi
44469        done
44470        IFS="$IFS_save"
44471      else
44472        # This is an absolute path, we can use it without further modifications.
44473        new_path="$path"
44474      fi
44475
44476      if test "x$new_path" = x; then
44477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44478$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44479        has_space=`$ECHO "$complete" | $GREP " "`
44480        if test "x$has_space" != x; then
44481          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44482$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44483        fi
44484        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44485      fi
44486    fi
44487
44488    # Now join together the path and the arguments once again
44489    if test "x$arguments" != xEOL; then
44490      new_complete="$new_path ${arguments% *}"
44491    else
44492      new_complete="$new_path"
44493    fi
44494
44495    if test "x$complete" != "x$new_complete"; then
44496      BUILD_CXX="$new_complete"
44497      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44498$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44499    fi
44500  fi
44501
44502
44503
44504  # Publish this variable in the help.
44505
44506
44507  if [ -z "${BUILD_NM+x}" ]; then
44508    # The variable is not set by user, try to locate tool using the code snippet
44509    for ac_prog in nm gcc-nm
44510do
44511  # Extract the first word of "$ac_prog", so it can be a program name with args.
44512set dummy $ac_prog; ac_word=$2
44513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44514$as_echo_n "checking for $ac_word... " >&6; }
44515if ${ac_cv_path_BUILD_NM+:} false; then :
44516  $as_echo_n "(cached) " >&6
44517else
44518  case $BUILD_NM in
44519  [\\/]* | ?:[\\/]*)
44520  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44521  ;;
44522  *)
44523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44524for as_dir in $PATH
44525do
44526  IFS=$as_save_IFS
44527  test -z "$as_dir" && as_dir=.
44528    for ac_exec_ext in '' $ac_executable_extensions; do
44529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44530    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44532    break 2
44533  fi
44534done
44535  done
44536IFS=$as_save_IFS
44537
44538  ;;
44539esac
44540fi
44541BUILD_NM=$ac_cv_path_BUILD_NM
44542if test -n "$BUILD_NM"; then
44543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44544$as_echo "$BUILD_NM" >&6; }
44545else
44546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44547$as_echo "no" >&6; }
44548fi
44549
44550
44551  test -n "$BUILD_NM" && break
44552done
44553
44554  else
44555    # The variable is set, but is it from the command line or the environment?
44556
44557    # Try to remove the string !BUILD_NM! from our list.
44558    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44559    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44560      # If it failed, the variable was not from the command line. Ignore it,
44561      # but warn the user (except for BASH, which is always set by the calling BASH).
44562      if test "xBUILD_NM" != xBASH; then
44563        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44564$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44565      fi
44566      # Try to locate tool using the code snippet
44567      for ac_prog in nm gcc-nm
44568do
44569  # Extract the first word of "$ac_prog", so it can be a program name with args.
44570set dummy $ac_prog; ac_word=$2
44571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44572$as_echo_n "checking for $ac_word... " >&6; }
44573if ${ac_cv_path_BUILD_NM+:} false; then :
44574  $as_echo_n "(cached) " >&6
44575else
44576  case $BUILD_NM in
44577  [\\/]* | ?:[\\/]*)
44578  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44579  ;;
44580  *)
44581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44582for as_dir in $PATH
44583do
44584  IFS=$as_save_IFS
44585  test -z "$as_dir" && as_dir=.
44586    for ac_exec_ext in '' $ac_executable_extensions; do
44587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44588    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44590    break 2
44591  fi
44592done
44593  done
44594IFS=$as_save_IFS
44595
44596  ;;
44597esac
44598fi
44599BUILD_NM=$ac_cv_path_BUILD_NM
44600if test -n "$BUILD_NM"; then
44601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44602$as_echo "$BUILD_NM" >&6; }
44603else
44604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44605$as_echo "no" >&6; }
44606fi
44607
44608
44609  test -n "$BUILD_NM" && break
44610done
44611
44612    else
44613      # If it succeeded, then it was overridden by the user. We will use it
44614      # for the tool.
44615
44616      # First remove it from the list of overridden variables, so we can test
44617      # for unknown variables in the end.
44618      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44619
44620      # Check if we try to supply an empty value
44621      if test "x$BUILD_NM" = x; then
44622        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44623$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44624        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44625$as_echo_n "checking for BUILD_NM... " >&6; }
44626        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44627$as_echo "disabled" >&6; }
44628      else
44629        # Check if the provided tool contains a complete path.
44630        tool_specified="$BUILD_NM"
44631        tool_basename="${tool_specified##*/}"
44632        if test "x$tool_basename" = "x$tool_specified"; then
44633          # A command without a complete path is provided, search $PATH.
44634          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44635$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44636          # Extract the first word of "$tool_basename", so it can be a program name with args.
44637set dummy $tool_basename; ac_word=$2
44638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44639$as_echo_n "checking for $ac_word... " >&6; }
44640if ${ac_cv_path_BUILD_NM+:} false; then :
44641  $as_echo_n "(cached) " >&6
44642else
44643  case $BUILD_NM in
44644  [\\/]* | ?:[\\/]*)
44645  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44646  ;;
44647  *)
44648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44649for as_dir in $PATH
44650do
44651  IFS=$as_save_IFS
44652  test -z "$as_dir" && as_dir=.
44653    for ac_exec_ext in '' $ac_executable_extensions; do
44654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44655    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44657    break 2
44658  fi
44659done
44660  done
44661IFS=$as_save_IFS
44662
44663  ;;
44664esac
44665fi
44666BUILD_NM=$ac_cv_path_BUILD_NM
44667if test -n "$BUILD_NM"; then
44668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44669$as_echo "$BUILD_NM" >&6; }
44670else
44671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44672$as_echo "no" >&6; }
44673fi
44674
44675
44676          if test "x$BUILD_NM" = x; then
44677            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44678          fi
44679        else
44680          # Otherwise we believe it is a complete path. Use it as it is.
44681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44682$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44683          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44684$as_echo_n "checking for BUILD_NM... " >&6; }
44685          if test ! -x "$tool_specified"; then
44686            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44687$as_echo "not found" >&6; }
44688            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44689          fi
44690          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44691$as_echo "$tool_specified" >&6; }
44692        fi
44693      fi
44694    fi
44695
44696  fi
44697
44698
44699
44700  # Only process if variable expands to non-empty
44701
44702  if test "x$BUILD_NM" != x; then
44703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44704
44705  # First separate the path from the arguments. This will split at the first
44706  # space.
44707  complete="$BUILD_NM"
44708  path="${complete%% *}"
44709  tmp="$complete EOL"
44710  arguments="${tmp#* }"
44711
44712  # Input might be given as Windows format, start by converting to
44713  # unix format.
44714  new_path=`$CYGPATH -u "$path"`
44715
44716  # Now try to locate executable using which
44717  new_path=`$WHICH "$new_path" 2> /dev/null`
44718  # bat and cmd files are not always considered executable in cygwin causing which
44719  # to not find them
44720  if test "x$new_path" = x \
44721      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44722      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44723    new_path=`$CYGPATH -u "$path"`
44724  fi
44725  if test "x$new_path" = x; then
44726    # Oops. Which didn't find the executable.
44727    # The splitting of arguments from the executable at a space might have been incorrect,
44728    # since paths with space are more likely in Windows. Give it another try with the whole
44729    # argument.
44730    path="$complete"
44731    arguments="EOL"
44732    new_path=`$CYGPATH -u "$path"`
44733    new_path=`$WHICH "$new_path" 2> /dev/null`
44734    # bat and cmd files are not always considered executable in cygwin causing which
44735    # to not find them
44736    if test "x$new_path" = x \
44737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44739      new_path=`$CYGPATH -u "$path"`
44740    fi
44741    if test "x$new_path" = x; then
44742      # It's still not found. Now this is an unrecoverable error.
44743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44744$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44745      has_space=`$ECHO "$complete" | $GREP " "`
44746      if test "x$has_space" != x; then
44747        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44748$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44749      fi
44750      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44751    fi
44752  fi
44753
44754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44757  # "foo.exe" is OK but "foo" is an error.
44758  #
44759  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44760  # It is also a way to make sure we got the proper file name for the real test later on.
44761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44762  if test "x$test_shortpath" = x; then
44763    # Short path failed, file does not exist as specified.
44764    # Try adding .exe or .cmd
44765    if test -f "${new_path}.exe"; then
44766      input_to_shortpath="${new_path}.exe"
44767    elif test -f "${new_path}.cmd"; then
44768      input_to_shortpath="${new_path}.cmd"
44769    else
44770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44771$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44772      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44773$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44774      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44775    fi
44776  else
44777    input_to_shortpath="$new_path"
44778  fi
44779
44780  # Call helper function which possibly converts this using DOS-style short mode.
44781  # If so, the updated path is stored in $new_path.
44782  new_path="$input_to_shortpath"
44783
44784  input_path="$input_to_shortpath"
44785  # Check if we need to convert this using DOS-style short mode. If the path
44786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44787  # take no chances and rewrite it.
44788  # Note: m4 eats our [], so we need to use [ and ] instead.
44789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44790  if test "x$has_forbidden_chars" != x; then
44791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44795      # Going to short mode and back again did indeed matter. Since short mode is
44796      # case insensitive, let's make it lowercase to improve readability.
44797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44798      # Now convert it back to Unix-style (cygpath)
44799      input_path=`$CYGPATH -u "$shortmode_path"`
44800      new_path="$input_path"
44801    fi
44802  fi
44803
44804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44805  if test "x$test_cygdrive_prefix" = x; then
44806    # As a simple fix, exclude /usr/bin since it's not a real path.
44807    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44809      # a path prefixed by /cygdrive for fixpath to work.
44810      new_path="$CYGWIN_ROOT_PATH$input_path"
44811    fi
44812  fi
44813
44814  # remove trailing .exe if any
44815  new_path="${new_path/%.exe/}"
44816
44817    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44818
44819  # First separate the path from the arguments. This will split at the first
44820  # space.
44821  complete="$BUILD_NM"
44822  path="${complete%% *}"
44823  tmp="$complete EOL"
44824  arguments="${tmp#* }"
44825
44826  # Input might be given as Windows format, start by converting to
44827  # unix format.
44828  new_path="$path"
44829
44830  windows_path="$new_path"
44831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44832    unix_path=`$CYGPATH -u "$windows_path"`
44833    new_path="$unix_path"
44834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44836    new_path="$unix_path"
44837  fi
44838
44839
44840  # Now try to locate executable using which
44841  new_path=`$WHICH "$new_path" 2> /dev/null`
44842
44843  if test "x$new_path" = x; then
44844    # Oops. Which didn't find the executable.
44845    # The splitting of arguments from the executable at a space might have been incorrect,
44846    # since paths with space are more likely in Windows. Give it another try with the whole
44847    # argument.
44848    path="$complete"
44849    arguments="EOL"
44850    new_path="$path"
44851
44852  windows_path="$new_path"
44853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44854    unix_path=`$CYGPATH -u "$windows_path"`
44855    new_path="$unix_path"
44856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44858    new_path="$unix_path"
44859  fi
44860
44861
44862    new_path=`$WHICH "$new_path" 2> /dev/null`
44863    # bat and cmd files are not always considered executable in MSYS causing which
44864    # to not find them
44865    if test "x$new_path" = x \
44866        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44867        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44868      new_path="$path"
44869
44870  windows_path="$new_path"
44871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44872    unix_path=`$CYGPATH -u "$windows_path"`
44873    new_path="$unix_path"
44874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44876    new_path="$unix_path"
44877  fi
44878
44879    fi
44880
44881    if test "x$new_path" = x; then
44882      # It's still not found. Now this is an unrecoverable error.
44883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44884$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44885      has_space=`$ECHO "$complete" | $GREP " "`
44886      if test "x$has_space" != x; then
44887        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44888$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44889      fi
44890      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44891    fi
44892  fi
44893
44894  # Now new_path has a complete unix path to the binary
44895  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44896    # Keep paths in /bin as-is, but remove trailing .exe if any
44897    new_path="${new_path/%.exe/}"
44898    # Do not save /bin paths to all_fixpath_prefixes!
44899  else
44900    # Not in mixed or Windows style, start by that.
44901    new_path=`cmd //c echo $new_path`
44902
44903  input_path="$new_path"
44904  # Check if we need to convert this using DOS-style short mode. If the path
44905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44906  # take no chances and rewrite it.
44907  # Note: m4 eats our [], so we need to use [ and ] instead.
44908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44909  if test "x$has_forbidden_chars" != x; then
44910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44912  fi
44913
44914    # Output is in $new_path
44915
44916  windows_path="$new_path"
44917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44918    unix_path=`$CYGPATH -u "$windows_path"`
44919    new_path="$unix_path"
44920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44922    new_path="$unix_path"
44923  fi
44924
44925    # remove trailing .exe if any
44926    new_path="${new_path/%.exe/}"
44927
44928    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44929    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44930  fi
44931
44932    else
44933      # We're on a unix platform. Hooray! :)
44934      # First separate the path from the arguments. This will split at the first
44935      # space.
44936      complete="$BUILD_NM"
44937      path="${complete%% *}"
44938      tmp="$complete EOL"
44939      arguments="${tmp#* }"
44940
44941      # Cannot rely on the command "which" here since it doesn't always work.
44942      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44943      if test -z "$is_absolute_path"; then
44944        # Path to executable is not absolute. Find it.
44945        IFS_save="$IFS"
44946        IFS=:
44947        for p in $PATH; do
44948          if test -f "$p/$path" && test -x "$p/$path"; then
44949            new_path="$p/$path"
44950            break
44951          fi
44952        done
44953        IFS="$IFS_save"
44954      else
44955        # This is an absolute path, we can use it without further modifications.
44956        new_path="$path"
44957      fi
44958
44959      if test "x$new_path" = x; then
44960        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44961$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44962        has_space=`$ECHO "$complete" | $GREP " "`
44963        if test "x$has_space" != x; then
44964          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44965$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44966        fi
44967        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44968      fi
44969    fi
44970
44971    # Now join together the path and the arguments once again
44972    if test "x$arguments" != xEOL; then
44973      new_complete="$new_path ${arguments% *}"
44974    else
44975      new_complete="$new_path"
44976    fi
44977
44978    if test "x$complete" != "x$new_complete"; then
44979      BUILD_NM="$new_complete"
44980      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44981$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44982    fi
44983  fi
44984
44985
44986
44987  # Publish this variable in the help.
44988
44989
44990  if [ -z "${BUILD_AR+x}" ]; then
44991    # The variable is not set by user, try to locate tool using the code snippet
44992    for ac_prog in ar gcc-ar
44993do
44994  # Extract the first word of "$ac_prog", so it can be a program name with args.
44995set dummy $ac_prog; ac_word=$2
44996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44997$as_echo_n "checking for $ac_word... " >&6; }
44998if ${ac_cv_path_BUILD_AR+:} false; then :
44999  $as_echo_n "(cached) " >&6
45000else
45001  case $BUILD_AR in
45002  [\\/]* | ?:[\\/]*)
45003  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45004  ;;
45005  *)
45006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45007for as_dir in $PATH
45008do
45009  IFS=$as_save_IFS
45010  test -z "$as_dir" && as_dir=.
45011    for ac_exec_ext in '' $ac_executable_extensions; do
45012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45013    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45015    break 2
45016  fi
45017done
45018  done
45019IFS=$as_save_IFS
45020
45021  ;;
45022esac
45023fi
45024BUILD_AR=$ac_cv_path_BUILD_AR
45025if test -n "$BUILD_AR"; then
45026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45027$as_echo "$BUILD_AR" >&6; }
45028else
45029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45030$as_echo "no" >&6; }
45031fi
45032
45033
45034  test -n "$BUILD_AR" && break
45035done
45036
45037  else
45038    # The variable is set, but is it from the command line or the environment?
45039
45040    # Try to remove the string !BUILD_AR! from our list.
45041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45043      # If it failed, the variable was not from the command line. Ignore it,
45044      # but warn the user (except for BASH, which is always set by the calling BASH).
45045      if test "xBUILD_AR" != xBASH; then
45046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45047$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45048      fi
45049      # Try to locate tool using the code snippet
45050      for ac_prog in ar gcc-ar
45051do
45052  # Extract the first word of "$ac_prog", so it can be a program name with args.
45053set dummy $ac_prog; ac_word=$2
45054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45055$as_echo_n "checking for $ac_word... " >&6; }
45056if ${ac_cv_path_BUILD_AR+:} false; then :
45057  $as_echo_n "(cached) " >&6
45058else
45059  case $BUILD_AR in
45060  [\\/]* | ?:[\\/]*)
45061  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45062  ;;
45063  *)
45064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45065for as_dir in $PATH
45066do
45067  IFS=$as_save_IFS
45068  test -z "$as_dir" && as_dir=.
45069    for ac_exec_ext in '' $ac_executable_extensions; do
45070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45071    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45073    break 2
45074  fi
45075done
45076  done
45077IFS=$as_save_IFS
45078
45079  ;;
45080esac
45081fi
45082BUILD_AR=$ac_cv_path_BUILD_AR
45083if test -n "$BUILD_AR"; then
45084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45085$as_echo "$BUILD_AR" >&6; }
45086else
45087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45088$as_echo "no" >&6; }
45089fi
45090
45091
45092  test -n "$BUILD_AR" && break
45093done
45094
45095    else
45096      # If it succeeded, then it was overridden by the user. We will use it
45097      # for the tool.
45098
45099      # First remove it from the list of overridden variables, so we can test
45100      # for unknown variables in the end.
45101      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45102
45103      # Check if we try to supply an empty value
45104      if test "x$BUILD_AR" = x; then
45105        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45106$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45107        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45108$as_echo_n "checking for BUILD_AR... " >&6; }
45109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45110$as_echo "disabled" >&6; }
45111      else
45112        # Check if the provided tool contains a complete path.
45113        tool_specified="$BUILD_AR"
45114        tool_basename="${tool_specified##*/}"
45115        if test "x$tool_basename" = "x$tool_specified"; then
45116          # A command without a complete path is provided, search $PATH.
45117          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45118$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45119          # Extract the first word of "$tool_basename", so it can be a program name with args.
45120set dummy $tool_basename; ac_word=$2
45121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45122$as_echo_n "checking for $ac_word... " >&6; }
45123if ${ac_cv_path_BUILD_AR+:} false; then :
45124  $as_echo_n "(cached) " >&6
45125else
45126  case $BUILD_AR in
45127  [\\/]* | ?:[\\/]*)
45128  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45129  ;;
45130  *)
45131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45132for as_dir in $PATH
45133do
45134  IFS=$as_save_IFS
45135  test -z "$as_dir" && as_dir=.
45136    for ac_exec_ext in '' $ac_executable_extensions; do
45137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45138    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45140    break 2
45141  fi
45142done
45143  done
45144IFS=$as_save_IFS
45145
45146  ;;
45147esac
45148fi
45149BUILD_AR=$ac_cv_path_BUILD_AR
45150if test -n "$BUILD_AR"; then
45151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45152$as_echo "$BUILD_AR" >&6; }
45153else
45154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45155$as_echo "no" >&6; }
45156fi
45157
45158
45159          if test "x$BUILD_AR" = x; then
45160            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45161          fi
45162        else
45163          # Otherwise we believe it is a complete path. Use it as it is.
45164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45165$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45166          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45167$as_echo_n "checking for BUILD_AR... " >&6; }
45168          if test ! -x "$tool_specified"; then
45169            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45170$as_echo "not found" >&6; }
45171            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45172          fi
45173          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45174$as_echo "$tool_specified" >&6; }
45175        fi
45176      fi
45177    fi
45178
45179  fi
45180
45181
45182
45183  # Only process if variable expands to non-empty
45184
45185  if test "x$BUILD_AR" != x; then
45186    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45187
45188  # First separate the path from the arguments. This will split at the first
45189  # space.
45190  complete="$BUILD_AR"
45191  path="${complete%% *}"
45192  tmp="$complete EOL"
45193  arguments="${tmp#* }"
45194
45195  # Input might be given as Windows format, start by converting to
45196  # unix format.
45197  new_path=`$CYGPATH -u "$path"`
45198
45199  # Now try to locate executable using which
45200  new_path=`$WHICH "$new_path" 2> /dev/null`
45201  # bat and cmd files are not always considered executable in cygwin causing which
45202  # to not find them
45203  if test "x$new_path" = x \
45204      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45205      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45206    new_path=`$CYGPATH -u "$path"`
45207  fi
45208  if test "x$new_path" = x; then
45209    # Oops. Which didn't find the executable.
45210    # The splitting of arguments from the executable at a space might have been incorrect,
45211    # since paths with space are more likely in Windows. Give it another try with the whole
45212    # argument.
45213    path="$complete"
45214    arguments="EOL"
45215    new_path=`$CYGPATH -u "$path"`
45216    new_path=`$WHICH "$new_path" 2> /dev/null`
45217    # bat and cmd files are not always considered executable in cygwin causing which
45218    # to not find them
45219    if test "x$new_path" = x \
45220        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45221        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45222      new_path=`$CYGPATH -u "$path"`
45223    fi
45224    if test "x$new_path" = x; then
45225      # It's still not found. Now this is an unrecoverable error.
45226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45227$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45228      has_space=`$ECHO "$complete" | $GREP " "`
45229      if test "x$has_space" != x; then
45230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45232      fi
45233      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45234    fi
45235  fi
45236
45237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45240  # "foo.exe" is OK but "foo" is an error.
45241  #
45242  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45243  # It is also a way to make sure we got the proper file name for the real test later on.
45244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45245  if test "x$test_shortpath" = x; then
45246    # Short path failed, file does not exist as specified.
45247    # Try adding .exe or .cmd
45248    if test -f "${new_path}.exe"; then
45249      input_to_shortpath="${new_path}.exe"
45250    elif test -f "${new_path}.cmd"; then
45251      input_to_shortpath="${new_path}.cmd"
45252    else
45253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45254$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45255      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45256$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45257      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45258    fi
45259  else
45260    input_to_shortpath="$new_path"
45261  fi
45262
45263  # Call helper function which possibly converts this using DOS-style short mode.
45264  # If so, the updated path is stored in $new_path.
45265  new_path="$input_to_shortpath"
45266
45267  input_path="$input_to_shortpath"
45268  # Check if we need to convert this using DOS-style short mode. If the path
45269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45270  # take no chances and rewrite it.
45271  # Note: m4 eats our [], so we need to use [ and ] instead.
45272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45273  if test "x$has_forbidden_chars" != x; then
45274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45275    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45276    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45277    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45278      # Going to short mode and back again did indeed matter. Since short mode is
45279      # case insensitive, let's make it lowercase to improve readability.
45280      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45281      # Now convert it back to Unix-style (cygpath)
45282      input_path=`$CYGPATH -u "$shortmode_path"`
45283      new_path="$input_path"
45284    fi
45285  fi
45286
45287  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45288  if test "x$test_cygdrive_prefix" = x; then
45289    # As a simple fix, exclude /usr/bin since it's not a real path.
45290    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45291      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45292      # a path prefixed by /cygdrive for fixpath to work.
45293      new_path="$CYGWIN_ROOT_PATH$input_path"
45294    fi
45295  fi
45296
45297  # remove trailing .exe if any
45298  new_path="${new_path/%.exe/}"
45299
45300    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45301
45302  # First separate the path from the arguments. This will split at the first
45303  # space.
45304  complete="$BUILD_AR"
45305  path="${complete%% *}"
45306  tmp="$complete EOL"
45307  arguments="${tmp#* }"
45308
45309  # Input might be given as Windows format, start by converting to
45310  # unix format.
45311  new_path="$path"
45312
45313  windows_path="$new_path"
45314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45315    unix_path=`$CYGPATH -u "$windows_path"`
45316    new_path="$unix_path"
45317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45319    new_path="$unix_path"
45320  fi
45321
45322
45323  # Now try to locate executable using which
45324  new_path=`$WHICH "$new_path" 2> /dev/null`
45325
45326  if test "x$new_path" = x; then
45327    # Oops. Which didn't find the executable.
45328    # The splitting of arguments from the executable at a space might have been incorrect,
45329    # since paths with space are more likely in Windows. Give it another try with the whole
45330    # argument.
45331    path="$complete"
45332    arguments="EOL"
45333    new_path="$path"
45334
45335  windows_path="$new_path"
45336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45337    unix_path=`$CYGPATH -u "$windows_path"`
45338    new_path="$unix_path"
45339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45341    new_path="$unix_path"
45342  fi
45343
45344
45345    new_path=`$WHICH "$new_path" 2> /dev/null`
45346    # bat and cmd files are not always considered executable in MSYS causing which
45347    # to not find them
45348    if test "x$new_path" = x \
45349        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45350        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45351      new_path="$path"
45352
45353  windows_path="$new_path"
45354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45355    unix_path=`$CYGPATH -u "$windows_path"`
45356    new_path="$unix_path"
45357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45359    new_path="$unix_path"
45360  fi
45361
45362    fi
45363
45364    if test "x$new_path" = x; then
45365      # It's still not found. Now this is an unrecoverable error.
45366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45367$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45368      has_space=`$ECHO "$complete" | $GREP " "`
45369      if test "x$has_space" != x; then
45370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45372      fi
45373      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45374    fi
45375  fi
45376
45377  # Now new_path has a complete unix path to the binary
45378  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45379    # Keep paths in /bin as-is, but remove trailing .exe if any
45380    new_path="${new_path/%.exe/}"
45381    # Do not save /bin paths to all_fixpath_prefixes!
45382  else
45383    # Not in mixed or Windows style, start by that.
45384    new_path=`cmd //c echo $new_path`
45385
45386  input_path="$new_path"
45387  # Check if we need to convert this using DOS-style short mode. If the path
45388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45389  # take no chances and rewrite it.
45390  # Note: m4 eats our [], so we need to use [ and ] instead.
45391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45392  if test "x$has_forbidden_chars" != x; then
45393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45395  fi
45396
45397    # Output is in $new_path
45398
45399  windows_path="$new_path"
45400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45401    unix_path=`$CYGPATH -u "$windows_path"`
45402    new_path="$unix_path"
45403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45405    new_path="$unix_path"
45406  fi
45407
45408    # remove trailing .exe if any
45409    new_path="${new_path/%.exe/}"
45410
45411    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45412    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45413  fi
45414
45415    else
45416      # We're on a unix platform. Hooray! :)
45417      # First separate the path from the arguments. This will split at the first
45418      # space.
45419      complete="$BUILD_AR"
45420      path="${complete%% *}"
45421      tmp="$complete EOL"
45422      arguments="${tmp#* }"
45423
45424      # Cannot rely on the command "which" here since it doesn't always work.
45425      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45426      if test -z "$is_absolute_path"; then
45427        # Path to executable is not absolute. Find it.
45428        IFS_save="$IFS"
45429        IFS=:
45430        for p in $PATH; do
45431          if test -f "$p/$path" && test -x "$p/$path"; then
45432            new_path="$p/$path"
45433            break
45434          fi
45435        done
45436        IFS="$IFS_save"
45437      else
45438        # This is an absolute path, we can use it without further modifications.
45439        new_path="$path"
45440      fi
45441
45442      if test "x$new_path" = x; then
45443        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45444$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45445        has_space=`$ECHO "$complete" | $GREP " "`
45446        if test "x$has_space" != x; then
45447          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45448$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45449        fi
45450        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45451      fi
45452    fi
45453
45454    # Now join together the path and the arguments once again
45455    if test "x$arguments" != xEOL; then
45456      new_complete="$new_path ${arguments% *}"
45457    else
45458      new_complete="$new_path"
45459    fi
45460
45461    if test "x$complete" != "x$new_complete"; then
45462      BUILD_AR="$new_complete"
45463      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45464$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45465    fi
45466  fi
45467
45468
45469
45470  # Publish this variable in the help.
45471
45472
45473  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45474    # The variable is not set by user, try to locate tool using the code snippet
45475    for ac_prog in objcopy
45476do
45477  # Extract the first word of "$ac_prog", so it can be a program name with args.
45478set dummy $ac_prog; ac_word=$2
45479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45480$as_echo_n "checking for $ac_word... " >&6; }
45481if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45482  $as_echo_n "(cached) " >&6
45483else
45484  case $BUILD_OBJCOPY in
45485  [\\/]* | ?:[\\/]*)
45486  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45487  ;;
45488  *)
45489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45490for as_dir in $PATH
45491do
45492  IFS=$as_save_IFS
45493  test -z "$as_dir" && as_dir=.
45494    for ac_exec_ext in '' $ac_executable_extensions; do
45495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45496    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45498    break 2
45499  fi
45500done
45501  done
45502IFS=$as_save_IFS
45503
45504  ;;
45505esac
45506fi
45507BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45508if test -n "$BUILD_OBJCOPY"; then
45509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45510$as_echo "$BUILD_OBJCOPY" >&6; }
45511else
45512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45513$as_echo "no" >&6; }
45514fi
45515
45516
45517  test -n "$BUILD_OBJCOPY" && break
45518done
45519
45520  else
45521    # The variable is set, but is it from the command line or the environment?
45522
45523    # Try to remove the string !BUILD_OBJCOPY! from our list.
45524    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
45525    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45526      # If it failed, the variable was not from the command line. Ignore it,
45527      # but warn the user (except for BASH, which is always set by the calling BASH).
45528      if test "xBUILD_OBJCOPY" != xBASH; then
45529        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
45530$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
45531      fi
45532      # Try to locate tool using the code snippet
45533      for ac_prog in objcopy
45534do
45535  # Extract the first word of "$ac_prog", so it can be a program name with args.
45536set dummy $ac_prog; ac_word=$2
45537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45538$as_echo_n "checking for $ac_word... " >&6; }
45539if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45540  $as_echo_n "(cached) " >&6
45541else
45542  case $BUILD_OBJCOPY in
45543  [\\/]* | ?:[\\/]*)
45544  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45545  ;;
45546  *)
45547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45548for as_dir in $PATH
45549do
45550  IFS=$as_save_IFS
45551  test -z "$as_dir" && as_dir=.
45552    for ac_exec_ext in '' $ac_executable_extensions; do
45553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45554    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45556    break 2
45557  fi
45558done
45559  done
45560IFS=$as_save_IFS
45561
45562  ;;
45563esac
45564fi
45565BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45566if test -n "$BUILD_OBJCOPY"; then
45567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45568$as_echo "$BUILD_OBJCOPY" >&6; }
45569else
45570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45571$as_echo "no" >&6; }
45572fi
45573
45574
45575  test -n "$BUILD_OBJCOPY" && break
45576done
45577
45578    else
45579      # If it succeeded, then it was overridden by the user. We will use it
45580      # for the tool.
45581
45582      # First remove it from the list of overridden variables, so we can test
45583      # for unknown variables in the end.
45584      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45585
45586      # Check if we try to supply an empty value
45587      if test "x$BUILD_OBJCOPY" = x; then
45588        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
45589$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
45590        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45591$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45593$as_echo "disabled" >&6; }
45594      else
45595        # Check if the provided tool contains a complete path.
45596        tool_specified="$BUILD_OBJCOPY"
45597        tool_basename="${tool_specified##*/}"
45598        if test "x$tool_basename" = "x$tool_specified"; then
45599          # A command without a complete path is provided, search $PATH.
45600          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
45601$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
45602          # Extract the first word of "$tool_basename", so it can be a program name with args.
45603set dummy $tool_basename; ac_word=$2
45604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45605$as_echo_n "checking for $ac_word... " >&6; }
45606if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45607  $as_echo_n "(cached) " >&6
45608else
45609  case $BUILD_OBJCOPY in
45610  [\\/]* | ?:[\\/]*)
45611  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45612  ;;
45613  *)
45614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45615for as_dir in $PATH
45616do
45617  IFS=$as_save_IFS
45618  test -z "$as_dir" && as_dir=.
45619    for ac_exec_ext in '' $ac_executable_extensions; do
45620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45621    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45623    break 2
45624  fi
45625done
45626  done
45627IFS=$as_save_IFS
45628
45629  ;;
45630esac
45631fi
45632BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45633if test -n "$BUILD_OBJCOPY"; then
45634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45635$as_echo "$BUILD_OBJCOPY" >&6; }
45636else
45637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45638$as_echo "no" >&6; }
45639fi
45640
45641
45642          if test "x$BUILD_OBJCOPY" = x; then
45643            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45644          fi
45645        else
45646          # Otherwise we believe it is a complete path. Use it as it is.
45647          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
45648$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
45649          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45650$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45651          if test ! -x "$tool_specified"; then
45652            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45653$as_echo "not found" >&6; }
45654            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
45655          fi
45656          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45657$as_echo "$tool_specified" >&6; }
45658        fi
45659      fi
45660    fi
45661
45662  fi
45663
45664
45665
45666  # Only process if variable expands to non-empty
45667
45668  if test "x$BUILD_OBJCOPY" != x; then
45669    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45670
45671  # First separate the path from the arguments. This will split at the first
45672  # space.
45673  complete="$BUILD_OBJCOPY"
45674  path="${complete%% *}"
45675  tmp="$complete EOL"
45676  arguments="${tmp#* }"
45677
45678  # Input might be given as Windows format, start by converting to
45679  # unix format.
45680  new_path=`$CYGPATH -u "$path"`
45681
45682  # Now try to locate executable using which
45683  new_path=`$WHICH "$new_path" 2> /dev/null`
45684  # bat and cmd files are not always considered executable in cygwin causing which
45685  # to not find them
45686  if test "x$new_path" = x \
45687      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45688      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45689    new_path=`$CYGPATH -u "$path"`
45690  fi
45691  if test "x$new_path" = x; then
45692    # Oops. Which didn't find the executable.
45693    # The splitting of arguments from the executable at a space might have been incorrect,
45694    # since paths with space are more likely in Windows. Give it another try with the whole
45695    # argument.
45696    path="$complete"
45697    arguments="EOL"
45698    new_path=`$CYGPATH -u "$path"`
45699    new_path=`$WHICH "$new_path" 2> /dev/null`
45700    # bat and cmd files are not always considered executable in cygwin causing which
45701    # to not find them
45702    if test "x$new_path" = x \
45703        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45704        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45705      new_path=`$CYGPATH -u "$path"`
45706    fi
45707    if test "x$new_path" = x; then
45708      # It's still not found. Now this is an unrecoverable error.
45709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45710$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45711      has_space=`$ECHO "$complete" | $GREP " "`
45712      if test "x$has_space" != x; then
45713        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45714$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45715      fi
45716      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45717    fi
45718  fi
45719
45720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45723  # "foo.exe" is OK but "foo" is an error.
45724  #
45725  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45726  # It is also a way to make sure we got the proper file name for the real test later on.
45727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45728  if test "x$test_shortpath" = x; then
45729    # Short path failed, file does not exist as specified.
45730    # Try adding .exe or .cmd
45731    if test -f "${new_path}.exe"; then
45732      input_to_shortpath="${new_path}.exe"
45733    elif test -f "${new_path}.cmd"; then
45734      input_to_shortpath="${new_path}.cmd"
45735    else
45736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
45737$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
45738      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45739$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45740      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45741    fi
45742  else
45743    input_to_shortpath="$new_path"
45744  fi
45745
45746  # Call helper function which possibly converts this using DOS-style short mode.
45747  # If so, the updated path is stored in $new_path.
45748  new_path="$input_to_shortpath"
45749
45750  input_path="$input_to_shortpath"
45751  # Check if we need to convert this using DOS-style short mode. If the path
45752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45753  # take no chances and rewrite it.
45754  # Note: m4 eats our [], so we need to use [ and ] instead.
45755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45756  if test "x$has_forbidden_chars" != x; then
45757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45761      # Going to short mode and back again did indeed matter. Since short mode is
45762      # case insensitive, let's make it lowercase to improve readability.
45763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45764      # Now convert it back to Unix-style (cygpath)
45765      input_path=`$CYGPATH -u "$shortmode_path"`
45766      new_path="$input_path"
45767    fi
45768  fi
45769
45770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45771  if test "x$test_cygdrive_prefix" = x; then
45772    # As a simple fix, exclude /usr/bin since it's not a real path.
45773    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45775      # a path prefixed by /cygdrive for fixpath to work.
45776      new_path="$CYGWIN_ROOT_PATH$input_path"
45777    fi
45778  fi
45779
45780  # remove trailing .exe if any
45781  new_path="${new_path/%.exe/}"
45782
45783    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45784
45785  # First separate the path from the arguments. This will split at the first
45786  # space.
45787  complete="$BUILD_OBJCOPY"
45788  path="${complete%% *}"
45789  tmp="$complete EOL"
45790  arguments="${tmp#* }"
45791
45792  # Input might be given as Windows format, start by converting to
45793  # unix format.
45794  new_path="$path"
45795
45796  windows_path="$new_path"
45797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45798    unix_path=`$CYGPATH -u "$windows_path"`
45799    new_path="$unix_path"
45800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45802    new_path="$unix_path"
45803  fi
45804
45805
45806  # Now try to locate executable using which
45807  new_path=`$WHICH "$new_path" 2> /dev/null`
45808
45809  if test "x$new_path" = x; then
45810    # Oops. Which didn't find the executable.
45811    # The splitting of arguments from the executable at a space might have been incorrect,
45812    # since paths with space are more likely in Windows. Give it another try with the whole
45813    # argument.
45814    path="$complete"
45815    arguments="EOL"
45816    new_path="$path"
45817
45818  windows_path="$new_path"
45819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45820    unix_path=`$CYGPATH -u "$windows_path"`
45821    new_path="$unix_path"
45822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45824    new_path="$unix_path"
45825  fi
45826
45827
45828    new_path=`$WHICH "$new_path" 2> /dev/null`
45829    # bat and cmd files are not always considered executable in MSYS causing which
45830    # to not find them
45831    if test "x$new_path" = x \
45832        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45833        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45834      new_path="$path"
45835
45836  windows_path="$new_path"
45837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45838    unix_path=`$CYGPATH -u "$windows_path"`
45839    new_path="$unix_path"
45840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45842    new_path="$unix_path"
45843  fi
45844
45845    fi
45846
45847    if test "x$new_path" = x; then
45848      # It's still not found. Now this is an unrecoverable error.
45849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45850$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45851      has_space=`$ECHO "$complete" | $GREP " "`
45852      if test "x$has_space" != x; then
45853        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45854$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45855      fi
45856      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45857    fi
45858  fi
45859
45860  # Now new_path has a complete unix path to the binary
45861  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45862    # Keep paths in /bin as-is, but remove trailing .exe if any
45863    new_path="${new_path/%.exe/}"
45864    # Do not save /bin paths to all_fixpath_prefixes!
45865  else
45866    # Not in mixed or Windows style, start by that.
45867    new_path=`cmd //c echo $new_path`
45868
45869  input_path="$new_path"
45870  # Check if we need to convert this using DOS-style short mode. If the path
45871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45872  # take no chances and rewrite it.
45873  # Note: m4 eats our [], so we need to use [ and ] instead.
45874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45875  if test "x$has_forbidden_chars" != x; then
45876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45877    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45878  fi
45879
45880    # Output is in $new_path
45881
45882  windows_path="$new_path"
45883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45884    unix_path=`$CYGPATH -u "$windows_path"`
45885    new_path="$unix_path"
45886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45888    new_path="$unix_path"
45889  fi
45890
45891    # remove trailing .exe if any
45892    new_path="${new_path/%.exe/}"
45893
45894    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45895    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45896  fi
45897
45898    else
45899      # We're on a unix platform. Hooray! :)
45900      # First separate the path from the arguments. This will split at the first
45901      # space.
45902      complete="$BUILD_OBJCOPY"
45903      path="${complete%% *}"
45904      tmp="$complete EOL"
45905      arguments="${tmp#* }"
45906
45907      # Cannot rely on the command "which" here since it doesn't always work.
45908      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45909      if test -z "$is_absolute_path"; then
45910        # Path to executable is not absolute. Find it.
45911        IFS_save="$IFS"
45912        IFS=:
45913        for p in $PATH; do
45914          if test -f "$p/$path" && test -x "$p/$path"; then
45915            new_path="$p/$path"
45916            break
45917          fi
45918        done
45919        IFS="$IFS_save"
45920      else
45921        # This is an absolute path, we can use it without further modifications.
45922        new_path="$path"
45923      fi
45924
45925      if test "x$new_path" = x; then
45926        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45927$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45928        has_space=`$ECHO "$complete" | $GREP " "`
45929        if test "x$has_space" != x; then
45930          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45931$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45932        fi
45933        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45934      fi
45935    fi
45936
45937    # Now join together the path and the arguments once again
45938    if test "x$arguments" != xEOL; then
45939      new_complete="$new_path ${arguments% *}"
45940    else
45941      new_complete="$new_path"
45942    fi
45943
45944    if test "x$complete" != "x$new_complete"; then
45945      BUILD_OBJCOPY="$new_complete"
45946      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
45947$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
45948    fi
45949  fi
45950
45951
45952
45953  # Publish this variable in the help.
45954
45955
45956  if [ -z "${BUILD_STRIP+x}" ]; then
45957    # The variable is not set by user, try to locate tool using the code snippet
45958    for ac_prog in strip
45959do
45960  # Extract the first word of "$ac_prog", so it can be a program name with args.
45961set dummy $ac_prog; ac_word=$2
45962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45963$as_echo_n "checking for $ac_word... " >&6; }
45964if ${ac_cv_path_BUILD_STRIP+:} false; then :
45965  $as_echo_n "(cached) " >&6
45966else
45967  case $BUILD_STRIP in
45968  [\\/]* | ?:[\\/]*)
45969  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45970  ;;
45971  *)
45972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45973for as_dir in $PATH
45974do
45975  IFS=$as_save_IFS
45976  test -z "$as_dir" && as_dir=.
45977    for ac_exec_ext in '' $ac_executable_extensions; do
45978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45979    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
45980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45981    break 2
45982  fi
45983done
45984  done
45985IFS=$as_save_IFS
45986
45987  ;;
45988esac
45989fi
45990BUILD_STRIP=$ac_cv_path_BUILD_STRIP
45991if test -n "$BUILD_STRIP"; then
45992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
45993$as_echo "$BUILD_STRIP" >&6; }
45994else
45995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45996$as_echo "no" >&6; }
45997fi
45998
45999
46000  test -n "$BUILD_STRIP" && break
46001done
46002
46003  else
46004    # The variable is set, but is it from the command line or the environment?
46005
46006    # Try to remove the string !BUILD_STRIP! from our list.
46007    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46008    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46009      # If it failed, the variable was not from the command line. Ignore it,
46010      # but warn the user (except for BASH, which is always set by the calling BASH).
46011      if test "xBUILD_STRIP" != xBASH; then
46012        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46013$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46014      fi
46015      # Try to locate tool using the code snippet
46016      for ac_prog in strip
46017do
46018  # Extract the first word of "$ac_prog", so it can be a program name with args.
46019set dummy $ac_prog; ac_word=$2
46020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46021$as_echo_n "checking for $ac_word... " >&6; }
46022if ${ac_cv_path_BUILD_STRIP+:} false; then :
46023  $as_echo_n "(cached) " >&6
46024else
46025  case $BUILD_STRIP in
46026  [\\/]* | ?:[\\/]*)
46027  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46028  ;;
46029  *)
46030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46031for as_dir in $PATH
46032do
46033  IFS=$as_save_IFS
46034  test -z "$as_dir" && as_dir=.
46035    for ac_exec_ext in '' $ac_executable_extensions; do
46036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46037    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46039    break 2
46040  fi
46041done
46042  done
46043IFS=$as_save_IFS
46044
46045  ;;
46046esac
46047fi
46048BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46049if test -n "$BUILD_STRIP"; then
46050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46051$as_echo "$BUILD_STRIP" >&6; }
46052else
46053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46054$as_echo "no" >&6; }
46055fi
46056
46057
46058  test -n "$BUILD_STRIP" && break
46059done
46060
46061    else
46062      # If it succeeded, then it was overridden by the user. We will use it
46063      # for the tool.
46064
46065      # First remove it from the list of overridden variables, so we can test
46066      # for unknown variables in the end.
46067      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46068
46069      # Check if we try to supply an empty value
46070      if test "x$BUILD_STRIP" = x; then
46071        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46072$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46073        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46074$as_echo_n "checking for BUILD_STRIP... " >&6; }
46075        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46076$as_echo "disabled" >&6; }
46077      else
46078        # Check if the provided tool contains a complete path.
46079        tool_specified="$BUILD_STRIP"
46080        tool_basename="${tool_specified##*/}"
46081        if test "x$tool_basename" = "x$tool_specified"; then
46082          # A command without a complete path is provided, search $PATH.
46083          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46084$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46085          # Extract the first word of "$tool_basename", so it can be a program name with args.
46086set dummy $tool_basename; ac_word=$2
46087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46088$as_echo_n "checking for $ac_word... " >&6; }
46089if ${ac_cv_path_BUILD_STRIP+:} false; then :
46090  $as_echo_n "(cached) " >&6
46091else
46092  case $BUILD_STRIP in
46093  [\\/]* | ?:[\\/]*)
46094  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46095  ;;
46096  *)
46097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46098for as_dir in $PATH
46099do
46100  IFS=$as_save_IFS
46101  test -z "$as_dir" && as_dir=.
46102    for ac_exec_ext in '' $ac_executable_extensions; do
46103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46104    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46106    break 2
46107  fi
46108done
46109  done
46110IFS=$as_save_IFS
46111
46112  ;;
46113esac
46114fi
46115BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46116if test -n "$BUILD_STRIP"; then
46117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46118$as_echo "$BUILD_STRIP" >&6; }
46119else
46120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46121$as_echo "no" >&6; }
46122fi
46123
46124
46125          if test "x$BUILD_STRIP" = x; then
46126            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46127          fi
46128        else
46129          # Otherwise we believe it is a complete path. Use it as it is.
46130          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46131$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46132          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46133$as_echo_n "checking for BUILD_STRIP... " >&6; }
46134          if test ! -x "$tool_specified"; then
46135            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46136$as_echo "not found" >&6; }
46137            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46138          fi
46139          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46140$as_echo "$tool_specified" >&6; }
46141        fi
46142      fi
46143    fi
46144
46145  fi
46146
46147
46148
46149  # Only process if variable expands to non-empty
46150
46151  if test "x$BUILD_STRIP" != x; then
46152    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46153
46154  # First separate the path from the arguments. This will split at the first
46155  # space.
46156  complete="$BUILD_STRIP"
46157  path="${complete%% *}"
46158  tmp="$complete EOL"
46159  arguments="${tmp#* }"
46160
46161  # Input might be given as Windows format, start by converting to
46162  # unix format.
46163  new_path=`$CYGPATH -u "$path"`
46164
46165  # Now try to locate executable using which
46166  new_path=`$WHICH "$new_path" 2> /dev/null`
46167  # bat and cmd files are not always considered executable in cygwin causing which
46168  # to not find them
46169  if test "x$new_path" = x \
46170      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46171      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46172    new_path=`$CYGPATH -u "$path"`
46173  fi
46174  if test "x$new_path" = x; then
46175    # Oops. Which didn't find the executable.
46176    # The splitting of arguments from the executable at a space might have been incorrect,
46177    # since paths with space are more likely in Windows. Give it another try with the whole
46178    # argument.
46179    path="$complete"
46180    arguments="EOL"
46181    new_path=`$CYGPATH -u "$path"`
46182    new_path=`$WHICH "$new_path" 2> /dev/null`
46183    # bat and cmd files are not always considered executable in cygwin causing which
46184    # to not find them
46185    if test "x$new_path" = x \
46186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46188      new_path=`$CYGPATH -u "$path"`
46189    fi
46190    if test "x$new_path" = x; then
46191      # It's still not found. Now this is an unrecoverable error.
46192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46193$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46194      has_space=`$ECHO "$complete" | $GREP " "`
46195      if test "x$has_space" != x; then
46196        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46198      fi
46199      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46200    fi
46201  fi
46202
46203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46206  # "foo.exe" is OK but "foo" is an error.
46207  #
46208  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46209  # It is also a way to make sure we got the proper file name for the real test later on.
46210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46211  if test "x$test_shortpath" = x; then
46212    # Short path failed, file does not exist as specified.
46213    # Try adding .exe or .cmd
46214    if test -f "${new_path}.exe"; then
46215      input_to_shortpath="${new_path}.exe"
46216    elif test -f "${new_path}.cmd"; then
46217      input_to_shortpath="${new_path}.cmd"
46218    else
46219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46220$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46221      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46222$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46223      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46224    fi
46225  else
46226    input_to_shortpath="$new_path"
46227  fi
46228
46229  # Call helper function which possibly converts this using DOS-style short mode.
46230  # If so, the updated path is stored in $new_path.
46231  new_path="$input_to_shortpath"
46232
46233  input_path="$input_to_shortpath"
46234  # Check if we need to convert this using DOS-style short mode. If the path
46235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46236  # take no chances and rewrite it.
46237  # Note: m4 eats our [], so we need to use [ and ] instead.
46238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46239  if test "x$has_forbidden_chars" != x; then
46240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46244      # Going to short mode and back again did indeed matter. Since short mode is
46245      # case insensitive, let's make it lowercase to improve readability.
46246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46247      # Now convert it back to Unix-style (cygpath)
46248      input_path=`$CYGPATH -u "$shortmode_path"`
46249      new_path="$input_path"
46250    fi
46251  fi
46252
46253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46254  if test "x$test_cygdrive_prefix" = x; then
46255    # As a simple fix, exclude /usr/bin since it's not a real path.
46256    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46258      # a path prefixed by /cygdrive for fixpath to work.
46259      new_path="$CYGWIN_ROOT_PATH$input_path"
46260    fi
46261  fi
46262
46263  # remove trailing .exe if any
46264  new_path="${new_path/%.exe/}"
46265
46266    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46267
46268  # First separate the path from the arguments. This will split at the first
46269  # space.
46270  complete="$BUILD_STRIP"
46271  path="${complete%% *}"
46272  tmp="$complete EOL"
46273  arguments="${tmp#* }"
46274
46275  # Input might be given as Windows format, start by converting to
46276  # unix format.
46277  new_path="$path"
46278
46279  windows_path="$new_path"
46280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46281    unix_path=`$CYGPATH -u "$windows_path"`
46282    new_path="$unix_path"
46283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46285    new_path="$unix_path"
46286  fi
46287
46288
46289  # Now try to locate executable using which
46290  new_path=`$WHICH "$new_path" 2> /dev/null`
46291
46292  if test "x$new_path" = x; then
46293    # Oops. Which didn't find the executable.
46294    # The splitting of arguments from the executable at a space might have been incorrect,
46295    # since paths with space are more likely in Windows. Give it another try with the whole
46296    # argument.
46297    path="$complete"
46298    arguments="EOL"
46299    new_path="$path"
46300
46301  windows_path="$new_path"
46302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46303    unix_path=`$CYGPATH -u "$windows_path"`
46304    new_path="$unix_path"
46305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46307    new_path="$unix_path"
46308  fi
46309
46310
46311    new_path=`$WHICH "$new_path" 2> /dev/null`
46312    # bat and cmd files are not always considered executable in MSYS causing which
46313    # to not find them
46314    if test "x$new_path" = x \
46315        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46316        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46317      new_path="$path"
46318
46319  windows_path="$new_path"
46320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46321    unix_path=`$CYGPATH -u "$windows_path"`
46322    new_path="$unix_path"
46323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46325    new_path="$unix_path"
46326  fi
46327
46328    fi
46329
46330    if test "x$new_path" = x; then
46331      # It's still not found. Now this is an unrecoverable error.
46332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46333$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46334      has_space=`$ECHO "$complete" | $GREP " "`
46335      if test "x$has_space" != x; then
46336        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46337$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46338      fi
46339      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46340    fi
46341  fi
46342
46343  # Now new_path has a complete unix path to the binary
46344  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46345    # Keep paths in /bin as-is, but remove trailing .exe if any
46346    new_path="${new_path/%.exe/}"
46347    # Do not save /bin paths to all_fixpath_prefixes!
46348  else
46349    # Not in mixed or Windows style, start by that.
46350    new_path=`cmd //c echo $new_path`
46351
46352  input_path="$new_path"
46353  # Check if we need to convert this using DOS-style short mode. If the path
46354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46355  # take no chances and rewrite it.
46356  # Note: m4 eats our [], so we need to use [ and ] instead.
46357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46358  if test "x$has_forbidden_chars" != x; then
46359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46361  fi
46362
46363    # Output is in $new_path
46364
46365  windows_path="$new_path"
46366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46367    unix_path=`$CYGPATH -u "$windows_path"`
46368    new_path="$unix_path"
46369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46371    new_path="$unix_path"
46372  fi
46373
46374    # remove trailing .exe if any
46375    new_path="${new_path/%.exe/}"
46376
46377    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46378    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46379  fi
46380
46381    else
46382      # We're on a unix platform. Hooray! :)
46383      # First separate the path from the arguments. This will split at the first
46384      # space.
46385      complete="$BUILD_STRIP"
46386      path="${complete%% *}"
46387      tmp="$complete EOL"
46388      arguments="${tmp#* }"
46389
46390      # Cannot rely on the command "which" here since it doesn't always work.
46391      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46392      if test -z "$is_absolute_path"; then
46393        # Path to executable is not absolute. Find it.
46394        IFS_save="$IFS"
46395        IFS=:
46396        for p in $PATH; do
46397          if test -f "$p/$path" && test -x "$p/$path"; then
46398            new_path="$p/$path"
46399            break
46400          fi
46401        done
46402        IFS="$IFS_save"
46403      else
46404        # This is an absolute path, we can use it without further modifications.
46405        new_path="$path"
46406      fi
46407
46408      if test "x$new_path" = x; then
46409        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46410$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46411        has_space=`$ECHO "$complete" | $GREP " "`
46412        if test "x$has_space" != x; then
46413          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46414$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46415        fi
46416        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46417      fi
46418    fi
46419
46420    # Now join together the path and the arguments once again
46421    if test "x$arguments" != xEOL; then
46422      new_complete="$new_path ${arguments% *}"
46423    else
46424      new_complete="$new_path"
46425    fi
46426
46427    if test "x$complete" != "x$new_complete"; then
46428      BUILD_STRIP="$new_complete"
46429      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46430$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46431    fi
46432  fi
46433
46434    # Assume the C compiler is the assembler
46435    BUILD_AS="$BUILD_CC -c"
46436    # Just like for the target compiler, use the compiler as linker
46437    BUILD_LD="$BUILD_CC"
46438    BUILD_LDCXX="$BUILD_CXX"
46439
46440    PATH="$OLDPATH"
46441  else
46442    # If we are not cross compiling, use the normal target compilers for
46443    # building the build platform executables.
46444    BUILD_CC="$CC"
46445    BUILD_CXX="$CXX"
46446    BUILD_LD="$LD"
46447    BUILD_LDCXX="$LDCXX"
46448    BUILD_NM="$NM"
46449    BUILD_AS="$AS"
46450    BUILD_OBJCOPY="$OBJCOPY"
46451    BUILD_STRIP="$STRIP"
46452    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
46453    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
46454    BUILD_AR="$AR"
46455  fi
46456
46457
46458
46459
46460
46461
46462
46463
46464
46465
46466
46467
46468  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46469    # For hotspot, we need these in Windows mixed path,
46470    # so rewrite them all. Need added .exe suffix.
46471    HOTSPOT_CXX="$CXX.exe"
46472    HOTSPOT_LD="$LD.exe"
46473    HOTSPOT_MT="$MT.exe"
46474    HOTSPOT_RC="$RC.exe"
46475
46476  unix_path="$HOTSPOT_CXX"
46477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46478    windows_path=`$CYGPATH -m "$unix_path"`
46479    HOTSPOT_CXX="$windows_path"
46480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46481    windows_path=`cmd //c echo $unix_path`
46482    HOTSPOT_CXX="$windows_path"
46483  fi
46484
46485
46486  unix_path="$HOTSPOT_LD"
46487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46488    windows_path=`$CYGPATH -m "$unix_path"`
46489    HOTSPOT_LD="$windows_path"
46490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46491    windows_path=`cmd //c echo $unix_path`
46492    HOTSPOT_LD="$windows_path"
46493  fi
46494
46495
46496  unix_path="$HOTSPOT_MT"
46497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46498    windows_path=`$CYGPATH -m "$unix_path"`
46499    HOTSPOT_MT="$windows_path"
46500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46501    windows_path=`cmd //c echo $unix_path`
46502    HOTSPOT_MT="$windows_path"
46503  fi
46504
46505
46506  unix_path="$HOTSPOT_RC"
46507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46508    windows_path=`$CYGPATH -m "$unix_path"`
46509    HOTSPOT_RC="$windows_path"
46510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46511    windows_path=`cmd //c echo $unix_path`
46512    HOTSPOT_RC="$windows_path"
46513  fi
46514
46515
46516
46517  else
46518    HOTSPOT_CXX="$CXX"
46519    HOTSPOT_LD="$LD"
46520  fi
46521
46522
46523
46524  if test  "x$TOOLCHAIN_TYPE" = xclang; then
46525    USE_CLANG=true
46526  fi
46527
46528
46529
46530
46531
46532  # The package path is used only on macosx?
46533  # FIXME: clean this up, and/or move it elsewhere.
46534  PACKAGE_PATH=/opt/local
46535
46536
46537  # Check for extra potential brokenness.
46538  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46539    # On Windows, double-check that we got the right compiler.
46540    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46541    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
46542    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
46543      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
46544        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
46545      fi
46546    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
46547      if test "x$COMPILER_CPU_TEST" != "xx64"; then
46548        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
46549      fi
46550    fi
46551  fi
46552
46553  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46554    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46555    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
46556    # This is later checked when setting flags.
46557
46558    # "-Og" suppported for GCC 4.8 and later
46559    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
46560
46561
46562
46563
46564
46565
46566
46567
46568
46569
46570
46571
46572
46573
46574
46575
46576
46577
46578
46579
46580
46581
46582
46583
46584
46585
46586
46587
46588
46589
46590
46591
46592
46593
46594
46595
46596
46597
46598
46599
46600
46601
46602
46603
46604
46605
46606
46607    # Execute function body
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
46634
46635
46636
46637
46638
46639
46640
46641
46642
46643
46644
46645
46646
46647
46648
46649
46650
46651
46652
46653
46654
46655
46656    # Execute function body
46657
46658  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46659$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46660  supports=yes
46661
46662  saved_cflags="$CFLAGS"
46663  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
46664  ac_ext=c
46665ac_cpp='$CPP $CPPFLAGS'
46666ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46667ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46668ac_compiler_gnu=$ac_cv_c_compiler_gnu
46669
46670  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46671/* end confdefs.h.  */
46672int i;
46673_ACEOF
46674if ac_fn_c_try_compile "$LINENO"; then :
46675
46676else
46677  supports=no
46678fi
46679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46680  ac_ext=cpp
46681ac_cpp='$CXXCPP $CPPFLAGS'
46682ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46683ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46684ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46685
46686  CFLAGS="$saved_cflags"
46687
46688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46689$as_echo "$supports" >&6; }
46690  if test "x$supports" = "xyes" ; then
46691    :
46692    C_COMP_SUPPORTS="yes"
46693  else
46694    :
46695    C_COMP_SUPPORTS="no"
46696  fi
46697
46698
46699
46700
46701
46702
46703
46704
46705
46706
46707
46708
46709
46710
46711
46712
46713
46714
46715
46716
46717
46718
46719
46720
46721
46722
46723
46724
46725
46726
46727
46728
46729
46730
46731
46732
46733
46734
46735
46736
46737
46738
46739
46740
46741
46742
46743
46744
46745
46746
46747
46748
46749
46750
46751
46752
46753
46754
46755
46756    # Execute function body
46757
46758  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46759$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46760  supports=yes
46761
46762  saved_cxxflags="$CXXFLAGS"
46763  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
46764  ac_ext=cpp
46765ac_cpp='$CXXCPP $CPPFLAGS'
46766ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46767ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46768ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46769
46770  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46771/* end confdefs.h.  */
46772int i;
46773_ACEOF
46774if ac_fn_cxx_try_compile "$LINENO"; then :
46775
46776else
46777  supports=no
46778fi
46779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46780  ac_ext=cpp
46781ac_cpp='$CXXCPP $CPPFLAGS'
46782ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46783ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46784ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46785
46786  CXXFLAGS="$saved_cxxflags"
46787
46788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46789$as_echo "$supports" >&6; }
46790  if test "x$supports" = "xyes" ; then
46791    :
46792    CXX_COMP_SUPPORTS="yes"
46793  else
46794    :
46795    CXX_COMP_SUPPORTS="no"
46796  fi
46797
46798
46799
46800
46801
46802
46803
46804
46805
46806
46807
46808
46809
46810  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46811$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46812  supports=no
46813  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
46814
46815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46816$as_echo "$supports" >&6; }
46817  if test "x$supports" = "xyes" ; then
46818    :
46819    HAS_CFLAG_OPTIMIZE_DEBUG=true
46820  else
46821    :
46822    HAS_CFLAG_OPTIMIZE_DEBUG=false
46823  fi
46824
46825
46826
46827
46828
46829
46830
46831    # "-z relro" supported in GNU binutils 2.17 and later
46832    LINKER_RELRO_FLAG="-Wl,-z,relro"
46833
46834
46835
46836
46837
46838
46839
46840
46841
46842
46843
46844
46845
46846
46847
46848
46849
46850
46851
46852
46853
46854
46855
46856
46857
46858
46859
46860
46861
46862
46863
46864
46865
46866
46867
46868
46869
46870
46871
46872
46873
46874
46875
46876
46877
46878
46879
46880    # Execute function body
46881
46882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
46883$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
46884  supports=yes
46885
46886  saved_ldflags="$LDFLAGS"
46887  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
46888  ac_ext=c
46889ac_cpp='$CPP $CPPFLAGS'
46890ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46891ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46892ac_compiler_gnu=$ac_cv_c_compiler_gnu
46893
46894  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46895/* end confdefs.h.  */
46896
46897int
46898main ()
46899{
46900
46901  ;
46902  return 0;
46903}
46904_ACEOF
46905if ac_fn_c_try_link "$LINENO"; then :
46906
46907else
46908  supports=no
46909fi
46910rm -f core conftest.err conftest.$ac_objext \
46911    conftest$ac_exeext conftest.$ac_ext
46912  ac_ext=cpp
46913ac_cpp='$CXXCPP $CPPFLAGS'
46914ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46915ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46916ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46917
46918  LDFLAGS="$saved_ldflags"
46919
46920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46921$as_echo "$supports" >&6; }
46922  if test "x$supports" = "xyes" ; then
46923    :
46924    HAS_LINKER_RELRO=true
46925  else
46926    :
46927    HAS_LINKER_RELRO=false
46928  fi
46929
46930
46931
46932
46933
46934
46935
46936
46937
46938
46939
46940
46941
46942    # "-z now" supported in GNU binutils 2.11 and later
46943    LINKER_NOW_FLAG="-Wl,-z,now"
46944
46945
46946
46947
46948
46949
46950
46951
46952
46953
46954
46955
46956
46957
46958
46959
46960
46961
46962
46963
46964
46965
46966
46967
46968
46969
46970
46971
46972
46973
46974
46975
46976
46977
46978
46979
46980
46981
46982
46983
46984
46985
46986
46987
46988
46989
46990
46991    # Execute function body
46992
46993  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
46994$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
46995  supports=yes
46996
46997  saved_ldflags="$LDFLAGS"
46998  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
46999  ac_ext=c
47000ac_cpp='$CPP $CPPFLAGS'
47001ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47002ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47003ac_compiler_gnu=$ac_cv_c_compiler_gnu
47004
47005  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47006/* end confdefs.h.  */
47007
47008int
47009main ()
47010{
47011
47012  ;
47013  return 0;
47014}
47015_ACEOF
47016if ac_fn_c_try_link "$LINENO"; then :
47017
47018else
47019  supports=no
47020fi
47021rm -f core conftest.err conftest.$ac_objext \
47022    conftest$ac_exeext conftest.$ac_ext
47023  ac_ext=cpp
47024ac_cpp='$CXXCPP $CPPFLAGS'
47025ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47026ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47027ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47028
47029  LDFLAGS="$saved_ldflags"
47030
47031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47032$as_echo "$supports" >&6; }
47033  if test "x$supports" = "xyes" ; then
47034    :
47035    HAS_LINKER_NOW=true
47036  else
47037    :
47038    HAS_LINKER_NOW=false
47039  fi
47040
47041
47042
47043
47044
47045
47046
47047
47048
47049
47050
47051
47052  fi
47053
47054  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47055  # in executable.'
47056  USING_BROKEN_SUSE_LD=no
47057  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47058    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47059$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47060    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47061    $ECHO "int main() { }" > main.c
47062    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47063      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47064$as_echo "no" >&6; }
47065      USING_BROKEN_SUSE_LD=no
47066    else
47067      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47068$as_echo "yes" >&6; }
47069      USING_BROKEN_SUSE_LD=yes
47070    fi
47071    rm -rf version-script.map main.c a.out
47072  fi
47073
47074
47075  # Setup hotspot lecagy names for toolchains
47076  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47077  if test "x$TOOLCHAIN_TYPE" = xclang; then
47078    HOTSPOT_TOOLCHAIN_TYPE=gcc
47079  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47080    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47081  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47082    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47083  fi
47084
47085
47086
47087# Setup the JTReg Regression Test Harness.
47088
47089
47090# Check whether --with-jtreg was given.
47091if test "${with_jtreg+set}" = set; then :
47092  withval=$with_jtreg;
47093else
47094  with_jtreg=no
47095fi
47096
47097
47098  if test "x$with_jtreg" = xno; then
47099    # jtreg disabled
47100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47101$as_echo_n "checking for jtreg... " >&6; }
47102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47103$as_echo "no" >&6; }
47104  else
47105    if test "x$with_jtreg" != xyes; then
47106      # with path specified.
47107      JT_HOME="$with_jtreg"
47108    fi
47109
47110    if test "x$JT_HOME" != x; then
47111      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47112$as_echo_n "checking for jtreg... " >&6; }
47113
47114      # use JT_HOME enviroment var.
47115
47116  # Only process if variable expands to non-empty
47117
47118  if test "x$JT_HOME" != x; then
47119    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47120
47121  # Input might be given as Windows format, start by converting to
47122  # unix format.
47123  path="$JT_HOME"
47124  new_path=`$CYGPATH -u "$path"`
47125
47126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47129  # "foo.exe" is OK but "foo" is an error.
47130  #
47131  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47132  # It is also a way to make sure we got the proper file name for the real test later on.
47133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47134  if test "x$test_shortpath" = x; then
47135    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47136$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47137    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47138  fi
47139
47140  # Call helper function which possibly converts this using DOS-style short mode.
47141  # If so, the updated path is stored in $new_path.
47142
47143  input_path="$new_path"
47144  # Check if we need to convert this using DOS-style short mode. If the path
47145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47146  # take no chances and rewrite it.
47147  # Note: m4 eats our [], so we need to use [ and ] instead.
47148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47149  if test "x$has_forbidden_chars" != x; then
47150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47154      # Going to short mode and back again did indeed matter. Since short mode is
47155      # case insensitive, let's make it lowercase to improve readability.
47156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47157      # Now convert it back to Unix-style (cygpath)
47158      input_path=`$CYGPATH -u "$shortmode_path"`
47159      new_path="$input_path"
47160    fi
47161  fi
47162
47163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47164  if test "x$test_cygdrive_prefix" = x; then
47165    # As a simple fix, exclude /usr/bin since it's not a real path.
47166    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47168      # a path prefixed by /cygdrive for fixpath to work.
47169      new_path="$CYGWIN_ROOT_PATH$input_path"
47170    fi
47171  fi
47172
47173
47174  if test "x$path" != "x$new_path"; then
47175    JT_HOME="$new_path"
47176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47177$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47178  fi
47179
47180    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47181
47182  path="$JT_HOME"
47183  has_colon=`$ECHO $path | $GREP ^.:`
47184  new_path="$path"
47185  if test "x$has_colon" = x; then
47186    # Not in mixed or Windows style, start by that.
47187    new_path=`cmd //c echo $path`
47188  fi
47189
47190
47191  input_path="$new_path"
47192  # Check if we need to convert this using DOS-style short mode. If the path
47193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47194  # take no chances and rewrite it.
47195  # Note: m4 eats our [], so we need to use [ and ] instead.
47196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47197  if test "x$has_forbidden_chars" != x; then
47198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47200  fi
47201
47202
47203  windows_path="$new_path"
47204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47205    unix_path=`$CYGPATH -u "$windows_path"`
47206    new_path="$unix_path"
47207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47209    new_path="$unix_path"
47210  fi
47211
47212  if test "x$path" != "x$new_path"; then
47213    JT_HOME="$new_path"
47214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47215$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47216  fi
47217
47218  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47219  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47220
47221    else
47222      # We're on a unix platform. Hooray! :)
47223      path="$JT_HOME"
47224      has_space=`$ECHO "$path" | $GREP " "`
47225      if test "x$has_space" != x; then
47226        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47227$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47228        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47229      fi
47230
47231      # Use eval to expand a potential ~
47232      eval path="$path"
47233      if test ! -f "$path" && test ! -d "$path"; then
47234        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47235      fi
47236
47237      if test -d "$path"; then
47238        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47239      else
47240        dir="`$DIRNAME "$path"`"
47241        base="`$BASENAME "$path"`"
47242        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47243      fi
47244    fi
47245  fi
47246
47247
47248      # jtreg win32 script works for everybody
47249      JTREGEXE="$JT_HOME/bin/jtreg"
47250
47251      if test ! -f "$JTREGEXE"; then
47252        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47253      fi
47254
47255      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47256$as_echo "$JTREGEXE" >&6; }
47257    else
47258      # try to find jtreg on path
47259
47260
47261
47262  # Publish this variable in the help.
47263
47264
47265  if [ -z "${JTREGEXE+x}" ]; then
47266    # The variable is not set by user, try to locate tool using the code snippet
47267    for ac_prog in jtreg
47268do
47269  # Extract the first word of "$ac_prog", so it can be a program name with args.
47270set dummy $ac_prog; ac_word=$2
47271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47272$as_echo_n "checking for $ac_word... " >&6; }
47273if ${ac_cv_path_JTREGEXE+:} false; then :
47274  $as_echo_n "(cached) " >&6
47275else
47276  case $JTREGEXE in
47277  [\\/]* | ?:[\\/]*)
47278  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47279  ;;
47280  *)
47281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47282for as_dir in $PATH
47283do
47284  IFS=$as_save_IFS
47285  test -z "$as_dir" && as_dir=.
47286    for ac_exec_ext in '' $ac_executable_extensions; do
47287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47288    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47290    break 2
47291  fi
47292done
47293  done
47294IFS=$as_save_IFS
47295
47296  ;;
47297esac
47298fi
47299JTREGEXE=$ac_cv_path_JTREGEXE
47300if test -n "$JTREGEXE"; then
47301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47302$as_echo "$JTREGEXE" >&6; }
47303else
47304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47305$as_echo "no" >&6; }
47306fi
47307
47308
47309  test -n "$JTREGEXE" && break
47310done
47311
47312  else
47313    # The variable is set, but is it from the command line or the environment?
47314
47315    # Try to remove the string !JTREGEXE! from our list.
47316    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
47317    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47318      # If it failed, the variable was not from the command line. Ignore it,
47319      # but warn the user (except for BASH, which is always set by the calling BASH).
47320      if test "xJTREGEXE" != xBASH; then
47321        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
47322$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
47323      fi
47324      # Try to locate tool using the code snippet
47325      for ac_prog in jtreg
47326do
47327  # Extract the first word of "$ac_prog", so it can be a program name with args.
47328set dummy $ac_prog; ac_word=$2
47329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47330$as_echo_n "checking for $ac_word... " >&6; }
47331if ${ac_cv_path_JTREGEXE+:} false; then :
47332  $as_echo_n "(cached) " >&6
47333else
47334  case $JTREGEXE in
47335  [\\/]* | ?:[\\/]*)
47336  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47337  ;;
47338  *)
47339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47340for as_dir in $PATH
47341do
47342  IFS=$as_save_IFS
47343  test -z "$as_dir" && as_dir=.
47344    for ac_exec_ext in '' $ac_executable_extensions; do
47345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47346    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47348    break 2
47349  fi
47350done
47351  done
47352IFS=$as_save_IFS
47353
47354  ;;
47355esac
47356fi
47357JTREGEXE=$ac_cv_path_JTREGEXE
47358if test -n "$JTREGEXE"; then
47359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47360$as_echo "$JTREGEXE" >&6; }
47361else
47362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47363$as_echo "no" >&6; }
47364fi
47365
47366
47367  test -n "$JTREGEXE" && break
47368done
47369
47370    else
47371      # If it succeeded, then it was overridden by the user. We will use it
47372      # for the tool.
47373
47374      # First remove it from the list of overridden variables, so we can test
47375      # for unknown variables in the end.
47376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47377
47378      # Check if we try to supply an empty value
47379      if test "x$JTREGEXE" = x; then
47380        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
47381$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
47382        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47383$as_echo_n "checking for JTREGEXE... " >&6; }
47384        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47385$as_echo "disabled" >&6; }
47386      else
47387        # Check if the provided tool contains a complete path.
47388        tool_specified="$JTREGEXE"
47389        tool_basename="${tool_specified##*/}"
47390        if test "x$tool_basename" = "x$tool_specified"; then
47391          # A command without a complete path is provided, search $PATH.
47392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
47393$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
47394          # Extract the first word of "$tool_basename", so it can be a program name with args.
47395set dummy $tool_basename; ac_word=$2
47396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47397$as_echo_n "checking for $ac_word... " >&6; }
47398if ${ac_cv_path_JTREGEXE+:} false; then :
47399  $as_echo_n "(cached) " >&6
47400else
47401  case $JTREGEXE in
47402  [\\/]* | ?:[\\/]*)
47403  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47404  ;;
47405  *)
47406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47407for as_dir in $PATH
47408do
47409  IFS=$as_save_IFS
47410  test -z "$as_dir" && as_dir=.
47411    for ac_exec_ext in '' $ac_executable_extensions; do
47412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47413    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47415    break 2
47416  fi
47417done
47418  done
47419IFS=$as_save_IFS
47420
47421  ;;
47422esac
47423fi
47424JTREGEXE=$ac_cv_path_JTREGEXE
47425if test -n "$JTREGEXE"; then
47426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47427$as_echo "$JTREGEXE" >&6; }
47428else
47429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47430$as_echo "no" >&6; }
47431fi
47432
47433
47434          if test "x$JTREGEXE" = x; then
47435            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47436          fi
47437        else
47438          # Otherwise we believe it is a complete path. Use it as it is.
47439          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
47440$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
47441          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47442$as_echo_n "checking for JTREGEXE... " >&6; }
47443          if test ! -x "$tool_specified"; then
47444            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47445$as_echo "not found" >&6; }
47446            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
47447          fi
47448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47449$as_echo "$tool_specified" >&6; }
47450        fi
47451      fi
47452    fi
47453
47454  fi
47455
47456
47457
47458  if test "x$JTREGEXE" = x; then
47459    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
47460  fi
47461
47462
47463      JT_HOME="`$DIRNAME $JTREGEXE`"
47464    fi
47465  fi
47466
47467
47468
47469
47470
47471
47472  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
47473  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
47474  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
47475  #                              commands produced by the link step (currently AIX only)
47476  if test "x$TOOLCHAIN_TYPE" = xxlc; then
47477    COMPILER_TARGET_BITS_FLAG="-q"
47478    COMPILER_COMMAND_FILE_FLAG="-f"
47479    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
47480  else
47481    COMPILER_TARGET_BITS_FLAG="-m"
47482    COMPILER_COMMAND_FILE_FLAG="@"
47483    COMPILER_BINDCMD_FILE_FLAG=""
47484
47485    # The solstudio linker does not support @-files.
47486    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47487      COMPILER_COMMAND_FILE_FLAG=
47488    fi
47489
47490    # Check if @file is supported by gcc
47491    if test "x$TOOLCHAIN_TYPE" = xgcc; then
47492      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
47493$as_echo_n "checking if @file is supported by gcc... " >&6; }
47494      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
47495      $ECHO "" "--version" > command.file
47496      if $CXX @command.file 2>&5 >&5; then
47497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47498$as_echo "yes" >&6; }
47499        COMPILER_COMMAND_FILE_FLAG="@"
47500      else
47501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47502$as_echo "no" >&6; }
47503        COMPILER_COMMAND_FILE_FLAG=
47504      fi
47505      rm -rf command.file
47506    fi
47507  fi
47508
47509
47510
47511
47512  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
47513  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47514    ARFLAGS="-r"
47515  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47516    ARFLAGS="-X64"
47517  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
47518    # lib.exe is used as AR to create static libraries.
47519    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
47520  else
47521    ARFLAGS=""
47522  fi
47523
47524
47525  ## Setup strip.
47526  # FIXME: should this really be per platform, or should it be per toolchain type?
47527  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
47528  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
47529  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47530    STRIPFLAGS="-g"
47531  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
47532    STRIPFLAGS="-x"
47533  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
47534    STRIPFLAGS="-S"
47535  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47536    STRIPFLAGS="-X32_64"
47537  fi
47538
47539
47540
47541  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47542    CC_OUT_OPTION=-Fo
47543    EXE_OUT_OPTION=-out:
47544    LD_OUT_OPTION=-out:
47545    AR_OUT_OPTION=-out:
47546  else
47547    # The option used to specify the target .o,.a or .so file.
47548    # When compiling, how to specify the to be created object file.
47549    CC_OUT_OPTION='-o$(SPACE)'
47550    # When linking, how to specify the to be created executable.
47551    EXE_OUT_OPTION='-o$(SPACE)'
47552    # When linking, how to specify the to be created dynamically linkable library.
47553    LD_OUT_OPTION='-o$(SPACE)'
47554    # When archiving, how to specify the to be create static archive for object files.
47555    AR_OUT_OPTION='rcs$(SPACE)'
47556  fi
47557
47558
47559
47560
47561
47562  # On Windows, we need to set RC flags.
47563  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47564    RC_FLAGS="-nologo -l0x409"
47565    JVM_RCFLAGS="-nologo"
47566    if test "x$DEBUG_LEVEL" = xrelease; then
47567      RC_FLAGS="$RC_FLAGS -DNDEBUG"
47568      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
47569    fi
47570
47571    # The version variables used to create RC_FLAGS may be overridden
47572    # in a custom configure script, or possibly the command line.
47573    # Let those variables be expanded at make time in spec.gmk.
47574    # The \$ are escaped to the shell, and the $(...) variables
47575    # are evaluated by make.
47576    RC_FLAGS="$RC_FLAGS \
47577        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
47578        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
47579        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
47580        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
47581        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
47582        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
47583        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
47584
47585    JVM_RCFLAGS="$JVM_RCFLAGS \
47586        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
47587        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
47588        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
47589        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
47590        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
47591        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
47592        -D\"HS_FNAME=jvm.dll\" \
47593        -D\"HS_INTERNAL_NAME=jvm\""
47594  fi
47595
47596
47597
47598  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47599    # silence copyright notice and other headers.
47600    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
47601  fi
47602
47603
47604# Now we can test some aspects on the target using configure macros.
47605
47606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
47607$as_echo_n "checking for ANSI C header files... " >&6; }
47608if ${ac_cv_header_stdc+:} false; then :
47609  $as_echo_n "(cached) " >&6
47610else
47611  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47612/* end confdefs.h.  */
47613#include <stdlib.h>
47614#include <stdarg.h>
47615#include <string.h>
47616#include <float.h>
47617
47618int
47619main ()
47620{
47621
47622  ;
47623  return 0;
47624}
47625_ACEOF
47626if ac_fn_cxx_try_compile "$LINENO"; then :
47627  ac_cv_header_stdc=yes
47628else
47629  ac_cv_header_stdc=no
47630fi
47631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47632
47633if test $ac_cv_header_stdc = yes; then
47634  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
47635  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47636/* end confdefs.h.  */
47637#include <string.h>
47638
47639_ACEOF
47640if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47641  $EGREP "memchr" >/dev/null 2>&1; then :
47642
47643else
47644  ac_cv_header_stdc=no
47645fi
47646rm -f conftest*
47647
47648fi
47649
47650if test $ac_cv_header_stdc = yes; then
47651  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
47652  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47653/* end confdefs.h.  */
47654#include <stdlib.h>
47655
47656_ACEOF
47657if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47658  $EGREP "free" >/dev/null 2>&1; then :
47659
47660else
47661  ac_cv_header_stdc=no
47662fi
47663rm -f conftest*
47664
47665fi
47666
47667if test $ac_cv_header_stdc = yes; then
47668  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
47669  if test "$cross_compiling" = yes; then :
47670  :
47671else
47672  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47673/* end confdefs.h.  */
47674#include <ctype.h>
47675#include <stdlib.h>
47676#if ((' ' & 0x0FF) == 0x020)
47677# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
47678# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
47679#else
47680# define ISLOWER(c) \
47681		   (('a' <= (c) && (c) <= 'i') \
47682		     || ('j' <= (c) && (c) <= 'r') \
47683		     || ('s' <= (c) && (c) <= 'z'))
47684# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
47685#endif
47686
47687#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
47688int
47689main ()
47690{
47691  int i;
47692  for (i = 0; i < 256; i++)
47693    if (XOR (islower (i), ISLOWER (i))
47694	|| toupper (i) != TOUPPER (i))
47695      return 2;
47696  return 0;
47697}
47698_ACEOF
47699if ac_fn_cxx_try_run "$LINENO"; then :
47700
47701else
47702  ac_cv_header_stdc=no
47703fi
47704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47705  conftest.$ac_objext conftest.beam conftest.$ac_ext
47706fi
47707
47708fi
47709fi
47710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
47711$as_echo "$ac_cv_header_stdc" >&6; }
47712if test $ac_cv_header_stdc = yes; then
47713
47714$as_echo "#define STDC_HEADERS 1" >>confdefs.h
47715
47716fi
47717
47718# On IRIX 5.3, sys/types and inttypes.h are conflicting.
47719for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
47720		  inttypes.h stdint.h unistd.h
47721do :
47722  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47723ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
47724"
47725if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47726  cat >>confdefs.h <<_ACEOF
47727#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47728_ACEOF
47729
47730fi
47731
47732done
47733
47734
47735
47736  ###############################################################################
47737  #
47738  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
47739  # (The JVM can use 32 or 64 bit Java pointers but that decision
47740  # is made at runtime.)
47741  #
47742
47743  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
47744    # Always specify -m flag on Solaris
47745    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
47746
47747  # When we add flags to the "official" CFLAGS etc, we need to
47748  # keep track of these additions in ADDED_CFLAGS etc. These
47749  # will later be checked to make sure only controlled additions
47750  # have been made to CFLAGS etc.
47751  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47752  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47753  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47754
47755  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47756  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47757  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47758
47759  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47760  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47761  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47762
47763  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47764  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47765  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47766
47767  elif test "x$COMPILE_TYPE" = xreduced; then
47768    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
47769      # Specify -m if running reduced on unix platforms
47770
47771  # When we add flags to the "official" CFLAGS etc, we need to
47772  # keep track of these additions in ADDED_CFLAGS etc. These
47773  # will later be checked to make sure only controlled additions
47774  # have been made to CFLAGS etc.
47775  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47776  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47777  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47778
47779  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47780  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47781  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47782
47783  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47784  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47785  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47786
47787  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47788  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47789  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47790
47791    fi
47792  fi
47793  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47794    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47795    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47796    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47797  fi
47798
47799  # Make compilation sanity check
47800  for ac_header in stdio.h
47801do :
47802  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
47803if test "x$ac_cv_header_stdio_h" = xyes; then :
47804  cat >>confdefs.h <<_ACEOF
47805#define HAVE_STDIO_H 1
47806_ACEOF
47807
47808else
47809
47810    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
47811$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
47812    if test "x$COMPILE_TYPE" = xreduced; then
47813
47814  # Print a helpful message on how to acquire the necessary build dependency.
47815  # reduced is the help tag: freetype, cups, alsa etc
47816  MISSING_DEPENDENCY=reduced
47817
47818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47819    cygwin_help $MISSING_DEPENDENCY
47820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47821    msys_help $MISSING_DEPENDENCY
47822  else
47823    PKGHANDLER_COMMAND=
47824
47825    case $PKGHANDLER in
47826      apt-get)
47827        apt_help     $MISSING_DEPENDENCY ;;
47828      yum)
47829        yum_help     $MISSING_DEPENDENCY ;;
47830      port)
47831        port_help    $MISSING_DEPENDENCY ;;
47832      pkgutil)
47833        pkgutil_help $MISSING_DEPENDENCY ;;
47834      pkgadd)
47835        pkgadd_help  $MISSING_DEPENDENCY ;;
47836    esac
47837
47838    if test "x$PKGHANDLER_COMMAND" != x; then
47839      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47840    fi
47841  fi
47842
47843      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
47844$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
47845    elif test "x$COMPILE_TYPE" = xcross; then
47846      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
47847$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
47848    fi
47849    as_fn_error $? "Cannot continue." "$LINENO" 5
47850
47851fi
47852
47853done
47854
47855
47856  # The cast to long int works around a bug in the HP C Compiler
47857# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47858# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47859# This bug is HP SR number 8606223364.
47860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47861$as_echo_n "checking size of int *... " >&6; }
47862if ${ac_cv_sizeof_int_p+:} false; then :
47863  $as_echo_n "(cached) " >&6
47864else
47865  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47866
47867else
47868  if test "$ac_cv_type_int_p" = yes; then
47869     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47871as_fn_error 77 "cannot compute sizeof (int *)
47872See \`config.log' for more details" "$LINENO" 5; }
47873   else
47874     ac_cv_sizeof_int_p=0
47875   fi
47876fi
47877
47878fi
47879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47880$as_echo "$ac_cv_sizeof_int_p" >&6; }
47881
47882
47883
47884cat >>confdefs.h <<_ACEOF
47885#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47886_ACEOF
47887
47888
47889
47890  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
47891  if test "x$ac_cv_sizeof_int_p" = x; then
47892    # The test failed, lets stick to the assumed value.
47893    { $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
47894$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
47895  else
47896    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47897
47898    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47899      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
47900      # Let's try to implicitely set the compilers target architecture and retry the test
47901      { $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
47902$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;}
47903      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
47904$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
47905
47906  # When we add flags to the "official" CFLAGS etc, we need to
47907  # keep track of these additions in ADDED_CFLAGS etc. These
47908  # will later be checked to make sure only controlled additions
47909  # have been made to CFLAGS etc.
47910  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47911  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47912  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47913
47914  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47915  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47916  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47917
47918  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47919  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47920  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47921
47922  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47923  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47924  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47925
47926
47927      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
47928      unset ac_cv_sizeof_int_p
47929      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
47930      cat >>confdefs.h <<_ACEOF
47931#undef SIZEOF_INT_P
47932_ACEOF
47933
47934      # The cast to long int works around a bug in the HP C Compiler
47935# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47936# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47937# This bug is HP SR number 8606223364.
47938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47939$as_echo_n "checking size of int *... " >&6; }
47940if ${ac_cv_sizeof_int_p+:} false; then :
47941  $as_echo_n "(cached) " >&6
47942else
47943  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47944
47945else
47946  if test "$ac_cv_type_int_p" = yes; then
47947     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47948$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47949as_fn_error 77 "cannot compute sizeof (int *)
47950See \`config.log' for more details" "$LINENO" 5; }
47951   else
47952     ac_cv_sizeof_int_p=0
47953   fi
47954fi
47955
47956fi
47957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47958$as_echo "$ac_cv_sizeof_int_p" >&6; }
47959
47960
47961
47962cat >>confdefs.h <<_ACEOF
47963#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47964_ACEOF
47965
47966
47967
47968      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47969
47970      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47971        { $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
47972$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;}
47973        if test "x$COMPILE_TYPE" = xreduced; then
47974
47975  # Print a helpful message on how to acquire the necessary build dependency.
47976  # reduced is the help tag: freetype, cups, alsa etc
47977  MISSING_DEPENDENCY=reduced
47978
47979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47980    cygwin_help $MISSING_DEPENDENCY
47981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47982    msys_help $MISSING_DEPENDENCY
47983  else
47984    PKGHANDLER_COMMAND=
47985
47986    case $PKGHANDLER in
47987      apt-get)
47988        apt_help     $MISSING_DEPENDENCY ;;
47989      yum)
47990        yum_help     $MISSING_DEPENDENCY ;;
47991      port)
47992        port_help    $MISSING_DEPENDENCY ;;
47993      pkgutil)
47994        pkgutil_help $MISSING_DEPENDENCY ;;
47995      pkgadd)
47996        pkgadd_help  $MISSING_DEPENDENCY ;;
47997    esac
47998
47999    if test "x$PKGHANDLER_COMMAND" != x; then
48000      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48001    fi
48002  fi
48003
48004          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48005$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48006        elif test "x$COMPILE_TYPE" = xcross; then
48007          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48008$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48009        fi
48010        as_fn_error $? "Cannot continue." "$LINENO" 5
48011      fi
48012    fi
48013  fi
48014
48015  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48016$as_echo_n "checking for target address size... " >&6; }
48017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48018$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48019
48020
48021  ###############################################################################
48022  #
48023  # Is the target little of big endian?
48024  #
48025   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48026$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48027if ${ac_cv_c_bigendian+:} false; then :
48028  $as_echo_n "(cached) " >&6
48029else
48030  ac_cv_c_bigendian=unknown
48031    # See if we're dealing with a universal compiler.
48032    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48033/* end confdefs.h.  */
48034#ifndef __APPLE_CC__
48035	       not a universal capable compiler
48036	     #endif
48037	     typedef int dummy;
48038
48039_ACEOF
48040if ac_fn_cxx_try_compile "$LINENO"; then :
48041
48042	# Check for potential -arch flags.  It is not universal unless
48043	# there are at least two -arch flags with different values.
48044	ac_arch=
48045	ac_prev=
48046	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48047	 if test -n "$ac_prev"; then
48048	   case $ac_word in
48049	     i?86 | x86_64 | ppc | ppc64)
48050	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48051		 ac_arch=$ac_word
48052	       else
48053		 ac_cv_c_bigendian=universal
48054		 break
48055	       fi
48056	       ;;
48057	   esac
48058	   ac_prev=
48059	 elif test "x$ac_word" = "x-arch"; then
48060	   ac_prev=arch
48061	 fi
48062       done
48063fi
48064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48065    if test $ac_cv_c_bigendian = unknown; then
48066      # See if sys/param.h defines the BYTE_ORDER macro.
48067      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48068/* end confdefs.h.  */
48069#include <sys/types.h>
48070	     #include <sys/param.h>
48071
48072int
48073main ()
48074{
48075#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48076		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48077		     && LITTLE_ENDIAN)
48078	      bogus endian macros
48079	     #endif
48080
48081  ;
48082  return 0;
48083}
48084_ACEOF
48085if ac_fn_cxx_try_compile "$LINENO"; then :
48086  # It does; now see whether it defined to BIG_ENDIAN or not.
48087	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48088/* end confdefs.h.  */
48089#include <sys/types.h>
48090		#include <sys/param.h>
48091
48092int
48093main ()
48094{
48095#if BYTE_ORDER != BIG_ENDIAN
48096		 not big endian
48097		#endif
48098
48099  ;
48100  return 0;
48101}
48102_ACEOF
48103if ac_fn_cxx_try_compile "$LINENO"; then :
48104  ac_cv_c_bigendian=yes
48105else
48106  ac_cv_c_bigendian=no
48107fi
48108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48109fi
48110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48111    fi
48112    if test $ac_cv_c_bigendian = unknown; then
48113      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48114      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48115/* end confdefs.h.  */
48116#include <limits.h>
48117
48118int
48119main ()
48120{
48121#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48122	      bogus endian macros
48123	     #endif
48124
48125  ;
48126  return 0;
48127}
48128_ACEOF
48129if ac_fn_cxx_try_compile "$LINENO"; then :
48130  # It does; now see whether it defined to _BIG_ENDIAN or not.
48131	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48132/* end confdefs.h.  */
48133#include <limits.h>
48134
48135int
48136main ()
48137{
48138#ifndef _BIG_ENDIAN
48139		 not big endian
48140		#endif
48141
48142  ;
48143  return 0;
48144}
48145_ACEOF
48146if ac_fn_cxx_try_compile "$LINENO"; then :
48147  ac_cv_c_bigendian=yes
48148else
48149  ac_cv_c_bigendian=no
48150fi
48151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48152fi
48153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48154    fi
48155    if test $ac_cv_c_bigendian = unknown; then
48156      # Compile a test program.
48157      if test "$cross_compiling" = yes; then :
48158  # Try to guess by grepping values from an object file.
48159	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48160/* end confdefs.h.  */
48161short int ascii_mm[] =
48162		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48163		short int ascii_ii[] =
48164		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48165		int use_ascii (int i) {
48166		  return ascii_mm[i] + ascii_ii[i];
48167		}
48168		short int ebcdic_ii[] =
48169		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48170		short int ebcdic_mm[] =
48171		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48172		int use_ebcdic (int i) {
48173		  return ebcdic_mm[i] + ebcdic_ii[i];
48174		}
48175		extern int foo;
48176
48177int
48178main ()
48179{
48180return use_ascii (foo) == use_ebcdic (foo);
48181  ;
48182  return 0;
48183}
48184_ACEOF
48185if ac_fn_cxx_try_compile "$LINENO"; then :
48186  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48187	      ac_cv_c_bigendian=yes
48188	    fi
48189	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48190	      if test "$ac_cv_c_bigendian" = unknown; then
48191		ac_cv_c_bigendian=no
48192	      else
48193		# finding both strings is unlikely to happen, but who knows?
48194		ac_cv_c_bigendian=unknown
48195	      fi
48196	    fi
48197fi
48198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48199else
48200  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48201/* end confdefs.h.  */
48202$ac_includes_default
48203int
48204main ()
48205{
48206
48207	     /* Are we little or big endian?  From Harbison&Steele.  */
48208	     union
48209	     {
48210	       long int l;
48211	       char c[sizeof (long int)];
48212	     } u;
48213	     u.l = 1;
48214	     return u.c[sizeof (long int) - 1] == 1;
48215
48216  ;
48217  return 0;
48218}
48219_ACEOF
48220if ac_fn_cxx_try_run "$LINENO"; then :
48221  ac_cv_c_bigendian=no
48222else
48223  ac_cv_c_bigendian=yes
48224fi
48225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48226  conftest.$ac_objext conftest.beam conftest.$ac_ext
48227fi
48228
48229    fi
48230fi
48231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48232$as_echo "$ac_cv_c_bigendian" >&6; }
48233 case $ac_cv_c_bigendian in #(
48234   yes)
48235     ENDIAN="big";; #(
48236   no)
48237     ENDIAN="little" ;; #(
48238   universal)
48239     ENDIAN="universal_endianness"
48240     ;; #(
48241   *)
48242     ENDIAN="unknown" ;;
48243 esac
48244
48245
48246  if test "x$ENDIAN" = xuniversal_endianness; then
48247    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48248  fi
48249  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48250    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
48251  fi
48252
48253
48254# Configure flags for the tools
48255
48256  ###############################################################################
48257  #
48258  # How to compile shared libraries.
48259  #
48260
48261  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48262    PICFLAG="-fPIC"
48263    C_FLAG_REORDER=''
48264    CXX_FLAG_REORDER=''
48265
48266    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48267      # Linking is different on MacOSX
48268      if test "x$STATIC_BUILD" = xtrue; then
48269        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
48270      else
48271        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48272        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48273      fi
48274      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48275      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48276      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48277      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48278    else
48279      # Default works for linux, might work on other platforms as well.
48280      SHARED_LIBRARY_FLAGS='-shared'
48281      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48282      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48283      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48284      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48285    fi
48286  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48287    C_FLAG_REORDER=''
48288    CXX_FLAG_REORDER=''
48289
48290    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48291      # Linking is different on MacOSX
48292      PICFLAG=''
48293      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48294      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48295      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48296      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48297      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48298
48299      if test "x$STATIC_BUILD" = xfalse; then
48300        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
48301      fi
48302    else
48303      # Default works for linux, might work on other platforms as well.
48304      PICFLAG='-fPIC'
48305      SHARED_LIBRARY_FLAGS='-shared'
48306      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48307      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48308      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48309      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48310    fi
48311  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48312    PICFLAG="-KPIC"
48313    C_FLAG_REORDER='-xF'
48314    CXX_FLAG_REORDER='-xF'
48315    SHARED_LIBRARY_FLAGS="-G"
48316    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
48317    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48318    SET_SHARED_LIBRARY_NAME='-h $1'
48319    SET_SHARED_LIBRARY_MAPFILE='-M$1'
48320  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48321    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
48322    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
48323    # will have to patch this single instruction with a call to some out-of-order code which
48324    # does the load from the TOC. This is of course slow. But in that case we also would have
48325    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
48326    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
48327    # can be patched directly by the linker and does not require a jump to out-of-order code.
48328    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
48329    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
48330    # loads for accessing a global variable). But there are rumors that this may be seen as a
48331    # 'performance feature' because of improved code locality of the symbols used in a
48332    # compilation unit.
48333    PICFLAG="-qpic"
48334    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48335    C_FLAG_REORDER=''
48336    CXX_FLAG_REORDER=''
48337    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
48338    SET_EXECUTABLE_ORIGIN=""
48339    SET_SHARED_LIBRARY_ORIGIN=''
48340    SET_SHARED_LIBRARY_NAME=''
48341    SET_SHARED_LIBRARY_MAPFILE=''
48342  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48343    PICFLAG=""
48344    C_FLAG_REORDER=''
48345    CXX_FLAG_REORDER=''
48346    SHARED_LIBRARY_FLAGS="-dll"
48347    SET_EXECUTABLE_ORIGIN=''
48348    SET_SHARED_LIBRARY_ORIGIN=''
48349    SET_SHARED_LIBRARY_NAME=''
48350    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
48351  fi
48352
48353
48354
48355
48356
48357
48358
48359
48360
48361  # The (cross) compiler is now configured, we can now test capabilities
48362  # of the target platform.
48363
48364
48365
48366  ###############################################################################
48367  #
48368  # Setup the opt flags for different compilers
48369  # and different operating systems.
48370  #
48371
48372  # FIXME: this was indirectly the old default, but just inherited.
48373  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48374  #   C_FLAG_DEPS="-MMD -MF"
48375  # fi
48376
48377  # Generate make dependency files
48378  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48379    C_FLAG_DEPS="-MMD -MF"
48380  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48381    C_FLAG_DEPS="-MMD -MF"
48382  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48383    C_FLAG_DEPS="-xMMD -xMF"
48384  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48385    C_FLAG_DEPS="-qmakedep=gcc -MF"
48386  fi
48387  CXX_FLAG_DEPS="$C_FLAG_DEPS"
48388
48389
48390
48391  # Debug symbols
48392  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48393    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
48394      # reduce from default "-g2" option to save space
48395      CFLAGS_DEBUG_SYMBOLS="-g1"
48396      CXXFLAGS_DEBUG_SYMBOLS="-g1"
48397    else
48398      CFLAGS_DEBUG_SYMBOLS="-g"
48399      CXXFLAGS_DEBUG_SYMBOLS="-g"
48400    fi
48401  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48402    CFLAGS_DEBUG_SYMBOLS="-g"
48403    CXXFLAGS_DEBUG_SYMBOLS="-g"
48404  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48405    CFLAGS_DEBUG_SYMBOLS="-g -xs"
48406    # -g0 enables debug symbols without disabling inlining.
48407    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
48408  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48409    CFLAGS_DEBUG_SYMBOLS="-g"
48410    CXXFLAGS_DEBUG_SYMBOLS="-g"
48411  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48412    CFLAGS_DEBUG_SYMBOLS="-Zi"
48413    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
48414  fi
48415
48416
48417
48418  # Debug symbols for JVM_CFLAGS
48419  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48420    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
48421    if test "x$DEBUG_LEVEL" = xslowdebug; then
48422      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48423    else
48424      # -g0 does not disable inlining, which -g does.
48425      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
48426    fi
48427  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48428    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
48429  else
48430    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48431  fi
48432
48433
48434  # bounds, memory and behavior checking options
48435  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48436    case $DEBUG_LEVEL in
48437    release )
48438      # no adjustment
48439      ;;
48440    fastdebug )
48441      # no adjustment
48442      ;;
48443    slowdebug )
48444      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
48445      # get's added conditionally on whether we produce debug symbols or not.
48446      # This is most likely not really correct.
48447
48448      # Add runtime stack smashing and undefined behavior checks.
48449      # Not all versions of gcc support -fstack-protector
48450      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
48451
48452
48453
48454
48455
48456
48457
48458
48459
48460
48461
48462
48463
48464
48465
48466
48467
48468
48469
48470
48471
48472
48473
48474
48475
48476
48477
48478
48479
48480
48481
48482
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493    # Execute function body
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
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530
48531
48532
48533
48534
48535
48536
48537
48538
48539
48540
48541
48542    # Execute function body
48543
48544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48545$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48546  supports=yes
48547
48548  saved_cflags="$CFLAGS"
48549  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
48550  ac_ext=c
48551ac_cpp='$CPP $CPPFLAGS'
48552ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48553ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48554ac_compiler_gnu=$ac_cv_c_compiler_gnu
48555
48556  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48557/* end confdefs.h.  */
48558int i;
48559_ACEOF
48560if ac_fn_c_try_compile "$LINENO"; then :
48561
48562else
48563  supports=no
48564fi
48565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48566  ac_ext=cpp
48567ac_cpp='$CXXCPP $CPPFLAGS'
48568ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48569ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48570ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48571
48572  CFLAGS="$saved_cflags"
48573
48574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48575$as_echo "$supports" >&6; }
48576  if test "x$supports" = "xyes" ; then
48577    :
48578    C_COMP_SUPPORTS="yes"
48579  else
48580    :
48581    C_COMP_SUPPORTS="no"
48582  fi
48583
48584
48585
48586
48587
48588
48589
48590
48591
48592
48593
48594
48595
48596
48597
48598
48599
48600
48601
48602
48603
48604
48605
48606
48607
48608
48609
48610
48611
48612
48613
48614
48615
48616
48617
48618
48619
48620
48621
48622
48623
48624
48625
48626
48627
48628
48629
48630
48631
48632
48633
48634
48635
48636
48637
48638
48639
48640
48641
48642    # Execute function body
48643
48644  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48645$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48646  supports=yes
48647
48648  saved_cxxflags="$CXXFLAGS"
48649  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
48650  ac_ext=cpp
48651ac_cpp='$CXXCPP $CPPFLAGS'
48652ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48653ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48654ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48655
48656  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48657/* end confdefs.h.  */
48658int i;
48659_ACEOF
48660if ac_fn_cxx_try_compile "$LINENO"; then :
48661
48662else
48663  supports=no
48664fi
48665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48666  ac_ext=cpp
48667ac_cpp='$CXXCPP $CPPFLAGS'
48668ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48669ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48670ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48671
48672  CXXFLAGS="$saved_cxxflags"
48673
48674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48675$as_echo "$supports" >&6; }
48676  if test "x$supports" = "xyes" ; then
48677    :
48678    CXX_COMP_SUPPORTS="yes"
48679  else
48680    :
48681    CXX_COMP_SUPPORTS="no"
48682  fi
48683
48684
48685
48686
48687
48688
48689
48690
48691
48692
48693
48694
48695
48696  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48697$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48698  supports=no
48699  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48700
48701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48702$as_echo "$supports" >&6; }
48703  if test "x$supports" = "xyes" ; then
48704    :
48705
48706  else
48707    :
48708    STACK_PROTECTOR_CFLAG=""
48709  fi
48710
48711
48712
48713
48714
48715
48716
48717      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48718      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48719      if test "x$STACK_PROTECTOR_CFLAG" != x; then
48720        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48721      fi
48722      ;;
48723    esac
48724  fi
48725
48726  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48727    if test "x$DEBUG_LEVEL" != xrelease; then
48728      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
48729        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
48730      fi
48731    fi
48732  fi
48733
48734  # Optimization levels
48735  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48736    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
48737
48738    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
48739      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
48740      C_O_FLAG_HIGHEST_JVM="-xO4"
48741      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
48742      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
48743      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
48744      C_O_FLAG_DEBUG="-xregs=no%frameptr"
48745      C_O_FLAG_DEBUG_JVM=""
48746      C_O_FLAG_NONE="-xregs=no%frameptr"
48747      CXX_O_FLAG_HIGHEST_JVM="-xO4"
48748      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
48749      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
48750      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
48751      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
48752      CXX_O_FLAG_DEBUG_JVM=""
48753      CXX_O_FLAG_NONE="-xregs=no%frameptr"
48754      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
48755        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
48756        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
48757      fi
48758    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48759      C_O_FLAG_HIGHEST_JVM="-xO4"
48760      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
48761      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48762      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48763      C_O_FLAG_DEBUG=""
48764      C_O_FLAG_DEBUG_JVM=""
48765      C_O_FLAG_NONE=""
48766      CXX_O_FLAG_HIGHEST_JVM="-xO4"
48767      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
48768      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48769      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48770      CXX_O_FLAG_DEBUG=""
48771      CXX_O_FLAG_DEBUG_JVM=""
48772      CXX_O_FLAG_NONE=""
48773    fi
48774  else
48775    # The remaining toolchains share opt flags between CC and CXX;
48776    # setup for C and duplicate afterwards.
48777    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48778      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48779        # On MacOSX we optimize for size, something
48780        # we should do for all platforms?
48781        C_O_FLAG_HIGHEST_JVM="-Os"
48782        C_O_FLAG_HIGHEST="-Os"
48783        C_O_FLAG_HI="-Os"
48784        C_O_FLAG_NORM="-Os"
48785        C_O_FLAG_SIZE="-Os"
48786      else
48787        C_O_FLAG_HIGHEST_JVM="-O3"
48788        C_O_FLAG_HIGHEST="-O3"
48789        C_O_FLAG_HI="-O3"
48790        C_O_FLAG_NORM="-O2"
48791        C_O_FLAG_SIZE="-Os"
48792      fi
48793      C_O_FLAG_DEBUG="-O0"
48794      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48795        C_O_FLAG_DEBUG_JVM=""
48796      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48797        C_O_FLAG_DEBUG_JVM="-O0"
48798      fi
48799      C_O_FLAG_NONE="-O0"
48800    elif test "x$TOOLCHAIN_TYPE" = xclang; then
48801      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48802        # On MacOSX we optimize for size, something
48803        # we should do for all platforms?
48804        C_O_FLAG_HIGHEST_JVM="-Os"
48805        C_O_FLAG_HIGHEST="-Os"
48806        C_O_FLAG_HI="-Os"
48807        C_O_FLAG_NORM="-Os"
48808        C_O_FLAG_SIZE="-Os"
48809      else
48810        C_O_FLAG_HIGHEST_JVM="-O3"
48811        C_O_FLAG_HIGHEST="-O3"
48812        C_O_FLAG_HI="-O3"
48813        C_O_FLAG_NORM="-O2"
48814        C_O_FLAG_SIZE="-Os"
48815      fi
48816      C_O_FLAG_DEBUG="-O0"
48817      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48818        C_O_FLAG_DEBUG_JVM=""
48819      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48820        C_O_FLAG_DEBUG_JVM="-O0"
48821      fi
48822      C_O_FLAG_NONE="-O0"
48823    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48824      C_O_FLAG_HIGHEST_JVM="-O3"
48825      C_O_FLAG_HIGHEST="-O3"
48826      C_O_FLAG_HI="-O3 -qstrict"
48827      C_O_FLAG_NORM="-O2"
48828      C_O_FLAG_DEBUG="-qnoopt"
48829      # FIXME: Value below not verified.
48830      C_O_FLAG_DEBUG_JVM=""
48831      C_O_FLAG_NONE="-qnoopt"
48832    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48833      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
48834      C_O_FLAG_HIGHEST="-O2"
48835      C_O_FLAG_HI="-O1"
48836      C_O_FLAG_NORM="-O1"
48837      C_O_FLAG_DEBUG="-Od"
48838      C_O_FLAG_DEBUG_JVM=""
48839      C_O_FLAG_NONE="-Od"
48840      C_O_FLAG_SIZE="-Os"
48841    fi
48842    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
48843    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
48844    CXX_O_FLAG_HI="$C_O_FLAG_HI"
48845    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
48846    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
48847    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
48848    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
48849    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
48850  fi
48851
48852  # Adjust optimization flags according to debug level.
48853  case $DEBUG_LEVEL in
48854    release )
48855      # no adjustment
48856      ;;
48857    fastdebug )
48858      # Not quite so much optimization
48859      C_O_FLAG_HI="$C_O_FLAG_NORM"
48860      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
48861      ;;
48862    slowdebug )
48863      # Disable optimization
48864      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
48865      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
48866      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
48867      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
48868      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
48869      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
48870      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
48871      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
48872      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
48873      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
48874      ;;
48875  esac
48876
48877
48878
48879
48880
48881
48882
48883
48884
48885
48886
48887
48888
48889
48890
48891
48892
48893
48894
48895  # Special extras...
48896  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48897    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48898      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48899      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48900    fi
48901    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48902    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48903  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48904    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48905    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48906  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
48907    CXXSTD_CXXFLAG="-std=gnu++98"
48908
48909
48910
48911
48912
48913
48914
48915
48916
48917
48918
48919
48920
48921
48922
48923
48924
48925
48926
48927
48928
48929
48930
48931
48932
48933
48934
48935
48936
48937
48938
48939
48940
48941
48942
48943
48944
48945
48946
48947
48948
48949
48950    # Execute function body
48951
48952  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
48953$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
48954  supports=yes
48955
48956  saved_cxxflags="$CXXFLAGS"
48957  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
48958  ac_ext=cpp
48959ac_cpp='$CXXCPP $CPPFLAGS'
48960ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48961ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48962ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48963
48964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48965/* end confdefs.h.  */
48966int i;
48967_ACEOF
48968if ac_fn_cxx_try_compile "$LINENO"; then :
48969
48970else
48971  supports=no
48972fi
48973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48974  ac_ext=cpp
48975ac_cpp='$CXXCPP $CPPFLAGS'
48976ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48977ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48978ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48979
48980  CXXFLAGS="$saved_cxxflags"
48981
48982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48983$as_echo "$supports" >&6; }
48984  if test "x$supports" = "xyes" ; then
48985    :
48986
48987  else
48988    :
48989    CXXSTD_CXXFLAG=""
48990  fi
48991
48992
48993
48994
48995
48996
48997
48998
48999
49000
49001
49002
49003    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49004
49005  fi
49006  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49007    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49008    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49009    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49010    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49011    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49012  fi
49013
49014  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49015    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49016    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49017    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49018  fi
49019
49020  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49021  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49022  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49023
49024  ###############################################################################
49025  #
49026  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49027  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49028  #
49029
49030  # Setup compiler/platform specific flags into
49031  #    CFLAGS_JDK    - C Compiler flags
49032  #    CXXFLAGS_JDK  - C++ Compiler flags
49033  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49034  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49035    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49036    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49037    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49038    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49039      # Force compatibility with i586 on 32 bit intel platforms.
49040      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49041      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49042    fi
49043    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49044        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49045    case $OPENJDK_TARGET_CPU_ARCH in
49046      arm )
49047        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49048        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49049        ;;
49050      ppc )
49051        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49052        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49053        ;;
49054      * )
49055        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49056        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49057        ;;
49058    esac
49059
49060
49061
49062
49063
49064
49065
49066
49067
49068
49069
49070
49071
49072
49073
49074
49075
49076
49077
49078
49079
49080
49081
49082
49083
49084
49085
49086
49087
49088
49089
49090
49091
49092
49093
49094
49095
49096
49097
49098
49099
49100
49101    # Execute function body
49102
49103  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49104  REFERENCE_VERSION=6
49105
49106  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49107    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49108  fi
49109
49110  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49111    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49112  fi
49113
49114  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49115  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49116
49117  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49118    :
49119
49120  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49121  # runs afoul of the more aggressive versions of these optimisations.
49122  # Notably, value range propagation now assumes that the this pointer of C++
49123  # member functions is non-null.
49124  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
49125
49126
49127
49128
49129
49130
49131
49132
49133
49134
49135
49136
49137
49138
49139
49140
49141
49142
49143
49144
49145
49146
49147
49148
49149
49150
49151
49152
49153
49154
49155
49156
49157
49158
49159
49160
49161
49162
49163
49164
49165
49166
49167    # Execute function body
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
49194
49195
49196
49197
49198
49199
49200
49201
49202
49203
49204
49205
49206
49207
49208
49209
49210
49211
49212
49213
49214
49215
49216    # Execute function body
49217
49218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49219$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49220  supports=yes
49221
49222  saved_cflags="$CFLAGS"
49223  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49224  ac_ext=c
49225ac_cpp='$CPP $CPPFLAGS'
49226ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49227ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49228ac_compiler_gnu=$ac_cv_c_compiler_gnu
49229
49230  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49231/* end confdefs.h.  */
49232int i;
49233_ACEOF
49234if ac_fn_c_try_compile "$LINENO"; then :
49235
49236else
49237  supports=no
49238fi
49239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49240  ac_ext=cpp
49241ac_cpp='$CXXCPP $CPPFLAGS'
49242ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49243ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49244ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49245
49246  CFLAGS="$saved_cflags"
49247
49248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49249$as_echo "$supports" >&6; }
49250  if test "x$supports" = "xyes" ; then
49251    :
49252    C_COMP_SUPPORTS="yes"
49253  else
49254    :
49255    C_COMP_SUPPORTS="no"
49256  fi
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316    # Execute function body
49317
49318  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49319$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49320  supports=yes
49321
49322  saved_cxxflags="$CXXFLAGS"
49323  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49324  ac_ext=cpp
49325ac_cpp='$CXXCPP $CPPFLAGS'
49326ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49327ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49328ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49329
49330  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49331/* end confdefs.h.  */
49332int i;
49333_ACEOF
49334if ac_fn_cxx_try_compile "$LINENO"; then :
49335
49336else
49337  supports=no
49338fi
49339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49340  ac_ext=cpp
49341ac_cpp='$CXXCPP $CPPFLAGS'
49342ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49343ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49344ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49345
49346  CXXFLAGS="$saved_cxxflags"
49347
49348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49349$as_echo "$supports" >&6; }
49350  if test "x$supports" = "xyes" ; then
49351    :
49352    CXX_COMP_SUPPORTS="yes"
49353  else
49354    :
49355    CXX_COMP_SUPPORTS="no"
49356  fi
49357
49358
49359
49360
49361
49362
49363
49364
49365
49366
49367
49368
49369
49370  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49371$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49372  supports=no
49373  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49374
49375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49376$as_echo "$supports" >&6; }
49377  if test "x$supports" = "xyes" ; then
49378    :
49379
49380  else
49381    :
49382    NO_NULL_POINTER_CHECK_CFLAG=""
49383  fi
49384
49385
49386
49387
49388
49389
49390
49391  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434    # Execute function body
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
49461
49462
49463
49464
49465
49466
49467
49468
49469
49470
49471
49472
49473
49474
49475
49476
49477
49478
49479
49480
49481
49482
49483    # Execute function body
49484
49485  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49486$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49487  supports=yes
49488
49489  saved_cflags="$CFLAGS"
49490  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
49491  ac_ext=c
49492ac_cpp='$CPP $CPPFLAGS'
49493ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49494ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49495ac_compiler_gnu=$ac_cv_c_compiler_gnu
49496
49497  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49498/* end confdefs.h.  */
49499int i;
49500_ACEOF
49501if ac_fn_c_try_compile "$LINENO"; then :
49502
49503else
49504  supports=no
49505fi
49506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49507  ac_ext=cpp
49508ac_cpp='$CXXCPP $CPPFLAGS'
49509ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49510ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49511ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49512
49513  CFLAGS="$saved_cflags"
49514
49515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49516$as_echo "$supports" >&6; }
49517  if test "x$supports" = "xyes" ; then
49518    :
49519    C_COMP_SUPPORTS="yes"
49520  else
49521    :
49522    C_COMP_SUPPORTS="no"
49523  fi
49524
49525
49526
49527
49528
49529
49530
49531
49532
49533
49534
49535
49536
49537
49538
49539
49540
49541
49542
49543
49544
49545
49546
49547
49548
49549
49550
49551
49552
49553
49554
49555
49556
49557
49558
49559
49560
49561
49562
49563
49564
49565
49566
49567
49568
49569
49570
49571
49572
49573
49574
49575
49576
49577
49578
49579
49580
49581
49582
49583    # Execute function body
49584
49585  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49586$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49587  supports=yes
49588
49589  saved_cxxflags="$CXXFLAGS"
49590  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
49591  ac_ext=cpp
49592ac_cpp='$CXXCPP $CPPFLAGS'
49593ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49594ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49595ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49596
49597  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49598/* end confdefs.h.  */
49599int i;
49600_ACEOF
49601if ac_fn_cxx_try_compile "$LINENO"; then :
49602
49603else
49604  supports=no
49605fi
49606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49607  ac_ext=cpp
49608ac_cpp='$CXXCPP $CPPFLAGS'
49609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49612
49613  CXXFLAGS="$saved_cxxflags"
49614
49615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49616$as_echo "$supports" >&6; }
49617  if test "x$supports" = "xyes" ; then
49618    :
49619    CXX_COMP_SUPPORTS="yes"
49620  else
49621    :
49622    CXX_COMP_SUPPORTS="no"
49623  fi
49624
49625
49626
49627
49628
49629
49630
49631
49632
49633
49634
49635
49636
49637  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49638$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49639  supports=no
49640  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49641
49642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49643$as_echo "$supports" >&6; }
49644  if test "x$supports" = "xyes" ; then
49645    :
49646
49647  else
49648    :
49649    NO_LIFETIME_DSE_CFLAG=""
49650  fi
49651
49652
49653
49654
49655
49656
49657  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49658
49659
49660
49661  else
49662    :
49663
49664  fi
49665
49666
49667
49668
49669
49670
49671
49672
49673
49674
49675
49676
49677  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49678    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49679
49680    # Restrict the debug information created by Clang to avoid
49681    # too big object files and speed the build up a little bit
49682    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49683    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49684    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49685      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49686        # Force compatibility with i586 on 32 bit intel platforms.
49687        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49688        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49689      fi
49690      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49691      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49692          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49693      case $OPENJDK_TARGET_CPU_ARCH in
49694        ppc )
49695          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49696          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49697          ;;
49698        * )
49699          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49700          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49701          ;;
49702      esac
49703    fi
49704  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49705    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49706    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49707    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49708      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49709    fi
49710
49711    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49712    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49713  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49714    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49715    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49716    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49717  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49718    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49719        -MD -Zc:wchar_t- -W3 -wd4800 \
49720        -DWIN32_LEAN_AND_MEAN \
49721        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49722        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49723        -DWIN32 -DIAL"
49724    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49725      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49726    else
49727      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49728    fi
49729    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49730    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49731    # studio.
49732    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49733      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49734      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49735      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49736    fi
49737  fi
49738
49739  ###############################################################################
49740
49741  # Adjust flags according to debug level.
49742  case $DEBUG_LEVEL in
49743    fastdebug | slowdebug )
49744      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49745      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49746      JAVAC_FLAGS="$JAVAC_FLAGS -g"
49747      ;;
49748    release )
49749      ;;
49750    * )
49751      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49752      ;;
49753  esac
49754
49755  # Set some common defines. These works for all compilers, but assume
49756  # -D is universally accepted.
49757
49758  # Setup endianness
49759  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49760    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49761    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49762    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49763    #   Note: -Dmacro         is the same as    #define macro 1
49764    #         -Dmacro=        is the same as    #define macro
49765    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49766      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49767    else
49768      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
49769    fi
49770  else
49771    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
49772    # are defined in the system?
49773    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49774      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
49775    else
49776      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
49777    fi
49778  fi
49779
49780  # Setup target OS define. Use OS target name but in upper case.
49781  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
49782  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
49783
49784  # Setup target CPU
49785  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49786      $OPENJDK_TARGET_ADD_LP64 \
49787      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
49788
49789  # Setup debug/release defines
49790  if test "x$DEBUG_LEVEL" = xrelease; then
49791    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
49792    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49793      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
49794    fi
49795  else
49796    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
49797  fi
49798
49799  # Set some additional per-OS defines.
49800  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49801    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
49802    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
49803        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
49804  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49805    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
49806    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
49807        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
49808  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49809    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
49810    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
49811    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
49812    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
49813        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
49814        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
49815        -fno-omit-frame-pointer"
49816  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49817    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
49818    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
49819    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
49820        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
49821        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
49822  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
49823    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
49824  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49825    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
49826    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
49827  fi
49828
49829  # Set some additional per-CPU defines.
49830  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
49831    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
49832  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49833    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
49834  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
49835    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49836      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49837      if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xbig; then
49838        # fixes `relocation truncated to fit' error for gcc 4.1.
49839        JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
49840        # Use ppc64 instructions, but schedule for power5
49841        JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
49842      else
49843        # Little endian machine uses ELFv2 ABI.
49844        JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
49845        # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
49846        JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
49847  fi
49848    elif test "x$OPENJDK_TARGET_OS" = xaix; then
49849      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
49850  fi
49851  fi
49852
49853  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49854    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
49855  fi
49856
49857  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49858    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
49859      # Solaris does not have _LP64=1 in the old build.
49860      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
49861      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
49862    fi
49863  fi
49864
49865  # Set JVM_CFLAGS warning handling
49866  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49867    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
49868        -Wunused-value -Woverloaded-virtual"
49869
49870    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913    # Execute function body
49914
49915  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49916  REFERENCE_VERSION=4.8
49917
49918  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49919    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
49920  fi
49921
49922  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49923    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
49924  fi
49925
49926  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49927  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49928
49929  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49930    :
49931
49932            # These flags either do not work or give spurious warnings prior to gcc 4.8.
49933            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
49934
49935
49936  else
49937    :
49938
49939  fi
49940
49941
49942
49943
49944
49945
49946
49947
49948
49949
49950
49951
49952    fi
49953    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
49954      # Non-zero builds have stricter warnings
49955      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
49956    else
49957      if test "x$TOOLCHAIN_TYPE" = xclang; then
49958        # Some versions of llvm do not like -Wundef
49959        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
49960      fi
49961    fi
49962  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49963    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
49964        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
49965  fi
49966
49967  # Additional macosx handling
49968  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49969    # Setting these parameters makes it an error to link to macosx APIs that are
49970    # newer than the given OS version and makes the linked binaries compatible
49971    # even if built on a newer version of the OS.
49972    # The expected format is X.Y.Z
49973    MACOSX_VERSION_MIN=10.7.0
49974
49975
49976    # The macro takes the version with no dots, ex: 1070
49977    # Let the flags variables get resolved in make for easier override on make
49978    # command line.
49979    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
49980    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
49981  fi
49982
49983  # Setup some hard coded includes
49984  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49985      -I${JDK_TOPDIR}/src/java.base/share/native/include \
49986      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
49987      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
49988      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
49989      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
49990
49991  # The shared libraries are compiled using the picflag.
49992  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
49993      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
49994  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
49995      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
49996
49997  # Executable flags
49998  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
49999  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50000
50001
50002
50003
50004
50005
50006  # Setup LDFLAGS et al.
50007  #
50008
50009  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50010    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50011    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50012    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50013    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50014      LDFLAGS_SAFESH="-safeseh"
50015      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50016      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50017      # NOTE: Old build added -machine. Probably not needed.
50018      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50019    else
50020      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50021    fi
50022  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50023      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50024      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50025        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50026        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50027    fi
50028  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50029    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50030    # We have previously set HAS_GNU_HASH if this is the case
50031    if test -n "$HAS_GNU_HASH"; then
50032      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50033      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50034      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50035    fi
50036      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50037        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50038    fi
50039    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50040      # And since we now know that the linker is gnu, then add -z defs, to forbid
50041      # undefined symbols in object files.
50042      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50043      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50044      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50045      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50046      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50047      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50048        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50049      fi
50050      case $DEBUG_LEVEL in
50051        release )
50052          # tell linker to optimize libraries.
50053          # Should this be supplied to the OSS linker as well?
50054          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50055          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50056          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50057          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50058            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50059          fi
50060          ;;
50061        slowdebug )
50062          # Hotspot always let the linker optimize
50063          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50064          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50065            # do relocations at load
50066            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50067            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50068            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50069          fi
50070          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50071            # mark relocations read only
50072            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50073            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50074            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50075          fi
50076          ;;
50077        fastdebug )
50078          # Hotspot always let the linker optimize
50079          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50080          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50081            # mark relocations read only
50082            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50083            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50084            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50085          fi
50086          ;;
50087        * )
50088          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50089          ;;
50090        esac
50091    fi
50092  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50093    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50094    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50095    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50096    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50097    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50098    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50099      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50100    fi
50101  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50102    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50103    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50104    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50105  fi
50106
50107  # Customize LDFLAGS for executables
50108
50109  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50110
50111  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50112    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50113      LDFLAGS_STACK_SIZE=1048576
50114    else
50115      LDFLAGS_STACK_SIZE=327680
50116    fi
50117    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50118  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50119    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50120  fi
50121
50122  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50123
50124  # Customize LDFLAGS for libs
50125  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50126
50127  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50128  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50129    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50130        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50131    JDKLIB_LIBS=""
50132  else
50133    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50134        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50135
50136    if test "xTARGET" = "xTARGET"; then
50137    # On some platforms (mac) the linker warns about non existing -L dirs.
50138    # Add server first if available. Linking aginst client does not always produce the same results.
50139      # Only add client/minimal dir if client/minimal is being built.
50140    # Default to server for other variants.
50141      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50142        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50143      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50144        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50145      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50146        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50147    else
50148        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50149    fi
50150    elif test "xTARGET" = "xBUILD"; then
50151      # When building a buildjdk, it's always only the server variant
50152      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50153          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50154    fi
50155
50156    JDKLIB_LIBS="-ljava -ljvm"
50157    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50158      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50159    fi
50160
50161  fi
50162
50163  # Set JVM_LIBS (per os)
50164  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50165    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50166  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50167    # FIXME: This hard-coded path is not really proper.
50168    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50169      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50170    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50171      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50172    fi
50173    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50174        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50175  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50176    JVM_LIBS="$JVM_LIBS -lm"
50177  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50178    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50179  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50180    JVM_LIBS="$JVM_LIBS -lm"
50181  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50182    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50183        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50184        wsock32.lib winmm.lib version.lib psapi.lib"
50185    fi
50186
50187  # Set JVM_ASFLAGS
50188  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50189    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50190      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50191    fi
50192  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50193    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50194  fi
50195
50196  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206
50207
50208
50209
50210
50211
50212  # Special extras...
50213  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50214    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50215      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50216      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50217    fi
50218    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50219    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50220  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50221    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50222    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50223  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50224    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50225
50226
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
50258
50259
50260
50261
50262
50263
50264
50265
50266
50267    # Execute function body
50268
50269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50270$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50271  supports=yes
50272
50273  saved_cxxflags="$CXXFLAGS"
50274  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50275  ac_ext=cpp
50276ac_cpp='$CXXCPP $CPPFLAGS'
50277ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50278ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50279ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50280
50281  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50282/* end confdefs.h.  */
50283int i;
50284_ACEOF
50285if ac_fn_cxx_try_compile "$LINENO"; then :
50286
50287else
50288  supports=no
50289fi
50290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50291  ac_ext=cpp
50292ac_cpp='$CXXCPP $CPPFLAGS'
50293ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50294ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50295ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50296
50297  CXXFLAGS="$saved_cxxflags"
50298
50299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50300$as_echo "$supports" >&6; }
50301  if test "x$supports" = "xyes" ; then
50302    :
50303
50304  else
50305    :
50306    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50307  fi
50308
50309
50310
50311
50312
50313
50314
50315
50316
50317
50318
50319
50320    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50321
50322  fi
50323  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50324    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50325    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50326    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50327    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50328    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50329  fi
50330
50331  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50332    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50333    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50334    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50335  fi
50336
50337  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50338  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50339  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50340
50341  ###############################################################################
50342  #
50343  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50344  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50345  #
50346
50347  # Setup compiler/platform specific flags into
50348  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50349  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50350  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50351  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50352    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50353    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50354    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50355    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50356      # Force compatibility with i586 on 32 bit intel platforms.
50357      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50358      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50359    fi
50360    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50361        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50362    case $OPENJDK_BUILD_CPU_ARCH in
50363      arm )
50364        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50365        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50366        ;;
50367      ppc )
50368        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50369        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50370        ;;
50371      * )
50372        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50373        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50374        ;;
50375    esac
50376
50377
50378
50379
50380
50381
50382
50383
50384
50385
50386
50387
50388
50389
50390
50391
50392
50393
50394
50395
50396
50397
50398
50399
50400
50401
50402
50403
50404
50405
50406
50407
50408
50409
50410
50411
50412
50413
50414
50415
50416
50417
50418    # Execute function body
50419
50420  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50421  REFERENCE_VERSION=6
50422
50423  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50424    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50425  fi
50426
50427  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50428    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50429  fi
50430
50431  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50432  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50433
50434  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50435    :
50436
50437  else
50438    :
50439
50440  fi
50441
50442
50443
50444
50445
50446
50447
50448
50449
50450
50451
50452
50453  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50454    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50455
50456    # Restrict the debug information created by Clang to avoid
50457    # too big object files and speed the build up a little bit
50458    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50459    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50460    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50461      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50462        # Force compatibility with i586 on 32 bit intel platforms.
50463        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50464        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50465      fi
50466      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50467      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50468          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50469      case $OPENJDK_BUILD_CPU_ARCH in
50470        ppc )
50471          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50472          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50473          ;;
50474        * )
50475          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50476          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50477          ;;
50478      esac
50479    fi
50480  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50481    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50482    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50483    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50484      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50485    fi
50486
50487    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50488    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50489  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50490    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50491    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50492    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50493  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50494    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50495        -MD -Zc:wchar_t- -W3 -wd4800 \
50496        -DWIN32_LEAN_AND_MEAN \
50497        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50498        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50499        -DWIN32 -DIAL"
50500    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50501      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50502    else
50503      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50504    fi
50505    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50506    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50507    # studio.
50508    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50509      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50510      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50511      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50512    fi
50513  fi
50514
50515  ###############################################################################
50516
50517  # Adjust flags according to debug level.
50518  case $DEBUG_LEVEL in
50519    fastdebug | slowdebug )
50520      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50521      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50522      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50523      ;;
50524    release )
50525      ;;
50526    * )
50527      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50528      ;;
50529  esac
50530
50531  # Set some common defines. These works for all compilers, but assume
50532  # -D is universally accepted.
50533
50534  # Setup endianness
50535  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50536    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50537    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50538    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50539    #   Note: -Dmacro         is the same as    #define macro 1
50540    #         -Dmacro=        is the same as    #define macro
50541    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50542      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50543    else
50544      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50545    fi
50546  else
50547    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50548    # are defined in the system?
50549    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50550      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50551    else
50552      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50553    fi
50554  fi
50555
50556  # Setup target OS define. Use OS target name but in upper case.
50557  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50558  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50559
50560  # Setup target CPU
50561  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50562      $OPENJDK_BUILD_ADD_LP64 \
50563      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50564
50565  # Setup debug/release defines
50566  if test "x$DEBUG_LEVEL" = xrelease; then
50567    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50568    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50569      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50570    fi
50571  else
50572    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50573  fi
50574
50575  # Set some additional per-OS defines.
50576  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50577    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50578    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50579        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50580  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50581    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50582    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50583        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50584  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50585    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50586    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50587    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50588    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50589        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50590        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50591        -fno-omit-frame-pointer"
50592  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50593    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50594    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50595    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
50596        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50597        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50598  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50599    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50600  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50601    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50602    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50603  fi
50604
50605  # Set some additional per-CPU defines.
50606  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50607    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50608  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50609    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50610  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50611    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50612      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50613      if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xbig; then
50614        # fixes `relocation truncated to fit' error for gcc 4.1.
50615        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50616        # Use ppc64 instructions, but schedule for power5
50617        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50618      else
50619        # Little endian machine uses ELFv2 ABI.
50620        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50621        # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50622        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50623  fi
50624    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50625      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50626  fi
50627  fi
50628
50629  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50630    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50631  fi
50632
50633  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50634    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50635      # Solaris does not have _LP64=1 in the old build.
50636      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50637      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50638    fi
50639  fi
50640
50641  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50642  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50643    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50644        -Wunused-value -Woverloaded-virtual"
50645
50646    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689    # Execute function body
50690
50691  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50692  REFERENCE_VERSION=4.8
50693
50694  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50695    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50696  fi
50697
50698  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50699    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50700  fi
50701
50702  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50703  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50704
50705  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50706    :
50707
50708            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50709            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50710
50711
50712  else
50713    :
50714
50715  fi
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725
50726
50727
50728    fi
50729    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50730      # Non-zero builds have stricter warnings
50731      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50732    else
50733      if test "x$TOOLCHAIN_TYPE" = xclang; then
50734        # Some versions of llvm do not like -Wundef
50735        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
50736      fi
50737    fi
50738  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50739    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50740        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50741  fi
50742
50743  # Additional macosx handling
50744  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50745    # Setting these parameters makes it an error to link to macosx APIs that are
50746    # newer than the given OS version and makes the linked binaries compatible
50747    # even if built on a newer version of the OS.
50748    # The expected format is X.Y.Z
50749    MACOSX_VERSION_MIN=10.7.0
50750
50751
50752    # The macro takes the version with no dots, ex: 1070
50753    # Let the flags variables get resolved in make for easier override on make
50754    # command line.
50755    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)"
50756    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50757  fi
50758
50759  # Setup some hard coded includes
50760  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50761      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50762      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
50763      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
50764      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50765      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
50766
50767  # The shared libraries are compiled using the picflag.
50768  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50769      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
50770  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50771      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
50772
50773  # Executable flags
50774  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
50775  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
50776
50777
50778
50779
50780
50781
50782  # Setup LDFLAGS et al.
50783  #
50784
50785  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50786    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50787    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50788    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50789    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
50790      LDFLAGS_SAFESH="-safeseh"
50791      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
50792      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
50793      # NOTE: Old build added -machine. Probably not needed.
50794      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
50795    else
50796      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
50797    fi
50798  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50799      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50800      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50801        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50802        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50803    fi
50804  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50805    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50806    # We have previously set HAS_GNU_HASH if this is the case
50807    if test -n "$HAS_GNU_HASH"; then
50808      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50809      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50810      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50811    fi
50812      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50813        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50814    fi
50815    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50816      # And since we now know that the linker is gnu, then add -z defs, to forbid
50817      # undefined symbols in object files.
50818      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50819      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50820      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50821      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50822      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50823      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50824        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
50825      fi
50826      case $DEBUG_LEVEL in
50827        release )
50828          # tell linker to optimize libraries.
50829          # Should this be supplied to the OSS linker as well?
50830          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50831          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50832          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50833          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50834            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50835          fi
50836          ;;
50837        slowdebug )
50838          # Hotspot always let the linker optimize
50839          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50840          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50841            # do relocations at load
50842            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
50843            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50844            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
50845          fi
50846          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50847            # mark relocations read only
50848            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50849            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50850            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50851          fi
50852          ;;
50853        fastdebug )
50854          # Hotspot always let the linker optimize
50855          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50856          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50857            # mark relocations read only
50858            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50859            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50860            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50861          fi
50862          ;;
50863        * )
50864          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50865          ;;
50866        esac
50867    fi
50868  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50869    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50870    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50871    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50872    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50873    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50874    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50875      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
50876    fi
50877  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50878    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50879    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
50880    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
50881  fi
50882
50883  # Customize LDFLAGS for executables
50884
50885  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
50886
50887  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50888    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
50889      LDFLAGS_STACK_SIZE=1048576
50890    else
50891      LDFLAGS_STACK_SIZE=327680
50892    fi
50893    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50894  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
50895    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50896  fi
50897
50898  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
50899
50900  # Customize LDFLAGS for libs
50901  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
50902
50903  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50904  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50905    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50906        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50907    OPENJDK_BUILD_JDKLIB_LIBS=""
50908  else
50909    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50910        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
50911
50912    if test "xBUILD" = "xTARGET"; then
50913    # On some platforms (mac) the linker warns about non existing -L dirs.
50914    # Add server first if available. Linking aginst client does not always produce the same results.
50915      # Only add client/minimal dir if client/minimal is being built.
50916    # Default to server for other variants.
50917      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50918        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50919      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50920        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
50921      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50922        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
50923    else
50924        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50925    fi
50926    elif test "xBUILD" = "xBUILD"; then
50927      # When building a buildjdk, it's always only the server variant
50928      OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50929          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50930    fi
50931
50932    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
50933    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50934      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
50935    fi
50936
50937  fi
50938
50939  # Set OPENJDK_BUILD_JVM_LIBS (per os)
50940  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50941    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
50942  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50943    # FIXME: This hard-coded path is not really proper.
50944    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50945      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50946    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50947      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50948    fi
50949    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50950        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50951  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50952    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50953  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50954    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50955  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50956    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50957  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50958    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50959        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50960        wsock32.lib winmm.lib version.lib psapi.lib"
50961    fi
50962
50963  # Set OPENJDK_BUILD_JVM_ASFLAGS
50964  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50965    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50966      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
50967    fi
50968  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50969    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50970  fi
50971
50972  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
50973
50974
50975
50976
50977
50978
50979
50980
50981
50982
50983
50984
50985
50986
50987
50988  # Tests are only ever compiled for TARGET
50989  # Flags for compiling test libraries
50990  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50991  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50992
50993  # Flags for compiling test executables
50994  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
50995  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
50996
50997
50998
50999
51000
51001
51002  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51003  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51004
51005
51006
51007
51008
51009
51010  # Some Zero and Shark settings.
51011  # ZERO_ARCHFLAG tells the compiler which mode to build for
51012  case "${OPENJDK_TARGET_CPU}" in
51013    s390)
51014      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51015      ;;
51016    *)
51017      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51018  esac
51019
51020
51021
51022
51023
51024
51025
51026
51027
51028
51029
51030
51031
51032
51033
51034
51035
51036
51037
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061    # Execute function body
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
51090
51091
51092
51093
51094
51095
51096
51097
51098
51099
51100
51101
51102
51103
51104
51105
51106
51107
51108
51109
51110    # Execute function body
51111
51112  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51113$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51114  supports=yes
51115
51116  saved_cflags="$CFLAGS"
51117  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51118  ac_ext=c
51119ac_cpp='$CPP $CPPFLAGS'
51120ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51121ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51122ac_compiler_gnu=$ac_cv_c_compiler_gnu
51123
51124  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51125/* end confdefs.h.  */
51126int i;
51127_ACEOF
51128if ac_fn_c_try_compile "$LINENO"; then :
51129
51130else
51131  supports=no
51132fi
51133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51134  ac_ext=cpp
51135ac_cpp='$CXXCPP $CPPFLAGS'
51136ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51137ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51138ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51139
51140  CFLAGS="$saved_cflags"
51141
51142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51143$as_echo "$supports" >&6; }
51144  if test "x$supports" = "xyes" ; then
51145    :
51146    C_COMP_SUPPORTS="yes"
51147  else
51148    :
51149    C_COMP_SUPPORTS="no"
51150  fi
51151
51152
51153
51154
51155
51156
51157
51158
51159
51160
51161
51162
51163
51164
51165
51166
51167
51168
51169
51170
51171
51172
51173
51174
51175
51176
51177
51178
51179
51180
51181
51182
51183
51184
51185
51186
51187
51188
51189
51190
51191
51192
51193
51194
51195
51196
51197
51198
51199
51200
51201
51202
51203
51204
51205
51206
51207
51208
51209
51210    # Execute function body
51211
51212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51213$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51214  supports=yes
51215
51216  saved_cxxflags="$CXXFLAGS"
51217  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51218  ac_ext=cpp
51219ac_cpp='$CXXCPP $CPPFLAGS'
51220ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51221ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51222ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51223
51224  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51225/* end confdefs.h.  */
51226int i;
51227_ACEOF
51228if ac_fn_cxx_try_compile "$LINENO"; then :
51229
51230else
51231  supports=no
51232fi
51233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51234  ac_ext=cpp
51235ac_cpp='$CXXCPP $CPPFLAGS'
51236ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51237ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51238ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51239
51240  CXXFLAGS="$saved_cxxflags"
51241
51242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51243$as_echo "$supports" >&6; }
51244  if test "x$supports" = "xyes" ; then
51245    :
51246    CXX_COMP_SUPPORTS="yes"
51247  else
51248    :
51249    CXX_COMP_SUPPORTS="no"
51250  fi
51251
51252
51253
51254
51255
51256
51257
51258
51259
51260
51261
51262
51263
51264  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51265$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51266  supports=no
51267  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51268
51269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51270$as_echo "$supports" >&6; }
51271  if test "x$supports" = "xyes" ; then
51272    :
51273
51274  else
51275    :
51276    ZERO_ARCHFLAG=""
51277  fi
51278
51279
51280
51281
51282
51283
51284
51285
51286  # Check that the compiler supports -mX (or -qX on AIX) flags
51287  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51288
51289
51290
51291
51292
51293
51294
51295
51296
51297
51298
51299
51300
51301
51302
51303
51304
51305
51306
51307
51308
51309
51310
51311
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335    # Execute function body
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
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384    # Execute function body
51385
51386  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51387$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51388  supports=yes
51389
51390  saved_cflags="$CFLAGS"
51391  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51392  ac_ext=c
51393ac_cpp='$CPP $CPPFLAGS'
51394ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51395ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51396ac_compiler_gnu=$ac_cv_c_compiler_gnu
51397
51398  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51399/* end confdefs.h.  */
51400int i;
51401_ACEOF
51402if ac_fn_c_try_compile "$LINENO"; then :
51403
51404else
51405  supports=no
51406fi
51407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51408  ac_ext=cpp
51409ac_cpp='$CXXCPP $CPPFLAGS'
51410ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51411ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51412ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51413
51414  CFLAGS="$saved_cflags"
51415
51416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51417$as_echo "$supports" >&6; }
51418  if test "x$supports" = "xyes" ; then
51419    :
51420    C_COMP_SUPPORTS="yes"
51421  else
51422    :
51423    C_COMP_SUPPORTS="no"
51424  fi
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463
51464
51465
51466
51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477
51478
51479
51480
51481
51482
51483
51484    # Execute function body
51485
51486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51487$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51488  supports=yes
51489
51490  saved_cxxflags="$CXXFLAGS"
51491  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51492  ac_ext=cpp
51493ac_cpp='$CXXCPP $CPPFLAGS'
51494ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51495ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51496ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51497
51498  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51499/* end confdefs.h.  */
51500int i;
51501_ACEOF
51502if ac_fn_cxx_try_compile "$LINENO"; then :
51503
51504else
51505  supports=no
51506fi
51507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51508  ac_ext=cpp
51509ac_cpp='$CXXCPP $CPPFLAGS'
51510ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51511ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51512ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51513
51514  CXXFLAGS="$saved_cxxflags"
51515
51516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51517$as_echo "$supports" >&6; }
51518  if test "x$supports" = "xyes" ; then
51519    :
51520    CXX_COMP_SUPPORTS="yes"
51521  else
51522    :
51523    CXX_COMP_SUPPORTS="no"
51524  fi
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51539$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51540  supports=no
51541  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51542
51543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51544$as_echo "$supports" >&6; }
51545  if test "x$supports" = "xyes" ; then
51546    :
51547    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51548  else
51549    :
51550    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51551  fi
51552
51553
51554
51555
51556
51557
51558
51559
51560  # Check whether --enable-warnings-as-errors was given.
51561if test "${enable_warnings_as_errors+set}" = set; then :
51562  enableval=$enable_warnings_as_errors;
51563fi
51564
51565
51566  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51567$as_echo_n "checking if native warnings are errors... " >&6; }
51568  if test "x$enable_warnings_as_errors" = "xyes"; then
51569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51570$as_echo "yes (explicitely set)" >&6; }
51571    WARNINGS_AS_ERRORS=true
51572  elif test "x$enable_warnings_as_errors" = "xno"; then
51573    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51574$as_echo "no" >&6; }
51575    WARNINGS_AS_ERRORS=false
51576  elif test "x$enable_warnings_as_errors" = "x"; then
51577    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51578$as_echo "yes (default)" >&6; }
51579    WARNINGS_AS_ERRORS=true
51580  else
51581    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51582  fi
51583
51584  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51585    # Set legacy hotspot variable
51586    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51587  else
51588    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51589  fi
51590
51591
51592
51593
51594  case "${TOOLCHAIN_TYPE}" in
51595    microsoft)
51596      DISABLE_WARNING_PREFIX="-wd"
51597      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51598      ;;
51599    solstudio)
51600      DISABLE_WARNING_PREFIX="-erroff="
51601      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51602      ;;
51603    gcc)
51604      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51605
51606
51607
51608
51609
51610
51611
51612
51613
51614
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652    # Execute function body
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
51681
51682
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701    # Execute function body
51702
51703  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51704$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51705  supports=yes
51706
51707  saved_cflags="$CFLAGS"
51708  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51709  ac_ext=c
51710ac_cpp='$CPP $CPPFLAGS'
51711ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51712ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51713ac_compiler_gnu=$ac_cv_c_compiler_gnu
51714
51715  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51716/* end confdefs.h.  */
51717int i;
51718_ACEOF
51719if ac_fn_c_try_compile "$LINENO"; then :
51720
51721else
51722  supports=no
51723fi
51724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51725  ac_ext=cpp
51726ac_cpp='$CXXCPP $CPPFLAGS'
51727ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51728ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51729ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51730
51731  CFLAGS="$saved_cflags"
51732
51733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51734$as_echo "$supports" >&6; }
51735  if test "x$supports" = "xyes" ; then
51736    :
51737    C_COMP_SUPPORTS="yes"
51738  else
51739    :
51740    C_COMP_SUPPORTS="no"
51741  fi
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801    # Execute function body
51802
51803  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51804$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51805  supports=yes
51806
51807  saved_cxxflags="$CXXFLAGS"
51808  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
51809  ac_ext=cpp
51810ac_cpp='$CXXCPP $CPPFLAGS'
51811ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51812ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51813ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51814
51815  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51816/* end confdefs.h.  */
51817int i;
51818_ACEOF
51819if ac_fn_cxx_try_compile "$LINENO"; then :
51820
51821else
51822  supports=no
51823fi
51824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51825  ac_ext=cpp
51826ac_cpp='$CXXCPP $CPPFLAGS'
51827ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51828ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51829ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51830
51831  CXXFLAGS="$saved_cxxflags"
51832
51833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51834$as_echo "$supports" >&6; }
51835  if test "x$supports" = "xyes" ; then
51836    :
51837    CXX_COMP_SUPPORTS="yes"
51838  else
51839    :
51840    CXX_COMP_SUPPORTS="no"
51841  fi
51842
51843
51844
51845
51846
51847
51848
51849
51850
51851
51852
51853
51854
51855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51856$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51857  supports=no
51858  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51859
51860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51861$as_echo "$supports" >&6; }
51862  if test "x$supports" = "xyes" ; then
51863    :
51864    GCC_CAN_DISABLE_WARNINGS=true
51865  else
51866    :
51867    GCC_CAN_DISABLE_WARNINGS=false
51868
51869  fi
51870
51871
51872
51873
51874
51875
51876      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
51877        DISABLE_WARNING_PREFIX="-Wno-"
51878      else
51879        DISABLE_WARNING_PREFIX=
51880      fi
51881      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
51882      # Repeate the check for the BUILD_CC
51883      CC_OLD="$CC"
51884      CC="$BUILD_CC"
51885
51886
51887
51888
51889
51890
51891
51892
51893
51894
51895
51896
51897
51898
51899
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932    # Execute function body
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
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981    # Execute function body
51982
51983  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51984$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51985  supports=yes
51986
51987  saved_cflags="$CFLAGS"
51988  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51989  ac_ext=c
51990ac_cpp='$CPP $CPPFLAGS'
51991ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51992ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51993ac_compiler_gnu=$ac_cv_c_compiler_gnu
51994
51995  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51996/* end confdefs.h.  */
51997int i;
51998_ACEOF
51999if ac_fn_c_try_compile "$LINENO"; then :
52000
52001else
52002  supports=no
52003fi
52004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52005  ac_ext=cpp
52006ac_cpp='$CXXCPP $CPPFLAGS'
52007ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52008ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52009ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52010
52011  CFLAGS="$saved_cflags"
52012
52013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52014$as_echo "$supports" >&6; }
52015  if test "x$supports" = "xyes" ; then
52016    :
52017    C_COMP_SUPPORTS="yes"
52018  else
52019    :
52020    C_COMP_SUPPORTS="no"
52021  fi
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081    # Execute function body
52082
52083  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52084$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52085  supports=yes
52086
52087  saved_cxxflags="$CXXFLAGS"
52088  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52089  ac_ext=cpp
52090ac_cpp='$CXXCPP $CPPFLAGS'
52091ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52092ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52093ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52094
52095  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52096/* end confdefs.h.  */
52097int i;
52098_ACEOF
52099if ac_fn_cxx_try_compile "$LINENO"; then :
52100
52101else
52102  supports=no
52103fi
52104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52105  ac_ext=cpp
52106ac_cpp='$CXXCPP $CPPFLAGS'
52107ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52108ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52109ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52110
52111  CXXFLAGS="$saved_cxxflags"
52112
52113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52114$as_echo "$supports" >&6; }
52115  if test "x$supports" = "xyes" ; then
52116    :
52117    CXX_COMP_SUPPORTS="yes"
52118  else
52119    :
52120    CXX_COMP_SUPPORTS="no"
52121  fi
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52136$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52137  supports=no
52138  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52139
52140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52141$as_echo "$supports" >&6; }
52142  if test "x$supports" = "xyes" ; then
52143    :
52144    BUILD_CC_CAN_DISABLE_WARNINGS=true
52145  else
52146    :
52147    BUILD_CC_CAN_DISABLE_WARNINGS=false
52148
52149  fi
52150
52151
52152
52153
52154
52155
52156      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52157        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52158      else
52159        BUILD_CC_DISABLE_WARNING_PREFIX=
52160      fi
52161      CC="$CC_OLD"
52162      ;;
52163    clang)
52164      DISABLE_WARNING_PREFIX="-Wno-"
52165      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52166      ;;
52167    xlc)
52168      DISABLE_WARNING_PREFIX="-qsuppress="
52169      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52170      ;;
52171  esac
52172
52173
52174
52175
52176
52177# Setup debug symbols (need objcopy from the toolchain for that)
52178
52179  #
52180  # NATIVE_DEBUG_SYMBOLS
52181  # This must be done after the toolchain is setup, since we're looking at objcopy.
52182  #
52183  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52184$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52185
52186# Check whether --with-native-debug-symbols was given.
52187if test "${with_native_debug_symbols+set}" = set; then :
52188  withval=$with_native_debug_symbols;
52189        if test "x$OPENJDK_TARGET_OS" = xaix; then
52190          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52191            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52192          fi
52193        fi
52194
52195else
52196
52197        if test "x$OPENJDK_TARGET_OS" = xaix; then
52198          # AIX doesn't support 'zipped' so use 'internal' as default
52199          with_native_debug_symbols="internal"
52200        else
52201          if test "x$STATIC_BUILD" = xtrue; then
52202            with_native_debug_symbols="none"
52203          else
52204            with_native_debug_symbols="zipped"
52205          fi
52206        fi
52207
52208fi
52209
52210  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52212$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52213
52214  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52215
52216    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52217      if test "x$OBJCOPY" = x; then
52218        # enabling of enable-debug-symbols and can't find objcopy
52219        # this is an error
52220        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52221      fi
52222    fi
52223
52224    COMPILE_WITH_DEBUG_SYMBOLS=true
52225    COPY_DEBUG_SYMBOLS=true
52226    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52227
52228    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52229    DEBUG_BINARIES=false
52230    STRIP_POLICY=min_strip
52231
52232  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52233    COMPILE_WITH_DEBUG_SYMBOLS=false
52234    COPY_DEBUG_SYMBOLS=false
52235    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52236
52237    DEBUG_BINARIES=false
52238    STRIP_POLICY=no_strip
52239  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52240    COMPILE_WITH_DEBUG_SYMBOLS=true
52241    COPY_DEBUG_SYMBOLS=false
52242    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52243
52244    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52245    DEBUG_BINARIES=true
52246    STRIP_POLICY=no_strip
52247    STRIP=""
52248
52249  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52250
52251    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52252      if test "x$OBJCOPY" = x; then
52253        # enabling of enable-debug-symbols and can't find objcopy
52254        # this is an error
52255        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52256      fi
52257    fi
52258
52259    COMPILE_WITH_DEBUG_SYMBOLS=true
52260    COPY_DEBUG_SYMBOLS=true
52261    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52262
52263    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52264    DEBUG_BINARIES=false
52265    STRIP_POLICY=min_strip
52266  else
52267    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52268  fi
52269
52270  # --enable-debug-symbols is deprecated.
52271  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52272
52273  # Check whether --enable-debug-symbols was given.
52274if test "${enable_debug_symbols+set}" = set; then :
52275  enableval=$enable_debug_symbols;
52276fi
52277
52278  if test "x$enable_debug_symbols" != x; then
52279    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52280$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52281
52282    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52283      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52284$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52285    fi
52286
52287  fi
52288
52289
52290  # --enable-zip-debug-info is deprecated.
52291  # Please use --with-native-debug-symbols=zipped .
52292
52293  # Check whether --enable-zip-debug-info was given.
52294if test "${enable_zip_debug_info+set}" = set; then :
52295  enableval=$enable_zip_debug_info;
52296fi
52297
52298  if test "x$enable_zip_debug_info" != x; then
52299    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52300$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52301
52302    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52303      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52304$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52305    fi
52306
52307  fi
52308
52309
52310
52311
52312
52313
52314  # Legacy values
52315
52316
52317
52318
52319  # Check whether --enable-native-coverage was given.
52320if test "${enable_native_coverage+set}" = set; then :
52321  enableval=$enable_native_coverage;
52322fi
52323
52324  GCOV_ENABLED="false"
52325  if test "x$enable_native_coverage" = "xyes"; then
52326    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52327      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52328$as_echo_n "checking if native coverage is enabled... " >&6; }
52329      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52330$as_echo "yes" >&6; }
52331      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52332      GCOV_LDFLAGS="-fprofile-arcs"
52333      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52334      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52335      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52336      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52337      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52338      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52339      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52340      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52341      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52342      GCOV_ENABLED="true"
52343    else
52344      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52345    fi
52346  elif test "x$enable_native_coverage" = "xno"; then
52347    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52348$as_echo_n "checking if native coverage is enabled... " >&6; }
52349    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52350$as_echo "no" >&6; }
52351  elif test "x$enable_native_coverage" != "x"; then
52352    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52353  fi
52354
52355
52356
52357
52358# Need toolchain to setup dtrace
52359
52360  # Test for dtrace dependencies
52361  # Check whether --enable-dtrace was given.
52362if test "${enable_dtrace+set}" = set; then :
52363  enableval=$enable_dtrace;
52364fi
52365
52366
52367  DTRACE_DEP_MISSING=false
52368
52369  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52370$as_echo_n "checking for dtrace tool... " >&6; }
52371  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52373$as_echo "$DTRACE" >&6; }
52374  else
52375    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52376$as_echo "not found, cannot build dtrace" >&6; }
52377    DTRACE_DEP_MISSING=true
52378  fi
52379
52380  for ac_header in sys/sdt.h
52381do :
52382  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52383if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52384  cat >>confdefs.h <<_ACEOF
52385#define HAVE_SYS_SDT_H 1
52386_ACEOF
52387 DTRACE_HEADERS_OK=yes
52388else
52389  DTRACE_HEADERS_OK=no
52390fi
52391
52392done
52393
52394  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52395    DTRACE_DEP_MISSING=true
52396  fi
52397
52398  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52399$as_echo_n "checking if dtrace should be built... " >&6; }
52400  if test "x$enable_dtrace" = "xyes"; then
52401    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52402      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52403$as_echo "no, missing dependencies" >&6; }
52404
52405  # Print a helpful message on how to acquire the necessary build dependency.
52406  # dtrace is the help tag: freetype, cups, alsa etc
52407  MISSING_DEPENDENCY=dtrace
52408
52409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52410    cygwin_help $MISSING_DEPENDENCY
52411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52412    msys_help $MISSING_DEPENDENCY
52413  else
52414    PKGHANDLER_COMMAND=
52415
52416    case $PKGHANDLER in
52417      apt-get)
52418        apt_help     $MISSING_DEPENDENCY ;;
52419      yum)
52420        yum_help     $MISSING_DEPENDENCY ;;
52421      port)
52422        port_help    $MISSING_DEPENDENCY ;;
52423      pkgutil)
52424        pkgutil_help $MISSING_DEPENDENCY ;;
52425      pkgadd)
52426        pkgadd_help  $MISSING_DEPENDENCY ;;
52427    esac
52428
52429    if test "x$PKGHANDLER_COMMAND" != x; then
52430      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52431    fi
52432  fi
52433
52434      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52435    else
52436      INCLUDE_DTRACE=true
52437      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52438$as_echo "yes, forced" >&6; }
52439    fi
52440  elif test "x$enable_dtrace" = "xno"; then
52441    INCLUDE_DTRACE=false
52442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52443$as_echo "no, forced" >&6; }
52444  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52445    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
52446      INCLUDE_DTRACE=false
52447      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, non-open linux build" >&5
52448$as_echo "no, non-open linux build" >&6; }
52449    elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52450      INCLUDE_DTRACE=false
52451      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52452$as_echo "no, missing dependencies" >&6; }
52453    else
52454      INCLUDE_DTRACE=true
52455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52456$as_echo "yes, dependencies present" >&6; }
52457    fi
52458  else
52459    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52460  fi
52461
52462
52463
52464  # The user can in some cases supply additional jvm features. For the custom
52465  # variant, this defines the entire variant.
52466
52467# Check whether --with-jvm-features was given.
52468if test "${with_jvm_features+set}" = set; then :
52469  withval=$with_jvm_features;
52470fi
52471
52472  if test "x$with_jvm_features" != x; then
52473    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52474$as_echo_n "checking additional JVM features... " >&6; }
52475    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52477$as_echo "$JVM_FEATURES" >&6; }
52478  fi
52479
52480  # Verify that dependencies are met for explicitly set features.
52481  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52482    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52483  fi
52484
52485  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52486    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52487  fi
52488
52489  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && !   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ; then
52490    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2'" "$LINENO" 5
52491  fi
52492
52493  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52494    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52495  fi
52496
52497  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52498    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52499  fi
52500
52501  # Turn on additional features based on other parts of configure
52502  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52503    JVM_FEATURES="$JVM_FEATURES dtrace"
52504  else
52505    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52506      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52507    fi
52508  fi
52509
52510  if test "x$STATIC_BUILD" = "xtrue"; then
52511    JVM_FEATURES="$JVM_FEATURES static-build"
52512  else
52513    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52514      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52515    fi
52516  fi
52517
52518  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52519    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52520      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52521    fi
52522  fi
52523
52524  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52525    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52526      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52527    fi
52528  fi
52529
52530  # Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
52531  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52532      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52533      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52534    JVM_FEATURES_jvmci="jvmci"
52535  else
52536    JVM_FEATURES_jvmci=""
52537  fi
52538
52539  # All variants but minimal (and custom) get these features
52540  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52541
52542  # Enable features depending on variant.
52543  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52544  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
52545  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52546  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52547  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52548  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52549  JVM_FEATURES_custom="$JVM_FEATURES"
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559  # Used for verification of Makefiles by check-jvm-feature
52560
52561
52562  # We don't support --with-jvm-interpreter anymore, use zero instead.
52563
52564
52565# Check whether --with-jvm-interpreter was given.
52566if test "${with_jvm_interpreter+set}" = set; then :
52567  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52568$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52569fi
52570
52571
52572
52573
52574###############################################################################
52575#
52576# Check dependencies for external and internal libraries.
52577#
52578###############################################################################
52579
52580# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52581
52582  # When using cygwin or msys, we need a wrapper binary that renames
52583  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52584  # @files and rewrites these too! This wrapper binary is
52585  # called fixpath.
52586  FIXPATH=
52587  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52588    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52589$as_echo_n "checking if fixpath can be created... " >&6; }
52590    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52591    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52592    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52593    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52594      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52595      FIXPATH="$FIXPATH_BIN -c"
52596    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52597      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52598      # @ was chosen as separator to minimize risk of other tools messing around with it
52599      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52600          | tr ' ' '\n' | grep '^/./' | sort | uniq`
52601      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52602      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52603    fi
52604    FIXPATH_SRC_W="$FIXPATH_SRC"
52605    FIXPATH_BIN_W="$FIXPATH_BIN"
52606
52607  unix_path="$FIXPATH_SRC_W"
52608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52609    windows_path=`$CYGPATH -m "$unix_path"`
52610    FIXPATH_SRC_W="$windows_path"
52611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52612    windows_path=`cmd //c echo $unix_path`
52613    FIXPATH_SRC_W="$windows_path"
52614  fi
52615
52616
52617  unix_path="$FIXPATH_BIN_W"
52618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52619    windows_path=`$CYGPATH -m "$unix_path"`
52620    FIXPATH_BIN_W="$windows_path"
52621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52622    windows_path=`cmd //c echo $unix_path`
52623    FIXPATH_BIN_W="$windows_path"
52624  fi
52625
52626    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52627    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52628    cd $FIXPATH_DIR
52629    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52630    cd $CURDIR
52631
52632    if test ! -x $FIXPATH_BIN; then
52633      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52634$as_echo "no" >&6; }
52635      cat $FIXPATH_DIR/fixpath1.log
52636      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52637    fi
52638    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52639$as_echo "yes" >&6; }
52640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52641$as_echo_n "checking if fixpath.exe works... " >&6; }
52642    cd $FIXPATH_DIR
52643    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52644        > $FIXPATH_DIR/fixpath2.log 2>&1
52645    cd $CURDIR
52646    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52647      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52648$as_echo "no" >&6; }
52649      cat $FIXPATH_DIR/fixpath2.log
52650      as_fn_error $? "fixpath did not work!" "$LINENO" 5
52651    fi
52652    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52653$as_echo "yes" >&6; }
52654
52655    FIXPATH_DETACH_FLAG="--detach"
52656  fi
52657
52658
52659
52660
52661
52662
52663  # Check if X11 is needed
52664  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52665    # No X11 support on windows or macosx
52666    NEEDS_LIB_X11=false
52667  else
52668    if test "x$SUPPORT_HEADFUL" = xno; then
52669      # No X11 support if building headless-only
52670      NEEDS_LIB_X11=false
52671    else
52672      # All other instances need X11
52673      NEEDS_LIB_X11=true
52674    fi
52675  fi
52676
52677  # Check if cups is needed
52678  if test "x$OPENJDK_TARGET_OS" = xwindows; then
52679    # Windows have a separate print system
52680    NEEDS_LIB_CUPS=false
52681  else
52682    NEEDS_LIB_CUPS=true
52683  fi
52684
52685  # Check if freetype is needed
52686  if test "x$OPENJDK" = "xtrue"; then
52687    NEEDS_LIB_FREETYPE=true
52688  else
52689    NEEDS_LIB_FREETYPE=false
52690  fi
52691
52692  # Check if alsa is needed
52693  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52694    NEEDS_LIB_ALSA=true
52695  else
52696    NEEDS_LIB_ALSA=false
52697  fi
52698
52699  # Check if ffi is needed
52700  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52701    NEEDS_LIB_FFI=true
52702  else
52703    NEEDS_LIB_FFI=false
52704  fi
52705
52706
52707  # statically link libstdc++ before C++ ABI is stablized on Linux unless
52708  # dynamic build is configured on command line.
52709
52710# Check whether --with-stdc++lib was given.
52711if test "${with_stdc__lib+set}" = set; then :
52712  withval=$with_stdc__lib;
52713        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
52714                && test "x$with_stdc__lib" != xdefault; then
52715          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
52716        fi
52717
52718else
52719  with_stdc__lib=default
52720
52721fi
52722
52723
52724  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52725    # Test if -lstdc++ works.
52726    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
52727$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
52728    ac_ext=cpp
52729ac_cpp='$CXXCPP $CPPFLAGS'
52730ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52731ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52732ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52733
52734    OLD_CXXFLAGS="$CXXFLAGS"
52735    CXXFLAGS="$CXXFLAGS -lstdc++"
52736    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52737/* end confdefs.h.  */
52738
52739int
52740main ()
52741{
52742return 0;
52743  ;
52744  return 0;
52745}
52746_ACEOF
52747if ac_fn_cxx_try_link "$LINENO"; then :
52748  has_dynamic_libstdcxx=yes
52749else
52750  has_dynamic_libstdcxx=no
52751fi
52752rm -f core conftest.err conftest.$ac_objext \
52753    conftest$ac_exeext conftest.$ac_ext
52754    CXXFLAGS="$OLD_CXXFLAGS"
52755    ac_ext=cpp
52756ac_cpp='$CXXCPP $CPPFLAGS'
52757ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52758ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52759ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52760
52761    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
52762$as_echo "$has_dynamic_libstdcxx" >&6; }
52763
52764    # Test if stdc++ can be linked statically.
52765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
52766$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
52767    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
52768    ac_ext=cpp
52769ac_cpp='$CXXCPP $CPPFLAGS'
52770ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52771ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52772ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52773
52774    OLD_LIBS="$LIBS"
52775    OLD_CXX="$CXX"
52776    LIBS="$STATIC_STDCXX_FLAGS"
52777    CXX="$CC"
52778    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52779/* end confdefs.h.  */
52780
52781int
52782main ()
52783{
52784return 0;
52785  ;
52786  return 0;
52787}
52788_ACEOF
52789if ac_fn_cxx_try_link "$LINENO"; then :
52790  has_static_libstdcxx=yes
52791else
52792  has_static_libstdcxx=no
52793fi
52794rm -f core conftest.err conftest.$ac_objext \
52795    conftest$ac_exeext conftest.$ac_ext
52796    LIBS="$OLD_LIBS"
52797    CXX="$OLD_CXX"
52798    ac_ext=cpp
52799ac_cpp='$CXXCPP $CPPFLAGS'
52800ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52801ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52802ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52803
52804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
52805$as_echo "$has_static_libstdcxx" >&6; }
52806
52807    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
52808      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
52809    fi
52810
52811    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
52812      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
52813    fi
52814
52815    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
52816      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
52817    fi
52818
52819    # If dynamic was requested, it's available since it would fail above otherwise.
52820    # If dynamic wasn't requested, go with static unless it isn't available.
52821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
52822$as_echo_n "checking how to link with libstdc++... " >&6; }
52823    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52824      LIBCXX="$LIBCXX -lstdc++"
52825      # To help comparisons with old build, put stdc++ first in JVM_LIBS
52826      JVM_LIBS="-lstdc++ $JVM_LIBS"
52827      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52828      # just use the same setting as for the TARGET toolchain.
52829      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
52830      LDCXX="$CXX"
52831      STATIC_CXX_SETTING="STATIC_CXX=false"
52832      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
52833$as_echo "dynamic" >&6; }
52834    else
52835      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
52836      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
52837      # To help comparisons with old build, put stdc++ first in JVM_LIBS
52838      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
52839      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52840      # just use the same setting as for the TARGET toolchain.
52841      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
52842      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
52843      LDCXX="$CC"
52844      STATIC_CXX_SETTING="STATIC_CXX=true"
52845      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
52846$as_echo "static" >&6; }
52847    fi
52848  fi
52849
52850
52851  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
52852  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
52853    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
52854  fi
52855
52856  # TODO better (platform agnostic) test
52857  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
52858    LIBCXX="-lstdc++"
52859  fi
52860
52861
52862  # Setup Windows runtime dlls
52863  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52864
52865
52866# Check whether --with-msvcr-dll was given.
52867if test "${with_msvcr_dll+set}" = set; then :
52868  withval=$with_msvcr_dll;
52869fi
52870
52871
52872  if test "x$with_msvcr_dll" != x; then
52873    # If given explicitely by user, do not probe. If not present, fail directly.
52874
52875  DLL_NAME="$MSVCR_NAME"
52876  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
52877  METHOD="--with-msvcr-dll"
52878  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52879    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52880$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52881
52882    # Need to check if the found msvcr is correct architecture
52883    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52884$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52885    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52886    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52887      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52888      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52889      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52890        CORRECT_MSVCR_ARCH="PE32 executable"
52891      else
52892        CORRECT_MSVCR_ARCH="PE32+ executable"
52893      fi
52894    else
52895      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52896        CORRECT_MSVCR_ARCH=386
52897      else
52898        CORRECT_MSVCR_ARCH=x86-64
52899      fi
52900    fi
52901    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52903$as_echo "ok" >&6; }
52904      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52905
52906  # Only process if variable expands to non-empty
52907
52908  if test "x$MSVC_DLL" != x; then
52909    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52910
52911  # Input might be given as Windows format, start by converting to
52912  # unix format.
52913  path="$MSVC_DLL"
52914  new_path=`$CYGPATH -u "$path"`
52915
52916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52919  # "foo.exe" is OK but "foo" is an error.
52920  #
52921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52922  # It is also a way to make sure we got the proper file name for the real test later on.
52923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52924  if test "x$test_shortpath" = x; then
52925    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52926$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52927    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52928  fi
52929
52930  # Call helper function which possibly converts this using DOS-style short mode.
52931  # If so, the updated path is stored in $new_path.
52932
52933  input_path="$new_path"
52934  # Check if we need to convert this using DOS-style short mode. If the path
52935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52936  # take no chances and rewrite it.
52937  # Note: m4 eats our [], so we need to use [ and ] instead.
52938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52939  if test "x$has_forbidden_chars" != x; then
52940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52944      # Going to short mode and back again did indeed matter. Since short mode is
52945      # case insensitive, let's make it lowercase to improve readability.
52946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52947      # Now convert it back to Unix-style (cygpath)
52948      input_path=`$CYGPATH -u "$shortmode_path"`
52949      new_path="$input_path"
52950    fi
52951  fi
52952
52953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52954  if test "x$test_cygdrive_prefix" = x; then
52955    # As a simple fix, exclude /usr/bin since it's not a real path.
52956    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52958      # a path prefixed by /cygdrive for fixpath to work.
52959      new_path="$CYGWIN_ROOT_PATH$input_path"
52960    fi
52961  fi
52962
52963
52964  if test "x$path" != "x$new_path"; then
52965    MSVC_DLL="$new_path"
52966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52967$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52968  fi
52969
52970    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52971
52972  path="$MSVC_DLL"
52973  has_colon=`$ECHO $path | $GREP ^.:`
52974  new_path="$path"
52975  if test "x$has_colon" = x; then
52976    # Not in mixed or Windows style, start by that.
52977    new_path=`cmd //c echo $path`
52978  fi
52979
52980
52981  input_path="$new_path"
52982  # Check if we need to convert this using DOS-style short mode. If the path
52983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52984  # take no chances and rewrite it.
52985  # Note: m4 eats our [], so we need to use [ and ] instead.
52986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52987  if test "x$has_forbidden_chars" != x; then
52988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52990  fi
52991
52992
52993  windows_path="$new_path"
52994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52995    unix_path=`$CYGPATH -u "$windows_path"`
52996    new_path="$unix_path"
52997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52999    new_path="$unix_path"
53000  fi
53001
53002  if test "x$path" != "x$new_path"; then
53003    MSVC_DLL="$new_path"
53004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53005$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53006  fi
53007
53008  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53009  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53010
53011    else
53012      # We're on a unix platform. Hooray! :)
53013      path="$MSVC_DLL"
53014      has_space=`$ECHO "$path" | $GREP " "`
53015      if test "x$has_space" != x; then
53016        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53017$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53018        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53019      fi
53020
53021      # Use eval to expand a potential ~
53022      eval path="$path"
53023      if test ! -f "$path" && test ! -d "$path"; then
53024        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53025      fi
53026
53027      if test -d "$path"; then
53028        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53029      else
53030        dir="`$DIRNAME "$path"`"
53031        base="`$BASENAME "$path"`"
53032        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53033      fi
53034    fi
53035  fi
53036
53037      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53038$as_echo_n "checking for $DLL_NAME... " >&6; }
53039      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53040$as_echo "$MSVC_DLL" >&6; }
53041    else
53042      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53043$as_echo "incorrect, ignoring" >&6; }
53044      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53045$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53046    fi
53047  fi
53048
53049    if test "x$MSVC_DLL" = x; then
53050      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53051    fi
53052    MSVCR_DLL="$MSVC_DLL"
53053  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53054
53055  DLL_NAME="$MSVCR_NAME"
53056  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53057  METHOD="devkit"
53058  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53059    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53060$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53061
53062    # Need to check if the found msvcr is correct architecture
53063    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53064$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53065    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53066    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53067      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53068      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53069      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53070        CORRECT_MSVCR_ARCH="PE32 executable"
53071      else
53072        CORRECT_MSVCR_ARCH="PE32+ executable"
53073      fi
53074    else
53075      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53076        CORRECT_MSVCR_ARCH=386
53077      else
53078        CORRECT_MSVCR_ARCH=x86-64
53079      fi
53080    fi
53081    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53082      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53083$as_echo "ok" >&6; }
53084      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53085
53086  # Only process if variable expands to non-empty
53087
53088  if test "x$MSVC_DLL" != x; then
53089    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53090
53091  # Input might be given as Windows format, start by converting to
53092  # unix format.
53093  path="$MSVC_DLL"
53094  new_path=`$CYGPATH -u "$path"`
53095
53096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53099  # "foo.exe" is OK but "foo" is an error.
53100  #
53101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53102  # It is also a way to make sure we got the proper file name for the real test later on.
53103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53104  if test "x$test_shortpath" = x; then
53105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53106$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53107    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53108  fi
53109
53110  # Call helper function which possibly converts this using DOS-style short mode.
53111  # If so, the updated path is stored in $new_path.
53112
53113  input_path="$new_path"
53114  # Check if we need to convert this using DOS-style short mode. If the path
53115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53116  # take no chances and rewrite it.
53117  # Note: m4 eats our [], so we need to use [ and ] instead.
53118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53119  if test "x$has_forbidden_chars" != x; then
53120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53124      # Going to short mode and back again did indeed matter. Since short mode is
53125      # case insensitive, let's make it lowercase to improve readability.
53126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53127      # Now convert it back to Unix-style (cygpath)
53128      input_path=`$CYGPATH -u "$shortmode_path"`
53129      new_path="$input_path"
53130    fi
53131  fi
53132
53133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53134  if test "x$test_cygdrive_prefix" = x; then
53135    # As a simple fix, exclude /usr/bin since it's not a real path.
53136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53138      # a path prefixed by /cygdrive for fixpath to work.
53139      new_path="$CYGWIN_ROOT_PATH$input_path"
53140    fi
53141  fi
53142
53143
53144  if test "x$path" != "x$new_path"; then
53145    MSVC_DLL="$new_path"
53146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53147$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53148  fi
53149
53150    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53151
53152  path="$MSVC_DLL"
53153  has_colon=`$ECHO $path | $GREP ^.:`
53154  new_path="$path"
53155  if test "x$has_colon" = x; then
53156    # Not in mixed or Windows style, start by that.
53157    new_path=`cmd //c echo $path`
53158  fi
53159
53160
53161  input_path="$new_path"
53162  # Check if we need to convert this using DOS-style short mode. If the path
53163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53164  # take no chances and rewrite it.
53165  # Note: m4 eats our [], so we need to use [ and ] instead.
53166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53167  if test "x$has_forbidden_chars" != x; then
53168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53170  fi
53171
53172
53173  windows_path="$new_path"
53174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53175    unix_path=`$CYGPATH -u "$windows_path"`
53176    new_path="$unix_path"
53177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53179    new_path="$unix_path"
53180  fi
53181
53182  if test "x$path" != "x$new_path"; then
53183    MSVC_DLL="$new_path"
53184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53185$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53186  fi
53187
53188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53190
53191    else
53192      # We're on a unix platform. Hooray! :)
53193      path="$MSVC_DLL"
53194      has_space=`$ECHO "$path" | $GREP " "`
53195      if test "x$has_space" != x; then
53196        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53197$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53198        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53199      fi
53200
53201      # Use eval to expand a potential ~
53202      eval path="$path"
53203      if test ! -f "$path" && test ! -d "$path"; then
53204        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53205      fi
53206
53207      if test -d "$path"; then
53208        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53209      else
53210        dir="`$DIRNAME "$path"`"
53211        base="`$BASENAME "$path"`"
53212        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53213      fi
53214    fi
53215  fi
53216
53217      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53218$as_echo_n "checking for $DLL_NAME... " >&6; }
53219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53220$as_echo "$MSVC_DLL" >&6; }
53221    else
53222      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53223$as_echo "incorrect, ignoring" >&6; }
53224      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53225$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53226    fi
53227  fi
53228
53229    if test "x$MSVC_DLL" = x; then
53230      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53231    fi
53232    MSVCR_DLL="$MSVC_DLL"
53233  else
53234
53235  DLL_NAME="${MSVCR_NAME}"
53236  MSVC_DLL=
53237
53238  if test "x$MSVC_DLL" = x; then
53239    # Probe: Using well-known location from Visual Studio 10.0
53240    if test "x$VCINSTALLDIR" != x; then
53241      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53242
53243  windows_path="$CYGWIN_VC_INSTALL_DIR"
53244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53245    unix_path=`$CYGPATH -u "$windows_path"`
53246    CYGWIN_VC_INSTALL_DIR="$unix_path"
53247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53249    CYGWIN_VC_INSTALL_DIR="$unix_path"
53250  fi
53251
53252      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53253        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53254      else
53255        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53256      fi
53257      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53258
53259  DLL_NAME="$DLL_NAME"
53260  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53261  METHOD="well-known location in VCINSTALLDIR"
53262  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53263    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53264$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53265
53266    # Need to check if the found msvcr is correct architecture
53267    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53268$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53269    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53270    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53271      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53272      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53273      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53274        CORRECT_MSVCR_ARCH="PE32 executable"
53275      else
53276        CORRECT_MSVCR_ARCH="PE32+ executable"
53277      fi
53278    else
53279      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53280        CORRECT_MSVCR_ARCH=386
53281      else
53282        CORRECT_MSVCR_ARCH=x86-64
53283      fi
53284    fi
53285    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53286      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53287$as_echo "ok" >&6; }
53288      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53289
53290  # Only process if variable expands to non-empty
53291
53292  if test "x$MSVC_DLL" != x; then
53293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53294
53295  # Input might be given as Windows format, start by converting to
53296  # unix format.
53297  path="$MSVC_DLL"
53298  new_path=`$CYGPATH -u "$path"`
53299
53300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53303  # "foo.exe" is OK but "foo" is an error.
53304  #
53305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53306  # It is also a way to make sure we got the proper file name for the real test later on.
53307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53308  if test "x$test_shortpath" = x; then
53309    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53310$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53311    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53312  fi
53313
53314  # Call helper function which possibly converts this using DOS-style short mode.
53315  # If so, the updated path is stored in $new_path.
53316
53317  input_path="$new_path"
53318  # Check if we need to convert this using DOS-style short mode. If the path
53319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53320  # take no chances and rewrite it.
53321  # Note: m4 eats our [], so we need to use [ and ] instead.
53322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53323  if test "x$has_forbidden_chars" != x; then
53324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53328      # Going to short mode and back again did indeed matter. Since short mode is
53329      # case insensitive, let's make it lowercase to improve readability.
53330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53331      # Now convert it back to Unix-style (cygpath)
53332      input_path=`$CYGPATH -u "$shortmode_path"`
53333      new_path="$input_path"
53334    fi
53335  fi
53336
53337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53338  if test "x$test_cygdrive_prefix" = x; then
53339    # As a simple fix, exclude /usr/bin since it's not a real path.
53340    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53342      # a path prefixed by /cygdrive for fixpath to work.
53343      new_path="$CYGWIN_ROOT_PATH$input_path"
53344    fi
53345  fi
53346
53347
53348  if test "x$path" != "x$new_path"; then
53349    MSVC_DLL="$new_path"
53350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53351$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53352  fi
53353
53354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53355
53356  path="$MSVC_DLL"
53357  has_colon=`$ECHO $path | $GREP ^.:`
53358  new_path="$path"
53359  if test "x$has_colon" = x; then
53360    # Not in mixed or Windows style, start by that.
53361    new_path=`cmd //c echo $path`
53362  fi
53363
53364
53365  input_path="$new_path"
53366  # Check if we need to convert this using DOS-style short mode. If the path
53367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53368  # take no chances and rewrite it.
53369  # Note: m4 eats our [], so we need to use [ and ] instead.
53370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53371  if test "x$has_forbidden_chars" != x; then
53372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53374  fi
53375
53376
53377  windows_path="$new_path"
53378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53379    unix_path=`$CYGPATH -u "$windows_path"`
53380    new_path="$unix_path"
53381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53383    new_path="$unix_path"
53384  fi
53385
53386  if test "x$path" != "x$new_path"; then
53387    MSVC_DLL="$new_path"
53388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53389$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53390  fi
53391
53392  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53393  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53394
53395    else
53396      # We're on a unix platform. Hooray! :)
53397      path="$MSVC_DLL"
53398      has_space=`$ECHO "$path" | $GREP " "`
53399      if test "x$has_space" != x; then
53400        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53401$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53402        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53403      fi
53404
53405      # Use eval to expand a potential ~
53406      eval path="$path"
53407      if test ! -f "$path" && test ! -d "$path"; then
53408        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53409      fi
53410
53411      if test -d "$path"; then
53412        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53413      else
53414        dir="`$DIRNAME "$path"`"
53415        base="`$BASENAME "$path"`"
53416        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53417      fi
53418    fi
53419  fi
53420
53421      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53422$as_echo_n "checking for $DLL_NAME... " >&6; }
53423      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53424$as_echo "$MSVC_DLL" >&6; }
53425    else
53426      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53427$as_echo "incorrect, ignoring" >&6; }
53428      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53429$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53430    fi
53431  fi
53432
53433    fi
53434  fi
53435
53436  if test "x$MSVC_DLL" = x; then
53437    # Probe: Check in the Boot JDK directory.
53438    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53439
53440  DLL_NAME="$DLL_NAME"
53441  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53442  METHOD="well-known location in Boot JDK"
53443  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53444    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53445$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53446
53447    # Need to check if the found msvcr is correct architecture
53448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53449$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53450    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53451    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53452      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53453      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53454      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53455        CORRECT_MSVCR_ARCH="PE32 executable"
53456      else
53457        CORRECT_MSVCR_ARCH="PE32+ executable"
53458      fi
53459    else
53460      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53461        CORRECT_MSVCR_ARCH=386
53462      else
53463        CORRECT_MSVCR_ARCH=x86-64
53464      fi
53465    fi
53466    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53468$as_echo "ok" >&6; }
53469      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53470
53471  # Only process if variable expands to non-empty
53472
53473  if test "x$MSVC_DLL" != x; then
53474    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53475
53476  # Input might be given as Windows format, start by converting to
53477  # unix format.
53478  path="$MSVC_DLL"
53479  new_path=`$CYGPATH -u "$path"`
53480
53481  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53482  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53483  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53484  # "foo.exe" is OK but "foo" is an error.
53485  #
53486  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53487  # It is also a way to make sure we got the proper file name for the real test later on.
53488  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53489  if test "x$test_shortpath" = x; then
53490    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53491$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53492    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53493  fi
53494
53495  # Call helper function which possibly converts this using DOS-style short mode.
53496  # If so, the updated path is stored in $new_path.
53497
53498  input_path="$new_path"
53499  # Check if we need to convert this using DOS-style short mode. If the path
53500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53501  # take no chances and rewrite it.
53502  # Note: m4 eats our [], so we need to use [ and ] instead.
53503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53504  if test "x$has_forbidden_chars" != x; then
53505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53509      # Going to short mode and back again did indeed matter. Since short mode is
53510      # case insensitive, let's make it lowercase to improve readability.
53511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53512      # Now convert it back to Unix-style (cygpath)
53513      input_path=`$CYGPATH -u "$shortmode_path"`
53514      new_path="$input_path"
53515    fi
53516  fi
53517
53518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53519  if test "x$test_cygdrive_prefix" = x; then
53520    # As a simple fix, exclude /usr/bin since it's not a real path.
53521    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53523      # a path prefixed by /cygdrive for fixpath to work.
53524      new_path="$CYGWIN_ROOT_PATH$input_path"
53525    fi
53526  fi
53527
53528
53529  if test "x$path" != "x$new_path"; then
53530    MSVC_DLL="$new_path"
53531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53532$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53533  fi
53534
53535    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53536
53537  path="$MSVC_DLL"
53538  has_colon=`$ECHO $path | $GREP ^.:`
53539  new_path="$path"
53540  if test "x$has_colon" = x; then
53541    # Not in mixed or Windows style, start by that.
53542    new_path=`cmd //c echo $path`
53543  fi
53544
53545
53546  input_path="$new_path"
53547  # Check if we need to convert this using DOS-style short mode. If the path
53548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53549  # take no chances and rewrite it.
53550  # Note: m4 eats our [], so we need to use [ and ] instead.
53551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53552  if test "x$has_forbidden_chars" != x; then
53553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53555  fi
53556
53557
53558  windows_path="$new_path"
53559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53560    unix_path=`$CYGPATH -u "$windows_path"`
53561    new_path="$unix_path"
53562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53564    new_path="$unix_path"
53565  fi
53566
53567  if test "x$path" != "x$new_path"; then
53568    MSVC_DLL="$new_path"
53569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53570$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53571  fi
53572
53573  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53574  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53575
53576    else
53577      # We're on a unix platform. Hooray! :)
53578      path="$MSVC_DLL"
53579      has_space=`$ECHO "$path" | $GREP " "`
53580      if test "x$has_space" != x; then
53581        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53582$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53583        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53584      fi
53585
53586      # Use eval to expand a potential ~
53587      eval path="$path"
53588      if test ! -f "$path" && test ! -d "$path"; then
53589        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53590      fi
53591
53592      if test -d "$path"; then
53593        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53594      else
53595        dir="`$DIRNAME "$path"`"
53596        base="`$BASENAME "$path"`"
53597        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53598      fi
53599    fi
53600  fi
53601
53602      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53603$as_echo_n "checking for $DLL_NAME... " >&6; }
53604      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53605$as_echo "$MSVC_DLL" >&6; }
53606    else
53607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53608$as_echo "incorrect, ignoring" >&6; }
53609      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53610$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53611    fi
53612  fi
53613
53614  fi
53615
53616  if test "x$MSVC_DLL" = x; then
53617    # Probe: Look in the Windows system32 directory
53618    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53619
53620  windows_path="$CYGWIN_SYSTEMROOT"
53621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53622    unix_path=`$CYGPATH -u "$windows_path"`
53623    CYGWIN_SYSTEMROOT="$unix_path"
53624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53626    CYGWIN_SYSTEMROOT="$unix_path"
53627  fi
53628
53629    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53630
53631  DLL_NAME="$DLL_NAME"
53632  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53633  METHOD="well-known location in SYSTEMROOT"
53634  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53635    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53636$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53637
53638    # Need to check if the found msvcr is correct architecture
53639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53640$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53641    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53642    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53643      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53644      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53645      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53646        CORRECT_MSVCR_ARCH="PE32 executable"
53647      else
53648        CORRECT_MSVCR_ARCH="PE32+ executable"
53649      fi
53650    else
53651      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53652        CORRECT_MSVCR_ARCH=386
53653      else
53654        CORRECT_MSVCR_ARCH=x86-64
53655      fi
53656    fi
53657    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53658      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53659$as_echo "ok" >&6; }
53660      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53661
53662  # Only process if variable expands to non-empty
53663
53664  if test "x$MSVC_DLL" != x; then
53665    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53666
53667  # Input might be given as Windows format, start by converting to
53668  # unix format.
53669  path="$MSVC_DLL"
53670  new_path=`$CYGPATH -u "$path"`
53671
53672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53675  # "foo.exe" is OK but "foo" is an error.
53676  #
53677  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53678  # It is also a way to make sure we got the proper file name for the real test later on.
53679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53680  if test "x$test_shortpath" = x; then
53681    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53682$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53683    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53684  fi
53685
53686  # Call helper function which possibly converts this using DOS-style short mode.
53687  # If so, the updated path is stored in $new_path.
53688
53689  input_path="$new_path"
53690  # Check if we need to convert this using DOS-style short mode. If the path
53691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53692  # take no chances and rewrite it.
53693  # Note: m4 eats our [], so we need to use [ and ] instead.
53694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53695  if test "x$has_forbidden_chars" != x; then
53696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53700      # Going to short mode and back again did indeed matter. Since short mode is
53701      # case insensitive, let's make it lowercase to improve readability.
53702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53703      # Now convert it back to Unix-style (cygpath)
53704      input_path=`$CYGPATH -u "$shortmode_path"`
53705      new_path="$input_path"
53706    fi
53707  fi
53708
53709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53710  if test "x$test_cygdrive_prefix" = x; then
53711    # As a simple fix, exclude /usr/bin since it's not a real path.
53712    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53714      # a path prefixed by /cygdrive for fixpath to work.
53715      new_path="$CYGWIN_ROOT_PATH$input_path"
53716    fi
53717  fi
53718
53719
53720  if test "x$path" != "x$new_path"; then
53721    MSVC_DLL="$new_path"
53722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53723$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53724  fi
53725
53726    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53727
53728  path="$MSVC_DLL"
53729  has_colon=`$ECHO $path | $GREP ^.:`
53730  new_path="$path"
53731  if test "x$has_colon" = x; then
53732    # Not in mixed or Windows style, start by that.
53733    new_path=`cmd //c echo $path`
53734  fi
53735
53736
53737  input_path="$new_path"
53738  # Check if we need to convert this using DOS-style short mode. If the path
53739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53740  # take no chances and rewrite it.
53741  # Note: m4 eats our [], so we need to use [ and ] instead.
53742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53743  if test "x$has_forbidden_chars" != x; then
53744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53746  fi
53747
53748
53749  windows_path="$new_path"
53750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53751    unix_path=`$CYGPATH -u "$windows_path"`
53752    new_path="$unix_path"
53753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53755    new_path="$unix_path"
53756  fi
53757
53758  if test "x$path" != "x$new_path"; then
53759    MSVC_DLL="$new_path"
53760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53761$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53762  fi
53763
53764  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53765  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53766
53767    else
53768      # We're on a unix platform. Hooray! :)
53769      path="$MSVC_DLL"
53770      has_space=`$ECHO "$path" | $GREP " "`
53771      if test "x$has_space" != x; then
53772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53773$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53774        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53775      fi
53776
53777      # Use eval to expand a potential ~
53778      eval path="$path"
53779      if test ! -f "$path" && test ! -d "$path"; then
53780        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53781      fi
53782
53783      if test -d "$path"; then
53784        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53785      else
53786        dir="`$DIRNAME "$path"`"
53787        base="`$BASENAME "$path"`"
53788        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53789      fi
53790    fi
53791  fi
53792
53793      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53794$as_echo_n "checking for $DLL_NAME... " >&6; }
53795      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53796$as_echo "$MSVC_DLL" >&6; }
53797    else
53798      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53799$as_echo "incorrect, ignoring" >&6; }
53800      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53801$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53802    fi
53803  fi
53804
53805  fi
53806
53807  if test "x$MSVC_DLL" = x; then
53808    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
53809    if test "x$VS100COMNTOOLS" != x; then
53810      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
53811
53812  windows_path="$CYGWIN_VS_TOOLS_DIR"
53813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53814    unix_path=`$CYGPATH -u "$windows_path"`
53815    CYGWIN_VS_TOOLS_DIR="$unix_path"
53816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53818    CYGWIN_VS_TOOLS_DIR="$unix_path"
53819  fi
53820
53821      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53822        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53823	    | $GREP -i /x64/ | $HEAD --lines 1`
53824      else
53825        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53826	    | $GREP -i /x86/ | $HEAD --lines 1`
53827      fi
53828
53829  DLL_NAME="$DLL_NAME"
53830  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53831  METHOD="search of VS100COMNTOOLS"
53832  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53833    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53834$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53835
53836    # Need to check if the found msvcr is correct architecture
53837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53838$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53839    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53840    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53841      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53842      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53843      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53844        CORRECT_MSVCR_ARCH="PE32 executable"
53845      else
53846        CORRECT_MSVCR_ARCH="PE32+ executable"
53847      fi
53848    else
53849      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53850        CORRECT_MSVCR_ARCH=386
53851      else
53852        CORRECT_MSVCR_ARCH=x86-64
53853      fi
53854    fi
53855    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53857$as_echo "ok" >&6; }
53858      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53859
53860  # Only process if variable expands to non-empty
53861
53862  if test "x$MSVC_DLL" != x; then
53863    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53864
53865  # Input might be given as Windows format, start by converting to
53866  # unix format.
53867  path="$MSVC_DLL"
53868  new_path=`$CYGPATH -u "$path"`
53869
53870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53873  # "foo.exe" is OK but "foo" is an error.
53874  #
53875  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53876  # It is also a way to make sure we got the proper file name for the real test later on.
53877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53878  if test "x$test_shortpath" = x; then
53879    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53880$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53881    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53882  fi
53883
53884  # Call helper function which possibly converts this using DOS-style short mode.
53885  # If so, the updated path is stored in $new_path.
53886
53887  input_path="$new_path"
53888  # Check if we need to convert this using DOS-style short mode. If the path
53889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53890  # take no chances and rewrite it.
53891  # Note: m4 eats our [], so we need to use [ and ] instead.
53892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53893  if test "x$has_forbidden_chars" != x; then
53894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53898      # Going to short mode and back again did indeed matter. Since short mode is
53899      # case insensitive, let's make it lowercase to improve readability.
53900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53901      # Now convert it back to Unix-style (cygpath)
53902      input_path=`$CYGPATH -u "$shortmode_path"`
53903      new_path="$input_path"
53904    fi
53905  fi
53906
53907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53908  if test "x$test_cygdrive_prefix" = x; then
53909    # As a simple fix, exclude /usr/bin since it's not a real path.
53910    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53912      # a path prefixed by /cygdrive for fixpath to work.
53913      new_path="$CYGWIN_ROOT_PATH$input_path"
53914    fi
53915  fi
53916
53917
53918  if test "x$path" != "x$new_path"; then
53919    MSVC_DLL="$new_path"
53920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53921$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53922  fi
53923
53924    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53925
53926  path="$MSVC_DLL"
53927  has_colon=`$ECHO $path | $GREP ^.:`
53928  new_path="$path"
53929  if test "x$has_colon" = x; then
53930    # Not in mixed or Windows style, start by that.
53931    new_path=`cmd //c echo $path`
53932  fi
53933
53934
53935  input_path="$new_path"
53936  # Check if we need to convert this using DOS-style short mode. If the path
53937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53938  # take no chances and rewrite it.
53939  # Note: m4 eats our [], so we need to use [ and ] instead.
53940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53941  if test "x$has_forbidden_chars" != x; then
53942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53943    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53944  fi
53945
53946
53947  windows_path="$new_path"
53948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53949    unix_path=`$CYGPATH -u "$windows_path"`
53950    new_path="$unix_path"
53951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53953    new_path="$unix_path"
53954  fi
53955
53956  if test "x$path" != "x$new_path"; then
53957    MSVC_DLL="$new_path"
53958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53959$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53960  fi
53961
53962  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53963  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53964
53965    else
53966      # We're on a unix platform. Hooray! :)
53967      path="$MSVC_DLL"
53968      has_space=`$ECHO "$path" | $GREP " "`
53969      if test "x$has_space" != x; then
53970        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53971$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53972        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53973      fi
53974
53975      # Use eval to expand a potential ~
53976      eval path="$path"
53977      if test ! -f "$path" && test ! -d "$path"; then
53978        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53979      fi
53980
53981      if test -d "$path"; then
53982        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53983      else
53984        dir="`$DIRNAME "$path"`"
53985        base="`$BASENAME "$path"`"
53986        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53987      fi
53988    fi
53989  fi
53990
53991      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53992$as_echo_n "checking for $DLL_NAME... " >&6; }
53993      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53994$as_echo "$MSVC_DLL" >&6; }
53995    else
53996      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53997$as_echo "incorrect, ignoring" >&6; }
53998      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53999$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54000    fi
54001  fi
54002
54003    fi
54004  fi
54005
54006  if test "x$MSVC_DLL" = x; then
54007    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54008    # (This was the original behaviour; kept since it might turn something up)
54009    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54010      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54011        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54012	    | $GREP x64 | $HEAD --lines 1`
54013      else
54014        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54015	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54016        if test "x$POSSIBLE_MSVC_DLL" = x; then
54017          # We're grasping at straws now...
54018          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54019	      | $HEAD --lines 1`
54020        fi
54021      fi
54022
54023
54024  DLL_NAME="$DLL_NAME"
54025  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54026  METHOD="search of VCINSTALLDIR"
54027  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54028    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54029$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54030
54031    # Need to check if the found msvcr is correct architecture
54032    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54033$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54034    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54035    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54036      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54037      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54038      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54039        CORRECT_MSVCR_ARCH="PE32 executable"
54040      else
54041        CORRECT_MSVCR_ARCH="PE32+ executable"
54042      fi
54043    else
54044      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54045        CORRECT_MSVCR_ARCH=386
54046      else
54047        CORRECT_MSVCR_ARCH=x86-64
54048      fi
54049    fi
54050    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54052$as_echo "ok" >&6; }
54053      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54054
54055  # Only process if variable expands to non-empty
54056
54057  if test "x$MSVC_DLL" != x; then
54058    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54059
54060  # Input might be given as Windows format, start by converting to
54061  # unix format.
54062  path="$MSVC_DLL"
54063  new_path=`$CYGPATH -u "$path"`
54064
54065  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54066  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54067  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54068  # "foo.exe" is OK but "foo" is an error.
54069  #
54070  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54071  # It is also a way to make sure we got the proper file name for the real test later on.
54072  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54073  if test "x$test_shortpath" = x; then
54074    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54075$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54076    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54077  fi
54078
54079  # Call helper function which possibly converts this using DOS-style short mode.
54080  # If so, the updated path is stored in $new_path.
54081
54082  input_path="$new_path"
54083  # Check if we need to convert this using DOS-style short mode. If the path
54084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54085  # take no chances and rewrite it.
54086  # Note: m4 eats our [], so we need to use [ and ] instead.
54087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54088  if test "x$has_forbidden_chars" != x; then
54089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54093      # Going to short mode and back again did indeed matter. Since short mode is
54094      # case insensitive, let's make it lowercase to improve readability.
54095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54096      # Now convert it back to Unix-style (cygpath)
54097      input_path=`$CYGPATH -u "$shortmode_path"`
54098      new_path="$input_path"
54099    fi
54100  fi
54101
54102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54103  if test "x$test_cygdrive_prefix" = x; then
54104    # As a simple fix, exclude /usr/bin since it's not a real path.
54105    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54107      # a path prefixed by /cygdrive for fixpath to work.
54108      new_path="$CYGWIN_ROOT_PATH$input_path"
54109    fi
54110  fi
54111
54112
54113  if test "x$path" != "x$new_path"; then
54114    MSVC_DLL="$new_path"
54115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54116$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54117  fi
54118
54119    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54120
54121  path="$MSVC_DLL"
54122  has_colon=`$ECHO $path | $GREP ^.:`
54123  new_path="$path"
54124  if test "x$has_colon" = x; then
54125    # Not in mixed or Windows style, start by that.
54126    new_path=`cmd //c echo $path`
54127  fi
54128
54129
54130  input_path="$new_path"
54131  # Check if we need to convert this using DOS-style short mode. If the path
54132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54133  # take no chances and rewrite it.
54134  # Note: m4 eats our [], so we need to use [ and ] instead.
54135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54136  if test "x$has_forbidden_chars" != x; then
54137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54138    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54139  fi
54140
54141
54142  windows_path="$new_path"
54143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54144    unix_path=`$CYGPATH -u "$windows_path"`
54145    new_path="$unix_path"
54146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54148    new_path="$unix_path"
54149  fi
54150
54151  if test "x$path" != "x$new_path"; then
54152    MSVC_DLL="$new_path"
54153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54154$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54155  fi
54156
54157  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54158  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54159
54160    else
54161      # We're on a unix platform. Hooray! :)
54162      path="$MSVC_DLL"
54163      has_space=`$ECHO "$path" | $GREP " "`
54164      if test "x$has_space" != x; then
54165        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54166$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54167        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54168      fi
54169
54170      # Use eval to expand a potential ~
54171      eval path="$path"
54172      if test ! -f "$path" && test ! -d "$path"; then
54173        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54174      fi
54175
54176      if test -d "$path"; then
54177        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54178      else
54179        dir="`$DIRNAME "$path"`"
54180        base="`$BASENAME "$path"`"
54181        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54182      fi
54183    fi
54184  fi
54185
54186      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54187$as_echo_n "checking for $DLL_NAME... " >&6; }
54188      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54189$as_echo "$MSVC_DLL" >&6; }
54190    else
54191      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54192$as_echo "incorrect, ignoring" >&6; }
54193      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54194$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54195    fi
54196  fi
54197
54198    fi
54199  fi
54200
54201  if test "x$MSVC_DLL" = x; then
54202    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54203$as_echo_n "checking for $DLL_NAME... " >&6; }
54204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54205$as_echo "no" >&6; }
54206    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54207  fi
54208
54209    MSVCR_DLL="$MSVC_DLL"
54210  fi
54211
54212
54213
54214# Check whether --with-msvcp-dll was given.
54215if test "${with_msvcp_dll+set}" = set; then :
54216  withval=$with_msvcp_dll;
54217fi
54218
54219
54220  if test "x$MSVCP_NAME" != "x"; then
54221    if test "x$with_msvcp_dll" != x; then
54222      # If given explicitely by user, do not probe. If not present, fail directly.
54223
54224  DLL_NAME="$MSVCP_NAME"
54225  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54226  METHOD="--with-msvcp-dll"
54227  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54228    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54229$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54230
54231    # Need to check if the found msvcr is correct architecture
54232    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54233$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54234    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54236      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54237      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54238      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54239        CORRECT_MSVCR_ARCH="PE32 executable"
54240      else
54241        CORRECT_MSVCR_ARCH="PE32+ executable"
54242      fi
54243    else
54244      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54245        CORRECT_MSVCR_ARCH=386
54246      else
54247        CORRECT_MSVCR_ARCH=x86-64
54248      fi
54249    fi
54250    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54251      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54252$as_echo "ok" >&6; }
54253      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54254
54255  # Only process if variable expands to non-empty
54256
54257  if test "x$MSVC_DLL" != x; then
54258    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54259
54260  # Input might be given as Windows format, start by converting to
54261  # unix format.
54262  path="$MSVC_DLL"
54263  new_path=`$CYGPATH -u "$path"`
54264
54265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54268  # "foo.exe" is OK but "foo" is an error.
54269  #
54270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54271  # It is also a way to make sure we got the proper file name for the real test later on.
54272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54273  if test "x$test_shortpath" = x; then
54274    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54275$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54276    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54277  fi
54278
54279  # Call helper function which possibly converts this using DOS-style short mode.
54280  # If so, the updated path is stored in $new_path.
54281
54282  input_path="$new_path"
54283  # Check if we need to convert this using DOS-style short mode. If the path
54284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54285  # take no chances and rewrite it.
54286  # Note: m4 eats our [], so we need to use [ and ] instead.
54287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54288  if test "x$has_forbidden_chars" != x; then
54289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54293      # Going to short mode and back again did indeed matter. Since short mode is
54294      # case insensitive, let's make it lowercase to improve readability.
54295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54296      # Now convert it back to Unix-style (cygpath)
54297      input_path=`$CYGPATH -u "$shortmode_path"`
54298      new_path="$input_path"
54299    fi
54300  fi
54301
54302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54303  if test "x$test_cygdrive_prefix" = x; then
54304    # As a simple fix, exclude /usr/bin since it's not a real path.
54305    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54307      # a path prefixed by /cygdrive for fixpath to work.
54308      new_path="$CYGWIN_ROOT_PATH$input_path"
54309    fi
54310  fi
54311
54312
54313  if test "x$path" != "x$new_path"; then
54314    MSVC_DLL="$new_path"
54315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54316$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54317  fi
54318
54319    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54320
54321  path="$MSVC_DLL"
54322  has_colon=`$ECHO $path | $GREP ^.:`
54323  new_path="$path"
54324  if test "x$has_colon" = x; then
54325    # Not in mixed or Windows style, start by that.
54326    new_path=`cmd //c echo $path`
54327  fi
54328
54329
54330  input_path="$new_path"
54331  # Check if we need to convert this using DOS-style short mode. If the path
54332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54333  # take no chances and rewrite it.
54334  # Note: m4 eats our [], so we need to use [ and ] instead.
54335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54336  if test "x$has_forbidden_chars" != x; then
54337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54339  fi
54340
54341
54342  windows_path="$new_path"
54343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54344    unix_path=`$CYGPATH -u "$windows_path"`
54345    new_path="$unix_path"
54346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54348    new_path="$unix_path"
54349  fi
54350
54351  if test "x$path" != "x$new_path"; then
54352    MSVC_DLL="$new_path"
54353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54354$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54355  fi
54356
54357  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54358  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54359
54360    else
54361      # We're on a unix platform. Hooray! :)
54362      path="$MSVC_DLL"
54363      has_space=`$ECHO "$path" | $GREP " "`
54364      if test "x$has_space" != x; then
54365        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54366$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54367        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54368      fi
54369
54370      # Use eval to expand a potential ~
54371      eval path="$path"
54372      if test ! -f "$path" && test ! -d "$path"; then
54373        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54374      fi
54375
54376      if test -d "$path"; then
54377        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54378      else
54379        dir="`$DIRNAME "$path"`"
54380        base="`$BASENAME "$path"`"
54381        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54382      fi
54383    fi
54384  fi
54385
54386      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54387$as_echo_n "checking for $DLL_NAME... " >&6; }
54388      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54389$as_echo "$MSVC_DLL" >&6; }
54390    else
54391      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54392$as_echo "incorrect, ignoring" >&6; }
54393      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54394$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54395    fi
54396  fi
54397
54398      if test "x$MSVC_DLL" = x; then
54399        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54400      fi
54401      MSVCP_DLL="$MSVC_DLL"
54402    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54403
54404  DLL_NAME="$MSVCP_NAME"
54405  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54406  METHOD="devkit"
54407  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54408    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54409$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54410
54411    # Need to check if the found msvcr is correct architecture
54412    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54413$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54414    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54415    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54416      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54417      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54418      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54419        CORRECT_MSVCR_ARCH="PE32 executable"
54420      else
54421        CORRECT_MSVCR_ARCH="PE32+ executable"
54422      fi
54423    else
54424      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54425        CORRECT_MSVCR_ARCH=386
54426      else
54427        CORRECT_MSVCR_ARCH=x86-64
54428      fi
54429    fi
54430    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54432$as_echo "ok" >&6; }
54433      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54434
54435  # Only process if variable expands to non-empty
54436
54437  if test "x$MSVC_DLL" != x; then
54438    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54439
54440  # Input might be given as Windows format, start by converting to
54441  # unix format.
54442  path="$MSVC_DLL"
54443  new_path=`$CYGPATH -u "$path"`
54444
54445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54448  # "foo.exe" is OK but "foo" is an error.
54449  #
54450  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54451  # It is also a way to make sure we got the proper file name for the real test later on.
54452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54453  if test "x$test_shortpath" = x; then
54454    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54455$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54456    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54457  fi
54458
54459  # Call helper function which possibly converts this using DOS-style short mode.
54460  # If so, the updated path is stored in $new_path.
54461
54462  input_path="$new_path"
54463  # Check if we need to convert this using DOS-style short mode. If the path
54464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54465  # take no chances and rewrite it.
54466  # Note: m4 eats our [], so we need to use [ and ] instead.
54467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54468  if test "x$has_forbidden_chars" != x; then
54469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54473      # Going to short mode and back again did indeed matter. Since short mode is
54474      # case insensitive, let's make it lowercase to improve readability.
54475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54476      # Now convert it back to Unix-style (cygpath)
54477      input_path=`$CYGPATH -u "$shortmode_path"`
54478      new_path="$input_path"
54479    fi
54480  fi
54481
54482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54483  if test "x$test_cygdrive_prefix" = x; then
54484    # As a simple fix, exclude /usr/bin since it's not a real path.
54485    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54487      # a path prefixed by /cygdrive for fixpath to work.
54488      new_path="$CYGWIN_ROOT_PATH$input_path"
54489    fi
54490  fi
54491
54492
54493  if test "x$path" != "x$new_path"; then
54494    MSVC_DLL="$new_path"
54495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54496$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54497  fi
54498
54499    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54500
54501  path="$MSVC_DLL"
54502  has_colon=`$ECHO $path | $GREP ^.:`
54503  new_path="$path"
54504  if test "x$has_colon" = x; then
54505    # Not in mixed or Windows style, start by that.
54506    new_path=`cmd //c echo $path`
54507  fi
54508
54509
54510  input_path="$new_path"
54511  # Check if we need to convert this using DOS-style short mode. If the path
54512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54513  # take no chances and rewrite it.
54514  # Note: m4 eats our [], so we need to use [ and ] instead.
54515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54516  if test "x$has_forbidden_chars" != x; then
54517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54519  fi
54520
54521
54522  windows_path="$new_path"
54523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54524    unix_path=`$CYGPATH -u "$windows_path"`
54525    new_path="$unix_path"
54526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54528    new_path="$unix_path"
54529  fi
54530
54531  if test "x$path" != "x$new_path"; then
54532    MSVC_DLL="$new_path"
54533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54534$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54535  fi
54536
54537  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54538  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54539
54540    else
54541      # We're on a unix platform. Hooray! :)
54542      path="$MSVC_DLL"
54543      has_space=`$ECHO "$path" | $GREP " "`
54544      if test "x$has_space" != x; then
54545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54546$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54547        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54548      fi
54549
54550      # Use eval to expand a potential ~
54551      eval path="$path"
54552      if test ! -f "$path" && test ! -d "$path"; then
54553        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54554      fi
54555
54556      if test -d "$path"; then
54557        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54558      else
54559        dir="`$DIRNAME "$path"`"
54560        base="`$BASENAME "$path"`"
54561        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54562      fi
54563    fi
54564  fi
54565
54566      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54567$as_echo_n "checking for $DLL_NAME... " >&6; }
54568      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54569$as_echo "$MSVC_DLL" >&6; }
54570    else
54571      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54572$as_echo "incorrect, ignoring" >&6; }
54573      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54574$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54575    fi
54576  fi
54577
54578      if test "x$MSVC_DLL" = x; then
54579        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54580      fi
54581      MSVCP_DLL="$MSVC_DLL"
54582    else
54583
54584  DLL_NAME="${MSVCP_NAME}"
54585  MSVC_DLL=
54586
54587  if test "x$MSVC_DLL" = x; then
54588    # Probe: Using well-known location from Visual Studio 10.0
54589    if test "x$VCINSTALLDIR" != x; then
54590      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54591
54592  windows_path="$CYGWIN_VC_INSTALL_DIR"
54593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54594    unix_path=`$CYGPATH -u "$windows_path"`
54595    CYGWIN_VC_INSTALL_DIR="$unix_path"
54596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54598    CYGWIN_VC_INSTALL_DIR="$unix_path"
54599  fi
54600
54601      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54602        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54603      else
54604        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54605      fi
54606      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54607
54608  DLL_NAME="$DLL_NAME"
54609  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54610  METHOD="well-known location in VCINSTALLDIR"
54611  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54612    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54613$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54614
54615    # Need to check if the found msvcr is correct architecture
54616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54617$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54618    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54619    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54620      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54621      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54622      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54623        CORRECT_MSVCR_ARCH="PE32 executable"
54624      else
54625        CORRECT_MSVCR_ARCH="PE32+ executable"
54626      fi
54627    else
54628      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54629        CORRECT_MSVCR_ARCH=386
54630      else
54631        CORRECT_MSVCR_ARCH=x86-64
54632      fi
54633    fi
54634    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54636$as_echo "ok" >&6; }
54637      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54638
54639  # Only process if variable expands to non-empty
54640
54641  if test "x$MSVC_DLL" != x; then
54642    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54643
54644  # Input might be given as Windows format, start by converting to
54645  # unix format.
54646  path="$MSVC_DLL"
54647  new_path=`$CYGPATH -u "$path"`
54648
54649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54652  # "foo.exe" is OK but "foo" is an error.
54653  #
54654  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54655  # It is also a way to make sure we got the proper file name for the real test later on.
54656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54657  if test "x$test_shortpath" = x; then
54658    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54659$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54660    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54661  fi
54662
54663  # Call helper function which possibly converts this using DOS-style short mode.
54664  # If so, the updated path is stored in $new_path.
54665
54666  input_path="$new_path"
54667  # Check if we need to convert this using DOS-style short mode. If the path
54668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54669  # take no chances and rewrite it.
54670  # Note: m4 eats our [], so we need to use [ and ] instead.
54671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54672  if test "x$has_forbidden_chars" != x; then
54673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54677      # Going to short mode and back again did indeed matter. Since short mode is
54678      # case insensitive, let's make it lowercase to improve readability.
54679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54680      # Now convert it back to Unix-style (cygpath)
54681      input_path=`$CYGPATH -u "$shortmode_path"`
54682      new_path="$input_path"
54683    fi
54684  fi
54685
54686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54687  if test "x$test_cygdrive_prefix" = x; then
54688    # As a simple fix, exclude /usr/bin since it's not a real path.
54689    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54691      # a path prefixed by /cygdrive for fixpath to work.
54692      new_path="$CYGWIN_ROOT_PATH$input_path"
54693    fi
54694  fi
54695
54696
54697  if test "x$path" != "x$new_path"; then
54698    MSVC_DLL="$new_path"
54699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54700$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54701  fi
54702
54703    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54704
54705  path="$MSVC_DLL"
54706  has_colon=`$ECHO $path | $GREP ^.:`
54707  new_path="$path"
54708  if test "x$has_colon" = x; then
54709    # Not in mixed or Windows style, start by that.
54710    new_path=`cmd //c echo $path`
54711  fi
54712
54713
54714  input_path="$new_path"
54715  # Check if we need to convert this using DOS-style short mode. If the path
54716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54717  # take no chances and rewrite it.
54718  # Note: m4 eats our [], so we need to use [ and ] instead.
54719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54720  if test "x$has_forbidden_chars" != x; then
54721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54723  fi
54724
54725
54726  windows_path="$new_path"
54727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54728    unix_path=`$CYGPATH -u "$windows_path"`
54729    new_path="$unix_path"
54730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54732    new_path="$unix_path"
54733  fi
54734
54735  if test "x$path" != "x$new_path"; then
54736    MSVC_DLL="$new_path"
54737    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54738$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54739  fi
54740
54741  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54742  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54743
54744    else
54745      # We're on a unix platform. Hooray! :)
54746      path="$MSVC_DLL"
54747      has_space=`$ECHO "$path" | $GREP " "`
54748      if test "x$has_space" != x; then
54749        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54750$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54751        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54752      fi
54753
54754      # Use eval to expand a potential ~
54755      eval path="$path"
54756      if test ! -f "$path" && test ! -d "$path"; then
54757        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54758      fi
54759
54760      if test -d "$path"; then
54761        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54762      else
54763        dir="`$DIRNAME "$path"`"
54764        base="`$BASENAME "$path"`"
54765        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54766      fi
54767    fi
54768  fi
54769
54770      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54771$as_echo_n "checking for $DLL_NAME... " >&6; }
54772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54773$as_echo "$MSVC_DLL" >&6; }
54774    else
54775      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54776$as_echo "incorrect, ignoring" >&6; }
54777      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54778$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54779    fi
54780  fi
54781
54782    fi
54783  fi
54784
54785  if test "x$MSVC_DLL" = x; then
54786    # Probe: Check in the Boot JDK directory.
54787    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54788
54789  DLL_NAME="$DLL_NAME"
54790  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54791  METHOD="well-known location in Boot JDK"
54792  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54793    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54794$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54795
54796    # Need to check if the found msvcr is correct architecture
54797    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54798$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54799    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54801      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54802      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54803      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54804        CORRECT_MSVCR_ARCH="PE32 executable"
54805      else
54806        CORRECT_MSVCR_ARCH="PE32+ executable"
54807      fi
54808    else
54809      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54810        CORRECT_MSVCR_ARCH=386
54811      else
54812        CORRECT_MSVCR_ARCH=x86-64
54813      fi
54814    fi
54815    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54816      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54817$as_echo "ok" >&6; }
54818      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54819
54820  # Only process if variable expands to non-empty
54821
54822  if test "x$MSVC_DLL" != x; then
54823    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54824
54825  # Input might be given as Windows format, start by converting to
54826  # unix format.
54827  path="$MSVC_DLL"
54828  new_path=`$CYGPATH -u "$path"`
54829
54830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54833  # "foo.exe" is OK but "foo" is an error.
54834  #
54835  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54836  # It is also a way to make sure we got the proper file name for the real test later on.
54837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54838  if test "x$test_shortpath" = x; then
54839    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54840$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54841    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54842  fi
54843
54844  # Call helper function which possibly converts this using DOS-style short mode.
54845  # If so, the updated path is stored in $new_path.
54846
54847  input_path="$new_path"
54848  # Check if we need to convert this using DOS-style short mode. If the path
54849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54850  # take no chances and rewrite it.
54851  # Note: m4 eats our [], so we need to use [ and ] instead.
54852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54853  if test "x$has_forbidden_chars" != x; then
54854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54858      # Going to short mode and back again did indeed matter. Since short mode is
54859      # case insensitive, let's make it lowercase to improve readability.
54860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54861      # Now convert it back to Unix-style (cygpath)
54862      input_path=`$CYGPATH -u "$shortmode_path"`
54863      new_path="$input_path"
54864    fi
54865  fi
54866
54867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54868  if test "x$test_cygdrive_prefix" = x; then
54869    # As a simple fix, exclude /usr/bin since it's not a real path.
54870    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54872      # a path prefixed by /cygdrive for fixpath to work.
54873      new_path="$CYGWIN_ROOT_PATH$input_path"
54874    fi
54875  fi
54876
54877
54878  if test "x$path" != "x$new_path"; then
54879    MSVC_DLL="$new_path"
54880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54881$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54882  fi
54883
54884    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54885
54886  path="$MSVC_DLL"
54887  has_colon=`$ECHO $path | $GREP ^.:`
54888  new_path="$path"
54889  if test "x$has_colon" = x; then
54890    # Not in mixed or Windows style, start by that.
54891    new_path=`cmd //c echo $path`
54892  fi
54893
54894
54895  input_path="$new_path"
54896  # Check if we need to convert this using DOS-style short mode. If the path
54897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54898  # take no chances and rewrite it.
54899  # Note: m4 eats our [], so we need to use [ and ] instead.
54900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54901  if test "x$has_forbidden_chars" != x; then
54902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54904  fi
54905
54906
54907  windows_path="$new_path"
54908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54909    unix_path=`$CYGPATH -u "$windows_path"`
54910    new_path="$unix_path"
54911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54913    new_path="$unix_path"
54914  fi
54915
54916  if test "x$path" != "x$new_path"; then
54917    MSVC_DLL="$new_path"
54918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54919$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54920  fi
54921
54922  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54923  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54924
54925    else
54926      # We're on a unix platform. Hooray! :)
54927      path="$MSVC_DLL"
54928      has_space=`$ECHO "$path" | $GREP " "`
54929      if test "x$has_space" != x; then
54930        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54931$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54932        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54933      fi
54934
54935      # Use eval to expand a potential ~
54936      eval path="$path"
54937      if test ! -f "$path" && test ! -d "$path"; then
54938        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54939      fi
54940
54941      if test -d "$path"; then
54942        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54943      else
54944        dir="`$DIRNAME "$path"`"
54945        base="`$BASENAME "$path"`"
54946        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54947      fi
54948    fi
54949  fi
54950
54951      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54952$as_echo_n "checking for $DLL_NAME... " >&6; }
54953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54954$as_echo "$MSVC_DLL" >&6; }
54955    else
54956      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54957$as_echo "incorrect, ignoring" >&6; }
54958      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54959$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54960    fi
54961  fi
54962
54963  fi
54964
54965  if test "x$MSVC_DLL" = x; then
54966    # Probe: Look in the Windows system32 directory
54967    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54968
54969  windows_path="$CYGWIN_SYSTEMROOT"
54970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54971    unix_path=`$CYGPATH -u "$windows_path"`
54972    CYGWIN_SYSTEMROOT="$unix_path"
54973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54975    CYGWIN_SYSTEMROOT="$unix_path"
54976  fi
54977
54978    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54979
54980  DLL_NAME="$DLL_NAME"
54981  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54982  METHOD="well-known location in SYSTEMROOT"
54983  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54984    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54985$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54986
54987    # Need to check if the found msvcr is correct architecture
54988    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54989$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54990    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54991    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54992      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54993      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54994      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54995        CORRECT_MSVCR_ARCH="PE32 executable"
54996      else
54997        CORRECT_MSVCR_ARCH="PE32+ executable"
54998      fi
54999    else
55000      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55001        CORRECT_MSVCR_ARCH=386
55002      else
55003        CORRECT_MSVCR_ARCH=x86-64
55004      fi
55005    fi
55006    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55007      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55008$as_echo "ok" >&6; }
55009      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55010
55011  # Only process if variable expands to non-empty
55012
55013  if test "x$MSVC_DLL" != x; then
55014    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55015
55016  # Input might be given as Windows format, start by converting to
55017  # unix format.
55018  path="$MSVC_DLL"
55019  new_path=`$CYGPATH -u "$path"`
55020
55021  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55022  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55023  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55024  # "foo.exe" is OK but "foo" is an error.
55025  #
55026  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55027  # It is also a way to make sure we got the proper file name for the real test later on.
55028  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55029  if test "x$test_shortpath" = x; then
55030    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55031$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55032    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55033  fi
55034
55035  # Call helper function which possibly converts this using DOS-style short mode.
55036  # If so, the updated path is stored in $new_path.
55037
55038  input_path="$new_path"
55039  # Check if we need to convert this using DOS-style short mode. If the path
55040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55041  # take no chances and rewrite it.
55042  # Note: m4 eats our [], so we need to use [ and ] instead.
55043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55044  if test "x$has_forbidden_chars" != x; then
55045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55046    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55047    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55048    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55049      # Going to short mode and back again did indeed matter. Since short mode is
55050      # case insensitive, let's make it lowercase to improve readability.
55051      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55052      # Now convert it back to Unix-style (cygpath)
55053      input_path=`$CYGPATH -u "$shortmode_path"`
55054      new_path="$input_path"
55055    fi
55056  fi
55057
55058  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55059  if test "x$test_cygdrive_prefix" = x; then
55060    # As a simple fix, exclude /usr/bin since it's not a real path.
55061    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55062      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55063      # a path prefixed by /cygdrive for fixpath to work.
55064      new_path="$CYGWIN_ROOT_PATH$input_path"
55065    fi
55066  fi
55067
55068
55069  if test "x$path" != "x$new_path"; then
55070    MSVC_DLL="$new_path"
55071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55072$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55073  fi
55074
55075    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55076
55077  path="$MSVC_DLL"
55078  has_colon=`$ECHO $path | $GREP ^.:`
55079  new_path="$path"
55080  if test "x$has_colon" = x; then
55081    # Not in mixed or Windows style, start by that.
55082    new_path=`cmd //c echo $path`
55083  fi
55084
55085
55086  input_path="$new_path"
55087  # Check if we need to convert this using DOS-style short mode. If the path
55088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55089  # take no chances and rewrite it.
55090  # Note: m4 eats our [], so we need to use [ and ] instead.
55091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55092  if test "x$has_forbidden_chars" != x; then
55093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55095  fi
55096
55097
55098  windows_path="$new_path"
55099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55100    unix_path=`$CYGPATH -u "$windows_path"`
55101    new_path="$unix_path"
55102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55104    new_path="$unix_path"
55105  fi
55106
55107  if test "x$path" != "x$new_path"; then
55108    MSVC_DLL="$new_path"
55109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55110$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55111  fi
55112
55113  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55114  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55115
55116    else
55117      # We're on a unix platform. Hooray! :)
55118      path="$MSVC_DLL"
55119      has_space=`$ECHO "$path" | $GREP " "`
55120      if test "x$has_space" != x; then
55121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55122$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55123        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55124      fi
55125
55126      # Use eval to expand a potential ~
55127      eval path="$path"
55128      if test ! -f "$path" && test ! -d "$path"; then
55129        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55130      fi
55131
55132      if test -d "$path"; then
55133        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55134      else
55135        dir="`$DIRNAME "$path"`"
55136        base="`$BASENAME "$path"`"
55137        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55138      fi
55139    fi
55140  fi
55141
55142      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55143$as_echo_n "checking for $DLL_NAME... " >&6; }
55144      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55145$as_echo "$MSVC_DLL" >&6; }
55146    else
55147      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55148$as_echo "incorrect, ignoring" >&6; }
55149      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55150$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55151    fi
55152  fi
55153
55154  fi
55155
55156  if test "x$MSVC_DLL" = x; then
55157    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55158    if test "x$VS100COMNTOOLS" != x; then
55159      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55160
55161  windows_path="$CYGWIN_VS_TOOLS_DIR"
55162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55163    unix_path=`$CYGPATH -u "$windows_path"`
55164    CYGWIN_VS_TOOLS_DIR="$unix_path"
55165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55167    CYGWIN_VS_TOOLS_DIR="$unix_path"
55168  fi
55169
55170      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55171        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55172	    | $GREP -i /x64/ | $HEAD --lines 1`
55173      else
55174        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55175	    | $GREP -i /x86/ | $HEAD --lines 1`
55176      fi
55177
55178  DLL_NAME="$DLL_NAME"
55179  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55180  METHOD="search of VS100COMNTOOLS"
55181  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55182    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55183$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55184
55185    # Need to check if the found msvcr is correct architecture
55186    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55187$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55188    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55189    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55190      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55191      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55192      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55193        CORRECT_MSVCR_ARCH="PE32 executable"
55194      else
55195        CORRECT_MSVCR_ARCH="PE32+ executable"
55196      fi
55197    else
55198      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55199        CORRECT_MSVCR_ARCH=386
55200      else
55201        CORRECT_MSVCR_ARCH=x86-64
55202      fi
55203    fi
55204    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55205      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55206$as_echo "ok" >&6; }
55207      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55208
55209  # Only process if variable expands to non-empty
55210
55211  if test "x$MSVC_DLL" != x; then
55212    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55213
55214  # Input might be given as Windows format, start by converting to
55215  # unix format.
55216  path="$MSVC_DLL"
55217  new_path=`$CYGPATH -u "$path"`
55218
55219  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55220  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55221  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55222  # "foo.exe" is OK but "foo" is an error.
55223  #
55224  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55225  # It is also a way to make sure we got the proper file name for the real test later on.
55226  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55227  if test "x$test_shortpath" = x; then
55228    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55229$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55230    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55231  fi
55232
55233  # Call helper function which possibly converts this using DOS-style short mode.
55234  # If so, the updated path is stored in $new_path.
55235
55236  input_path="$new_path"
55237  # Check if we need to convert this using DOS-style short mode. If the path
55238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55239  # take no chances and rewrite it.
55240  # Note: m4 eats our [], so we need to use [ and ] instead.
55241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55242  if test "x$has_forbidden_chars" != x; then
55243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55247      # Going to short mode and back again did indeed matter. Since short mode is
55248      # case insensitive, let's make it lowercase to improve readability.
55249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55250      # Now convert it back to Unix-style (cygpath)
55251      input_path=`$CYGPATH -u "$shortmode_path"`
55252      new_path="$input_path"
55253    fi
55254  fi
55255
55256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55257  if test "x$test_cygdrive_prefix" = x; then
55258    # As a simple fix, exclude /usr/bin since it's not a real path.
55259    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55261      # a path prefixed by /cygdrive for fixpath to work.
55262      new_path="$CYGWIN_ROOT_PATH$input_path"
55263    fi
55264  fi
55265
55266
55267  if test "x$path" != "x$new_path"; then
55268    MSVC_DLL="$new_path"
55269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55270$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55271  fi
55272
55273    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55274
55275  path="$MSVC_DLL"
55276  has_colon=`$ECHO $path | $GREP ^.:`
55277  new_path="$path"
55278  if test "x$has_colon" = x; then
55279    # Not in mixed or Windows style, start by that.
55280    new_path=`cmd //c echo $path`
55281  fi
55282
55283
55284  input_path="$new_path"
55285  # Check if we need to convert this using DOS-style short mode. If the path
55286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55287  # take no chances and rewrite it.
55288  # Note: m4 eats our [], so we need to use [ and ] instead.
55289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55290  if test "x$has_forbidden_chars" != x; then
55291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55293  fi
55294
55295
55296  windows_path="$new_path"
55297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55298    unix_path=`$CYGPATH -u "$windows_path"`
55299    new_path="$unix_path"
55300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55302    new_path="$unix_path"
55303  fi
55304
55305  if test "x$path" != "x$new_path"; then
55306    MSVC_DLL="$new_path"
55307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55308$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55309  fi
55310
55311  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55312  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55313
55314    else
55315      # We're on a unix platform. Hooray! :)
55316      path="$MSVC_DLL"
55317      has_space=`$ECHO "$path" | $GREP " "`
55318      if test "x$has_space" != x; then
55319        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55320$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55321        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55322      fi
55323
55324      # Use eval to expand a potential ~
55325      eval path="$path"
55326      if test ! -f "$path" && test ! -d "$path"; then
55327        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55328      fi
55329
55330      if test -d "$path"; then
55331        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55332      else
55333        dir="`$DIRNAME "$path"`"
55334        base="`$BASENAME "$path"`"
55335        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55336      fi
55337    fi
55338  fi
55339
55340      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55341$as_echo_n "checking for $DLL_NAME... " >&6; }
55342      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55343$as_echo "$MSVC_DLL" >&6; }
55344    else
55345      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55346$as_echo "incorrect, ignoring" >&6; }
55347      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55348$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55349    fi
55350  fi
55351
55352    fi
55353  fi
55354
55355  if test "x$MSVC_DLL" = x; then
55356    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55357    # (This was the original behaviour; kept since it might turn something up)
55358    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55359      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55360        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55361	    | $GREP x64 | $HEAD --lines 1`
55362      else
55363        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55364	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55365        if test "x$POSSIBLE_MSVC_DLL" = x; then
55366          # We're grasping at straws now...
55367          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55368	      | $HEAD --lines 1`
55369        fi
55370      fi
55371
55372
55373  DLL_NAME="$DLL_NAME"
55374  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55375  METHOD="search of VCINSTALLDIR"
55376  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55377    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55378$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55379
55380    # Need to check if the found msvcr is correct architecture
55381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55382$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55383    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55384    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55385      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55386      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55387      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55388        CORRECT_MSVCR_ARCH="PE32 executable"
55389      else
55390        CORRECT_MSVCR_ARCH="PE32+ executable"
55391      fi
55392    else
55393      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55394        CORRECT_MSVCR_ARCH=386
55395      else
55396        CORRECT_MSVCR_ARCH=x86-64
55397      fi
55398    fi
55399    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55400      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55401$as_echo "ok" >&6; }
55402      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55403
55404  # Only process if variable expands to non-empty
55405
55406  if test "x$MSVC_DLL" != x; then
55407    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55408
55409  # Input might be given as Windows format, start by converting to
55410  # unix format.
55411  path="$MSVC_DLL"
55412  new_path=`$CYGPATH -u "$path"`
55413
55414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55417  # "foo.exe" is OK but "foo" is an error.
55418  #
55419  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55420  # It is also a way to make sure we got the proper file name for the real test later on.
55421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55422  if test "x$test_shortpath" = x; then
55423    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55424$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55425    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55426  fi
55427
55428  # Call helper function which possibly converts this using DOS-style short mode.
55429  # If so, the updated path is stored in $new_path.
55430
55431  input_path="$new_path"
55432  # Check if we need to convert this using DOS-style short mode. If the path
55433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55434  # take no chances and rewrite it.
55435  # Note: m4 eats our [], so we need to use [ and ] instead.
55436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55437  if test "x$has_forbidden_chars" != x; then
55438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55442      # Going to short mode and back again did indeed matter. Since short mode is
55443      # case insensitive, let's make it lowercase to improve readability.
55444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55445      # Now convert it back to Unix-style (cygpath)
55446      input_path=`$CYGPATH -u "$shortmode_path"`
55447      new_path="$input_path"
55448    fi
55449  fi
55450
55451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55452  if test "x$test_cygdrive_prefix" = x; then
55453    # As a simple fix, exclude /usr/bin since it's not a real path.
55454    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55456      # a path prefixed by /cygdrive for fixpath to work.
55457      new_path="$CYGWIN_ROOT_PATH$input_path"
55458    fi
55459  fi
55460
55461
55462  if test "x$path" != "x$new_path"; then
55463    MSVC_DLL="$new_path"
55464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55465$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55466  fi
55467
55468    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55469
55470  path="$MSVC_DLL"
55471  has_colon=`$ECHO $path | $GREP ^.:`
55472  new_path="$path"
55473  if test "x$has_colon" = x; then
55474    # Not in mixed or Windows style, start by that.
55475    new_path=`cmd //c echo $path`
55476  fi
55477
55478
55479  input_path="$new_path"
55480  # Check if we need to convert this using DOS-style short mode. If the path
55481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55482  # take no chances and rewrite it.
55483  # Note: m4 eats our [], so we need to use [ and ] instead.
55484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55485  if test "x$has_forbidden_chars" != x; then
55486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55488  fi
55489
55490
55491  windows_path="$new_path"
55492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55493    unix_path=`$CYGPATH -u "$windows_path"`
55494    new_path="$unix_path"
55495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55497    new_path="$unix_path"
55498  fi
55499
55500  if test "x$path" != "x$new_path"; then
55501    MSVC_DLL="$new_path"
55502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55503$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55504  fi
55505
55506  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55507  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55508
55509    else
55510      # We're on a unix platform. Hooray! :)
55511      path="$MSVC_DLL"
55512      has_space=`$ECHO "$path" | $GREP " "`
55513      if test "x$has_space" != x; then
55514        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55515$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55516        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55517      fi
55518
55519      # Use eval to expand a potential ~
55520      eval path="$path"
55521      if test ! -f "$path" && test ! -d "$path"; then
55522        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55523      fi
55524
55525      if test -d "$path"; then
55526        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55527      else
55528        dir="`$DIRNAME "$path"`"
55529        base="`$BASENAME "$path"`"
55530        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55531      fi
55532    fi
55533  fi
55534
55535      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55536$as_echo_n "checking for $DLL_NAME... " >&6; }
55537      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55538$as_echo "$MSVC_DLL" >&6; }
55539    else
55540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55541$as_echo "incorrect, ignoring" >&6; }
55542      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55543$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55544    fi
55545  fi
55546
55547    fi
55548  fi
55549
55550  if test "x$MSVC_DLL" = x; then
55551    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55552$as_echo_n "checking for $DLL_NAME... " >&6; }
55553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55554$as_echo "no" >&6; }
55555    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55556  fi
55557
55558      MSVCP_DLL="$MSVC_DLL"
55559    fi
55560
55561  fi
55562
55563  fi
55564
55565
55566  if test "x$NEEDS_LIB_X11" = xfalse; then
55567    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55568      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55569$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55570    fi
55571    X_CFLAGS=
55572    X_LIBS=
55573  else
55574
55575    if test "x${with_x}" = xno; then
55576      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55577    fi
55578
55579    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55580      # The user has specified a X11 base directory. Use it for includes and
55581      # libraries, unless explicitely overridden.
55582      if test "x$x_includes" = xNONE; then
55583        x_includes="${with_x}/include"
55584      fi
55585      if test "x$x_libraries" = xNONE; then
55586        x_libraries="${with_x}/lib"
55587      fi
55588    else
55589      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55590      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55591      # --x-libraries for the sysroot, if that seems to be correct.
55592      if test "x$SYSROOT" != "x"; then
55593        if test "x$x_includes" = xNONE; then
55594          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55595            x_includes="$SYSROOT/usr/X11R6/include"
55596          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55597            x_includes="$SYSROOT/usr/include"
55598          fi
55599        fi
55600        if test "x$x_libraries" = xNONE; then
55601          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55602            x_libraries="$SYSROOT/usr/X11R6/lib"
55603          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55604            x_libraries="$SYSROOT/usr/lib64"
55605          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55606            x_libraries="$SYSROOT/usr/lib"
55607          fi
55608        fi
55609      fi
55610    fi
55611
55612    # Now let autoconf do it's magic
55613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55614$as_echo_n "checking for X... " >&6; }
55615
55616
55617# Check whether --with-x was given.
55618if test "${with_x+set}" = set; then :
55619  withval=$with_x;
55620fi
55621
55622# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55623if test "x$with_x" = xno; then
55624  # The user explicitly disabled X.
55625  have_x=disabled
55626else
55627  case $x_includes,$x_libraries in #(
55628    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55629    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55630  $as_echo_n "(cached) " >&6
55631else
55632  # One or both of the vars are not set, and there is no cached value.
55633ac_x_includes=no ac_x_libraries=no
55634rm -f -r conftest.dir
55635if mkdir conftest.dir; then
55636  cd conftest.dir
55637  cat >Imakefile <<'_ACEOF'
55638incroot:
55639	@echo incroot='${INCROOT}'
55640usrlibdir:
55641	@echo usrlibdir='${USRLIBDIR}'
55642libdir:
55643	@echo libdir='${LIBDIR}'
55644_ACEOF
55645  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55646    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55647    for ac_var in incroot usrlibdir libdir; do
55648      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55649    done
55650    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55651    for ac_extension in a so sl dylib la dll; do
55652      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55653	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55654	ac_im_usrlibdir=$ac_im_libdir; break
55655      fi
55656    done
55657    # Screen out bogus values from the imake configuration.  They are
55658    # bogus both because they are the default anyway, and because
55659    # using them would break gcc on systems where it needs fixed includes.
55660    case $ac_im_incroot in
55661	/usr/include) ac_x_includes= ;;
55662	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55663    esac
55664    case $ac_im_usrlibdir in
55665	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55666	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55667    esac
55668  fi
55669  cd ..
55670  rm -f -r conftest.dir
55671fi
55672
55673# Standard set of common directories for X headers.
55674# Check X11 before X11Rn because it is often a symlink to the current release.
55675ac_x_header_dirs='
55676/usr/X11/include
55677/usr/X11R7/include
55678/usr/X11R6/include
55679/usr/X11R5/include
55680/usr/X11R4/include
55681
55682/usr/include/X11
55683/usr/include/X11R7
55684/usr/include/X11R6
55685/usr/include/X11R5
55686/usr/include/X11R4
55687
55688/usr/local/X11/include
55689/usr/local/X11R7/include
55690/usr/local/X11R6/include
55691/usr/local/X11R5/include
55692/usr/local/X11R4/include
55693
55694/usr/local/include/X11
55695/usr/local/include/X11R7
55696/usr/local/include/X11R6
55697/usr/local/include/X11R5
55698/usr/local/include/X11R4
55699
55700/usr/X386/include
55701/usr/x386/include
55702/usr/XFree86/include/X11
55703
55704/usr/include
55705/usr/local/include
55706/usr/unsupported/include
55707/usr/athena/include
55708/usr/local/x11r5/include
55709/usr/lpp/Xamples/include
55710
55711/usr/openwin/include
55712/usr/openwin/share/include'
55713
55714if test "$ac_x_includes" = no; then
55715  # Guess where to find include files, by looking for Xlib.h.
55716  # First, try using that file with no special directory specified.
55717  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55718/* end confdefs.h.  */
55719#include <X11/Xlib.h>
55720_ACEOF
55721if ac_fn_cxx_try_cpp "$LINENO"; then :
55722  # We can compile using X headers with no special include directory.
55723ac_x_includes=
55724else
55725  for ac_dir in $ac_x_header_dirs; do
55726  if test -r "$ac_dir/X11/Xlib.h"; then
55727    ac_x_includes=$ac_dir
55728    break
55729  fi
55730done
55731fi
55732rm -f conftest.err conftest.i conftest.$ac_ext
55733fi # $ac_x_includes = no
55734
55735if test "$ac_x_libraries" = no; then
55736  # Check for the libraries.
55737  # See if we find them without any special options.
55738  # Don't add to $LIBS permanently.
55739  ac_save_LIBS=$LIBS
55740  LIBS="-lX11 $LIBS"
55741  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55742/* end confdefs.h.  */
55743#include <X11/Xlib.h>
55744int
55745main ()
55746{
55747XrmInitialize ()
55748  ;
55749  return 0;
55750}
55751_ACEOF
55752if ac_fn_cxx_try_link "$LINENO"; then :
55753  LIBS=$ac_save_LIBS
55754# We can link X programs with no special library path.
55755ac_x_libraries=
55756else
55757  LIBS=$ac_save_LIBS
55758for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
55759do
55760  # Don't even attempt the hair of trying to link an X program!
55761  for ac_extension in a so sl dylib la dll; do
55762    if test -r "$ac_dir/libX11.$ac_extension"; then
55763      ac_x_libraries=$ac_dir
55764      break 2
55765    fi
55766  done
55767done
55768fi
55769rm -f core conftest.err conftest.$ac_objext \
55770    conftest$ac_exeext conftest.$ac_ext
55771fi # $ac_x_libraries = no
55772
55773case $ac_x_includes,$ac_x_libraries in #(
55774  no,* | *,no | *\'*)
55775    # Didn't find X, or a directory has "'" in its name.
55776    ac_cv_have_x="have_x=no";; #(
55777  *)
55778    # Record where we found X for the cache.
55779    ac_cv_have_x="have_x=yes\
55780	ac_x_includes='$ac_x_includes'\
55781	ac_x_libraries='$ac_x_libraries'"
55782esac
55783fi
55784;; #(
55785    *) have_x=yes;;
55786  esac
55787  eval "$ac_cv_have_x"
55788fi # $with_x != no
55789
55790if test "$have_x" != yes; then
55791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
55792$as_echo "$have_x" >&6; }
55793  no_x=yes
55794else
55795  # If each of the values was on the command line, it overrides each guess.
55796  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
55797  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
55798  # Update the cache value to reflect the command line values.
55799  ac_cv_have_x="have_x=yes\
55800	ac_x_includes='$x_includes'\
55801	ac_x_libraries='$x_libraries'"
55802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
55803$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
55804fi
55805
55806    if test "$no_x" = yes; then
55807  # Not all programs may use this symbol, but it does not hurt to define it.
55808
55809$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
55810
55811  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
55812else
55813  if test -n "$x_includes"; then
55814    X_CFLAGS="$X_CFLAGS -I$x_includes"
55815  fi
55816
55817  # It would also be nice to do this for all -L options, not just this one.
55818  if test -n "$x_libraries"; then
55819    X_LIBS="$X_LIBS -L$x_libraries"
55820    # For Solaris; some versions of Sun CC require a space after -R and
55821    # others require no space.  Words are not sufficient . . . .
55822    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
55823$as_echo_n "checking whether -R must be followed by a space... " >&6; }
55824    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
55825    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
55826    ac_cxx_werror_flag=yes
55827    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55828/* end confdefs.h.  */
55829
55830int
55831main ()
55832{
55833
55834  ;
55835  return 0;
55836}
55837_ACEOF
55838if ac_fn_cxx_try_link "$LINENO"; then :
55839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55840$as_echo "no" >&6; }
55841       X_LIBS="$X_LIBS -R$x_libraries"
55842else
55843  LIBS="$ac_xsave_LIBS -R $x_libraries"
55844       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55845/* end confdefs.h.  */
55846
55847int
55848main ()
55849{
55850
55851  ;
55852  return 0;
55853}
55854_ACEOF
55855if ac_fn_cxx_try_link "$LINENO"; then :
55856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55857$as_echo "yes" >&6; }
55858	  X_LIBS="$X_LIBS -R $x_libraries"
55859else
55860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
55861$as_echo "neither works" >&6; }
55862fi
55863rm -f core conftest.err conftest.$ac_objext \
55864    conftest$ac_exeext conftest.$ac_ext
55865fi
55866rm -f core conftest.err conftest.$ac_objext \
55867    conftest$ac_exeext conftest.$ac_ext
55868    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
55869    LIBS=$ac_xsave_LIBS
55870  fi
55871
55872  # Check for system-dependent libraries X programs must link with.
55873  # Do this before checking for the system-independent R6 libraries
55874  # (-lICE), since we may need -lsocket or whatever for X linking.
55875
55876  if test "$ISC" = yes; then
55877    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
55878  else
55879    # Martyn Johnson says this is needed for Ultrix, if the X
55880    # libraries were built with DECnet support.  And Karl Berry says
55881    # the Alpha needs dnet_stub (dnet does not exist).
55882    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
55883    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55884/* end confdefs.h.  */
55885
55886/* Override any GCC internal prototype to avoid an error.
55887   Use char because int might match the return type of a GCC
55888   builtin and then its argument prototype would still apply.  */
55889#ifdef __cplusplus
55890extern "C"
55891#endif
55892char XOpenDisplay ();
55893int
55894main ()
55895{
55896return XOpenDisplay ();
55897  ;
55898  return 0;
55899}
55900_ACEOF
55901if ac_fn_cxx_try_link "$LINENO"; then :
55902
55903else
55904  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
55905$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
55906if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
55907  $as_echo_n "(cached) " >&6
55908else
55909  ac_check_lib_save_LIBS=$LIBS
55910LIBS="-ldnet  $LIBS"
55911cat 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 dnet_ntoa ();
55921int
55922main ()
55923{
55924return dnet_ntoa ();
55925  ;
55926  return 0;
55927}
55928_ACEOF
55929if ac_fn_cxx_try_link "$LINENO"; then :
55930  ac_cv_lib_dnet_dnet_ntoa=yes
55931else
55932  ac_cv_lib_dnet_dnet_ntoa=no
55933fi
55934rm -f core conftest.err conftest.$ac_objext \
55935    conftest$ac_exeext conftest.$ac_ext
55936LIBS=$ac_check_lib_save_LIBS
55937fi
55938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
55939$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
55940if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
55941  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
55942fi
55943
55944    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
55945      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
55946$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
55947if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
55948  $as_echo_n "(cached) " >&6
55949else
55950  ac_check_lib_save_LIBS=$LIBS
55951LIBS="-ldnet_stub  $LIBS"
55952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55953/* end confdefs.h.  */
55954
55955/* Override any GCC internal prototype to avoid an error.
55956   Use char because int might match the return type of a GCC
55957   builtin and then its argument prototype would still apply.  */
55958#ifdef __cplusplus
55959extern "C"
55960#endif
55961char dnet_ntoa ();
55962int
55963main ()
55964{
55965return dnet_ntoa ();
55966  ;
55967  return 0;
55968}
55969_ACEOF
55970if ac_fn_cxx_try_link "$LINENO"; then :
55971  ac_cv_lib_dnet_stub_dnet_ntoa=yes
55972else
55973  ac_cv_lib_dnet_stub_dnet_ntoa=no
55974fi
55975rm -f core conftest.err conftest.$ac_objext \
55976    conftest$ac_exeext conftest.$ac_ext
55977LIBS=$ac_check_lib_save_LIBS
55978fi
55979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
55980$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
55981if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
55982  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
55983fi
55984
55985    fi
55986fi
55987rm -f core conftest.err conftest.$ac_objext \
55988    conftest$ac_exeext conftest.$ac_ext
55989    LIBS="$ac_xsave_LIBS"
55990
55991    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
55992    # to get the SysV transport functions.
55993    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
55994    # needs -lnsl.
55995    # The nsl library prevents programs from opening the X display
55996    # on Irix 5.2, according to T.E. Dickey.
55997    # The functions gethostbyname, getservbyname, and inet_addr are
55998    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
55999    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56000if test "x$ac_cv_func_gethostbyname" = xyes; then :
56001
56002fi
56003
56004    if test $ac_cv_func_gethostbyname = no; then
56005      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56006$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56007if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56008  $as_echo_n "(cached) " >&6
56009else
56010  ac_check_lib_save_LIBS=$LIBS
56011LIBS="-lnsl  $LIBS"
56012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56013/* end confdefs.h.  */
56014
56015/* Override any GCC internal prototype to avoid an error.
56016   Use char because int might match the return type of a GCC
56017   builtin and then its argument prototype would still apply.  */
56018#ifdef __cplusplus
56019extern "C"
56020#endif
56021char gethostbyname ();
56022int
56023main ()
56024{
56025return gethostbyname ();
56026  ;
56027  return 0;
56028}
56029_ACEOF
56030if ac_fn_cxx_try_link "$LINENO"; then :
56031  ac_cv_lib_nsl_gethostbyname=yes
56032else
56033  ac_cv_lib_nsl_gethostbyname=no
56034fi
56035rm -f core conftest.err conftest.$ac_objext \
56036    conftest$ac_exeext conftest.$ac_ext
56037LIBS=$ac_check_lib_save_LIBS
56038fi
56039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56040$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56041if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56042  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56043fi
56044
56045      if test $ac_cv_lib_nsl_gethostbyname = no; then
56046	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56047$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56048if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56049  $as_echo_n "(cached) " >&6
56050else
56051  ac_check_lib_save_LIBS=$LIBS
56052LIBS="-lbsd  $LIBS"
56053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56054/* end confdefs.h.  */
56055
56056/* Override any GCC internal prototype to avoid an error.
56057   Use char because int might match the return type of a GCC
56058   builtin and then its argument prototype would still apply.  */
56059#ifdef __cplusplus
56060extern "C"
56061#endif
56062char gethostbyname ();
56063int
56064main ()
56065{
56066return gethostbyname ();
56067  ;
56068  return 0;
56069}
56070_ACEOF
56071if ac_fn_cxx_try_link "$LINENO"; then :
56072  ac_cv_lib_bsd_gethostbyname=yes
56073else
56074  ac_cv_lib_bsd_gethostbyname=no
56075fi
56076rm -f core conftest.err conftest.$ac_objext \
56077    conftest$ac_exeext conftest.$ac_ext
56078LIBS=$ac_check_lib_save_LIBS
56079fi
56080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56081$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56082if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56083  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56084fi
56085
56086      fi
56087    fi
56088
56089    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56090    # socket/setsockopt and other routines are undefined under SCO ODT
56091    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56092    # on later versions), says Simon Leinen: it contains gethostby*
56093    # variants that don't use the name server (or something).  -lsocket
56094    # must be given before -lnsl if both are needed.  We assume that
56095    # if connect needs -lnsl, so does gethostbyname.
56096    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56097if test "x$ac_cv_func_connect" = xyes; then :
56098
56099fi
56100
56101    if test $ac_cv_func_connect = no; then
56102      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56103$as_echo_n "checking for connect in -lsocket... " >&6; }
56104if ${ac_cv_lib_socket_connect+:} false; then :
56105  $as_echo_n "(cached) " >&6
56106else
56107  ac_check_lib_save_LIBS=$LIBS
56108LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56110/* end confdefs.h.  */
56111
56112/* Override any GCC internal prototype to avoid an error.
56113   Use char because int might match the return type of a GCC
56114   builtin and then its argument prototype would still apply.  */
56115#ifdef __cplusplus
56116extern "C"
56117#endif
56118char connect ();
56119int
56120main ()
56121{
56122return connect ();
56123  ;
56124  return 0;
56125}
56126_ACEOF
56127if ac_fn_cxx_try_link "$LINENO"; then :
56128  ac_cv_lib_socket_connect=yes
56129else
56130  ac_cv_lib_socket_connect=no
56131fi
56132rm -f core conftest.err conftest.$ac_objext \
56133    conftest$ac_exeext conftest.$ac_ext
56134LIBS=$ac_check_lib_save_LIBS
56135fi
56136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56137$as_echo "$ac_cv_lib_socket_connect" >&6; }
56138if test "x$ac_cv_lib_socket_connect" = xyes; then :
56139  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56140fi
56141
56142    fi
56143
56144    # Guillermo Gomez says -lposix is necessary on A/UX.
56145    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56146if test "x$ac_cv_func_remove" = xyes; then :
56147
56148fi
56149
56150    if test $ac_cv_func_remove = no; then
56151      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56152$as_echo_n "checking for remove in -lposix... " >&6; }
56153if ${ac_cv_lib_posix_remove+:} false; then :
56154  $as_echo_n "(cached) " >&6
56155else
56156  ac_check_lib_save_LIBS=$LIBS
56157LIBS="-lposix  $LIBS"
56158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56159/* end confdefs.h.  */
56160
56161/* Override any GCC internal prototype to avoid an error.
56162   Use char because int might match the return type of a GCC
56163   builtin and then its argument prototype would still apply.  */
56164#ifdef __cplusplus
56165extern "C"
56166#endif
56167char remove ();
56168int
56169main ()
56170{
56171return remove ();
56172  ;
56173  return 0;
56174}
56175_ACEOF
56176if ac_fn_cxx_try_link "$LINENO"; then :
56177  ac_cv_lib_posix_remove=yes
56178else
56179  ac_cv_lib_posix_remove=no
56180fi
56181rm -f core conftest.err conftest.$ac_objext \
56182    conftest$ac_exeext conftest.$ac_ext
56183LIBS=$ac_check_lib_save_LIBS
56184fi
56185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56186$as_echo "$ac_cv_lib_posix_remove" >&6; }
56187if test "x$ac_cv_lib_posix_remove" = xyes; then :
56188  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56189fi
56190
56191    fi
56192
56193    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56194    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56195if test "x$ac_cv_func_shmat" = xyes; then :
56196
56197fi
56198
56199    if test $ac_cv_func_shmat = no; then
56200      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56201$as_echo_n "checking for shmat in -lipc... " >&6; }
56202if ${ac_cv_lib_ipc_shmat+:} false; then :
56203  $as_echo_n "(cached) " >&6
56204else
56205  ac_check_lib_save_LIBS=$LIBS
56206LIBS="-lipc  $LIBS"
56207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56208/* end confdefs.h.  */
56209
56210/* Override any GCC internal prototype to avoid an error.
56211   Use char because int might match the return type of a GCC
56212   builtin and then its argument prototype would still apply.  */
56213#ifdef __cplusplus
56214extern "C"
56215#endif
56216char shmat ();
56217int
56218main ()
56219{
56220return shmat ();
56221  ;
56222  return 0;
56223}
56224_ACEOF
56225if ac_fn_cxx_try_link "$LINENO"; then :
56226  ac_cv_lib_ipc_shmat=yes
56227else
56228  ac_cv_lib_ipc_shmat=no
56229fi
56230rm -f core conftest.err conftest.$ac_objext \
56231    conftest$ac_exeext conftest.$ac_ext
56232LIBS=$ac_check_lib_save_LIBS
56233fi
56234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56235$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56236if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56237  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56238fi
56239
56240    fi
56241  fi
56242
56243  # Check for libraries that X11R6 Xt/Xaw programs need.
56244  ac_save_LDFLAGS=$LDFLAGS
56245  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56246  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56247  # check for ICE first), but we must link in the order -lSM -lICE or
56248  # we get undefined symbols.  So assume we have SM if we have ICE.
56249  # These have to be linked with before -lX11, unlike the other
56250  # libraries we check for below, so use a different variable.
56251  # John Interrante, Karl Berry
56252  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56253$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56254if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56255  $as_echo_n "(cached) " >&6
56256else
56257  ac_check_lib_save_LIBS=$LIBS
56258LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56260/* end confdefs.h.  */
56261
56262/* Override any GCC internal prototype to avoid an error.
56263   Use char because int might match the return type of a GCC
56264   builtin and then its argument prototype would still apply.  */
56265#ifdef __cplusplus
56266extern "C"
56267#endif
56268char IceConnectionNumber ();
56269int
56270main ()
56271{
56272return IceConnectionNumber ();
56273  ;
56274  return 0;
56275}
56276_ACEOF
56277if ac_fn_cxx_try_link "$LINENO"; then :
56278  ac_cv_lib_ICE_IceConnectionNumber=yes
56279else
56280  ac_cv_lib_ICE_IceConnectionNumber=no
56281fi
56282rm -f core conftest.err conftest.$ac_objext \
56283    conftest$ac_exeext conftest.$ac_ext
56284LIBS=$ac_check_lib_save_LIBS
56285fi
56286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56287$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56288if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56289  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56290fi
56291
56292  LDFLAGS=$ac_save_LDFLAGS
56293
56294fi
56295
56296
56297    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56298    # this doesn't make sense so we remove it.
56299    if test "x$COMPILE_TYPE" = xcross; then
56300      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56301    fi
56302
56303    if test "x$no_x" = xyes; then
56304
56305  # Print a helpful message on how to acquire the necessary build dependency.
56306  # x11 is the help tag: freetype, cups, alsa etc
56307  MISSING_DEPENDENCY=x11
56308
56309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56310    cygwin_help $MISSING_DEPENDENCY
56311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56312    msys_help $MISSING_DEPENDENCY
56313  else
56314    PKGHANDLER_COMMAND=
56315
56316    case $PKGHANDLER in
56317      apt-get)
56318        apt_help     $MISSING_DEPENDENCY ;;
56319      yum)
56320        yum_help     $MISSING_DEPENDENCY ;;
56321      port)
56322        port_help    $MISSING_DEPENDENCY ;;
56323      pkgutil)
56324        pkgutil_help $MISSING_DEPENDENCY ;;
56325      pkgadd)
56326        pkgadd_help  $MISSING_DEPENDENCY ;;
56327    esac
56328
56329    if test "x$PKGHANDLER_COMMAND" != x; then
56330      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56331    fi
56332  fi
56333
56334      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56335    fi
56336
56337    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56338      OPENWIN_HOME="/usr/openwin"
56339      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56340      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56341          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56342          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56343          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56344    fi
56345
56346    ac_ext=c
56347ac_cpp='$CPP $CPPFLAGS'
56348ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56349ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56350ac_compiler_gnu=$ac_cv_c_compiler_gnu
56351
56352    OLD_CFLAGS="$CFLAGS"
56353    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56354
56355    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56356    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56357do :
56358  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56359ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56360          # include <X11/Xlib.h>
56361          # include <X11/Xutil.h>
56362
56363
56364"
56365if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56366  cat >>confdefs.h <<_ACEOF
56367#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56368_ACEOF
56369 X11_HEADERS_OK=yes
56370else
56371  X11_HEADERS_OK=no; break
56372fi
56373
56374done
56375
56376
56377    if test "x$X11_HEADERS_OK" = xno; then
56378
56379  # Print a helpful message on how to acquire the necessary build dependency.
56380  # x11 is the help tag: freetype, cups, alsa etc
56381  MISSING_DEPENDENCY=x11
56382
56383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56384    cygwin_help $MISSING_DEPENDENCY
56385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56386    msys_help $MISSING_DEPENDENCY
56387  else
56388    PKGHANDLER_COMMAND=
56389
56390    case $PKGHANDLER in
56391      apt-get)
56392        apt_help     $MISSING_DEPENDENCY ;;
56393      yum)
56394        yum_help     $MISSING_DEPENDENCY ;;
56395      port)
56396        port_help    $MISSING_DEPENDENCY ;;
56397      pkgutil)
56398        pkgutil_help $MISSING_DEPENDENCY ;;
56399      pkgadd)
56400        pkgadd_help  $MISSING_DEPENDENCY ;;
56401    esac
56402
56403    if test "x$PKGHANDLER_COMMAND" != x; then
56404      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56405    fi
56406  fi
56407
56408      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56409    fi
56410
56411    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56412    # defined in libawt_xawt.
56413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56414$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56415    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56416/* end confdefs.h.  */
56417#include <X11/extensions/Xrender.h>
56418int
56419main ()
56420{
56421XLinearGradient x;
56422  ;
56423  return 0;
56424}
56425_ACEOF
56426if ac_fn_c_try_compile "$LINENO"; then :
56427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56428$as_echo "yes" >&6; }
56429else
56430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56431$as_echo "no" >&6; }
56432         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56433fi
56434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56435
56436    CFLAGS="$OLD_CFLAGS"
56437    ac_ext=cpp
56438ac_cpp='$CXXCPP $CPPFLAGS'
56439ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56440ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56441ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56442
56443  fi # NEEDS_LIB_X11
56444
56445
56446
56447
56448
56449
56450# Check whether --with-cups was given.
56451if test "${with_cups+set}" = set; then :
56452  withval=$with_cups;
56453fi
56454
56455
56456# Check whether --with-cups-include was given.
56457if test "${with_cups_include+set}" = set; then :
56458  withval=$with_cups_include;
56459fi
56460
56461
56462  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56463    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56464        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56465      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56466$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56467    fi
56468    CUPS_CFLAGS=
56469  else
56470    CUPS_FOUND=no
56471
56472    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56473      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56474    fi
56475
56476    if test "x${with_cups}" != x; then
56477      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56478$as_echo_n "checking for cups headers... " >&6; }
56479      if test -s "${with_cups}/include/cups/cups.h"; then
56480        CUPS_CFLAGS="-I${with_cups}/include"
56481        CUPS_FOUND=yes
56482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56483$as_echo "$CUPS_FOUND" >&6; }
56484      else
56485        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56486      fi
56487    fi
56488    if test "x${with_cups_include}" != x; then
56489      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56490$as_echo_n "checking for cups headers... " >&6; }
56491      if test -s "${with_cups_include}/cups/cups.h"; then
56492        CUPS_CFLAGS="-I${with_cups_include}"
56493        CUPS_FOUND=yes
56494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56495$as_echo "$CUPS_FOUND" >&6; }
56496      else
56497        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56498      fi
56499    fi
56500    if test "x$CUPS_FOUND" = xno; then
56501      # Are the cups headers installed in the default /usr/include location?
56502      for ac_header in cups/cups.h cups/ppd.h
56503do :
56504  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56505ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56506if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56507  cat >>confdefs.h <<_ACEOF
56508#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56509_ACEOF
56510
56511          CUPS_FOUND=yes
56512          CUPS_CFLAGS=
56513          DEFAULT_CUPS=yes
56514
56515fi
56516
56517done
56518
56519    fi
56520    if test "x$CUPS_FOUND" = xno; then
56521      # Getting nervous now? Lets poke around for standard Solaris third-party
56522      # package installation locations.
56523      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56524$as_echo_n "checking for cups headers... " >&6; }
56525      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
56526        # An SFW package seems to be installed!
56527        CUPS_FOUND=yes
56528        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
56529      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
56530        # A CSW package seems to be installed!
56531        CUPS_FOUND=yes
56532        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
56533      fi
56534      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56535$as_echo "$CUPS_FOUND" >&6; }
56536    fi
56537    if test "x$CUPS_FOUND" = xno; then
56538
56539  # Print a helpful message on how to acquire the necessary build dependency.
56540  # cups is the help tag: freetype, cups, alsa etc
56541  MISSING_DEPENDENCY=cups
56542
56543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56544    cygwin_help $MISSING_DEPENDENCY
56545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56546    msys_help $MISSING_DEPENDENCY
56547  else
56548    PKGHANDLER_COMMAND=
56549
56550    case $PKGHANDLER in
56551      apt-get)
56552        apt_help     $MISSING_DEPENDENCY ;;
56553      yum)
56554        yum_help     $MISSING_DEPENDENCY ;;
56555      port)
56556        port_help    $MISSING_DEPENDENCY ;;
56557      pkgutil)
56558        pkgutil_help $MISSING_DEPENDENCY ;;
56559      pkgadd)
56560        pkgadd_help  $MISSING_DEPENDENCY ;;
56561    esac
56562
56563    if test "x$PKGHANDLER_COMMAND" != x; then
56564      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56565    fi
56566  fi
56567
56568      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56569    fi
56570  fi
56571
56572
56573
56574
56575
56576# Check whether --with-freetype was given.
56577if test "${with_freetype+set}" = set; then :
56578  withval=$with_freetype;
56579fi
56580
56581
56582# Check whether --with-freetype-include was given.
56583if test "${with_freetype_include+set}" = set; then :
56584  withval=$with_freetype_include;
56585fi
56586
56587
56588# Check whether --with-freetype-lib was given.
56589if test "${with_freetype_lib+set}" = set; then :
56590  withval=$with_freetype_lib;
56591fi
56592
56593
56594# Check whether --with-freetype-src was given.
56595if test "${with_freetype_src+set}" = set; then :
56596  withval=$with_freetype_src;
56597fi
56598
56599  # Check whether --enable-freetype-bundling was given.
56600if test "${enable_freetype_bundling+set}" = set; then :
56601  enableval=$enable_freetype_bundling;
56602fi
56603
56604
56605  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56606  FREETYPE_BASE_NAME=freetype
56607  FREETYPE_CFLAGS=
56608  FREETYPE_LIBS=
56609  FREETYPE_BUNDLE_LIB_PATH=
56610
56611  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56612    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56613        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56614        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56615        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56616      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56617$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56618    fi
56619    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56620      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56621$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56622    fi
56623  else
56624    # freetype is needed to build; go get it!
56625
56626    BUNDLE_FREETYPE="$enable_freetype_bundling"
56627
56628    if  test "x$with_freetype_src" != x; then
56629      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56630        # Try to build freetype if --with-freetype-src was given on Windows
56631
56632  FREETYPE_SRC_PATH="$with_freetype_src"
56633  BUILD_FREETYPE=yes
56634
56635  # Check if the freetype sources are acessible..
56636  if ! test -d $FREETYPE_SRC_PATH; then
56637    { $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
56638$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56639    BUILD_FREETYPE=no
56640  fi
56641  # ..and contain a vc2010 project file
56642  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56643  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56644    { $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
56645$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56646    BUILD_FREETYPE=no
56647  fi
56648  # Now check if configure found a version of 'msbuild.exe'
56649  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56650    { $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
56651$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;}
56652    BUILD_FREETYPE=no
56653  fi
56654
56655  # Ready to go..
56656  if test "x$BUILD_FREETYPE" = xyes; then
56657    # msbuild requires trailing slashes for output directories
56658    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56659    freetype_lib_path_unix="$freetype_lib_path"
56660    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56661
56662  unix_path="$vcxproj_path"
56663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56664    windows_path=`$CYGPATH -m "$unix_path"`
56665    vcxproj_path="$windows_path"
56666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56667    windows_path=`cmd //c echo $unix_path`
56668    vcxproj_path="$windows_path"
56669  fi
56670
56671
56672  unix_path="$freetype_lib_path"
56673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56674    windows_path=`$CYGPATH -m "$unix_path"`
56675    freetype_lib_path="$windows_path"
56676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56677    windows_path=`cmd //c echo $unix_path`
56678    freetype_lib_path="$windows_path"
56679  fi
56680
56681
56682  unix_path="$freetype_obj_path"
56683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56684    windows_path=`$CYGPATH -m "$unix_path"`
56685    freetype_obj_path="$windows_path"
56686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56687    windows_path=`cmd //c echo $unix_path`
56688    freetype_obj_path="$windows_path"
56689  fi
56690
56691    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56692      freetype_platform=x64
56693    else
56694      freetype_platform=win32
56695    fi
56696
56697    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56698    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56699    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56700    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56701    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56702$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56703
56704    # First we try to build the freetype.dll
56705    $ECHO -e "@echo off\n"\
56706        "$MSBUILD $vcxproj_path "\
56707        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56708        "/p:Configuration=\"Release Multithreaded\" "\
56709        "/p:Platform=$freetype_platform "\
56710        "/p:ConfigurationType=DynamicLibrary "\
56711        "/p:TargetName=freetype "\
56712        "/p:OutDir=\"$freetype_lib_path\" "\
56713        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56714    cmd /c freetype.bat
56715
56716    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56717      # If that succeeds we also build freetype.lib
56718      $ECHO -e "@echo off\n"\
56719          "$MSBUILD $vcxproj_path "\
56720          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56721          "/p:Configuration=\"Release Multithreaded\" "\
56722          "/p:Platform=$freetype_platform "\
56723          "/p:ConfigurationType=StaticLibrary "\
56724          "/p:TargetName=freetype "\
56725          "/p:OutDir=\"$freetype_lib_path\" "\
56726          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56727      cmd /c freetype.bat
56728
56729      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56730        # Once we build both, lib and dll, set freetype lib and include path appropriately
56731        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56732        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56733        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56734$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56735      else
56736        BUILD_FREETYPE=no
56737      fi
56738    else
56739      BUILD_FREETYPE=no
56740    fi
56741  fi
56742
56743        if test "x$BUILD_FREETYPE" = xyes; then
56744          # Okay, we built it. Check that it works.
56745
56746  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56747  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56748  METHOD="--with-freetype-src"
56749
56750  # Let's start with an optimistic view of the world :-)
56751  FOUND_FREETYPE=yes
56752
56753  # First look for the canonical freetype main include file ft2build.h.
56754  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56755    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56756    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56757    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56758      # Fail.
56759      FOUND_FREETYPE=no
56760    fi
56761  fi
56762
56763  if test "x$FOUND_FREETYPE" = xyes; then
56764    # Include file found, let's continue the sanity check.
56765    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56766$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56767
56768    # Reset to default value
56769    FREETYPE_BASE_NAME=freetype
56770    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56771    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56772      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56773          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56774        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56775        # for the .6 version explicitly.
56776        FREETYPE_BASE_NAME=freetype.6
56777        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56778        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56779$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56780      else
56781        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56782$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56783        FOUND_FREETYPE=no
56784      fi
56785    else
56786      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56787        # On Windows, we will need both .lib and .dll file.
56788        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56789          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56790$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56791          FOUND_FREETYPE=no
56792        fi
56793      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56794          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56795        # Found lib in isa dir, use that instead.
56796        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56797        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56798$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56799      fi
56800    fi
56801  fi
56802
56803  if test "x$FOUND_FREETYPE" = xyes; then
56804
56805  # Only process if variable expands to non-empty
56806
56807  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56809
56810  # Input might be given as Windows format, start by converting to
56811  # unix format.
56812  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56813  new_path=`$CYGPATH -u "$path"`
56814
56815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56818  # "foo.exe" is OK but "foo" is an error.
56819  #
56820  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56821  # It is also a way to make sure we got the proper file name for the real test later on.
56822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56823  if test "x$test_shortpath" = x; then
56824    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56825$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56826    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56827  fi
56828
56829  # Call helper function which possibly converts this using DOS-style short mode.
56830  # If so, the updated path is stored in $new_path.
56831
56832  input_path="$new_path"
56833  # Check if we need to convert this using DOS-style short mode. If the path
56834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56835  # take no chances and rewrite it.
56836  # Note: m4 eats our [], so we need to use [ and ] instead.
56837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56838  if test "x$has_forbidden_chars" != x; then
56839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56843      # Going to short mode and back again did indeed matter. Since short mode is
56844      # case insensitive, let's make it lowercase to improve readability.
56845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56846      # Now convert it back to Unix-style (cygpath)
56847      input_path=`$CYGPATH -u "$shortmode_path"`
56848      new_path="$input_path"
56849    fi
56850  fi
56851
56852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56853  if test "x$test_cygdrive_prefix" = x; then
56854    # As a simple fix, exclude /usr/bin since it's not a real path.
56855    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56857      # a path prefixed by /cygdrive for fixpath to work.
56858      new_path="$CYGWIN_ROOT_PATH$input_path"
56859    fi
56860  fi
56861
56862
56863  if test "x$path" != "x$new_path"; then
56864    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56866$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56867  fi
56868
56869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56870
56871  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56872  has_colon=`$ECHO $path | $GREP ^.:`
56873  new_path="$path"
56874  if test "x$has_colon" = x; then
56875    # Not in mixed or Windows style, start by that.
56876    new_path=`cmd //c echo $path`
56877  fi
56878
56879
56880  input_path="$new_path"
56881  # Check if we need to convert this using DOS-style short mode. If the path
56882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56883  # take no chances and rewrite it.
56884  # Note: m4 eats our [], so we need to use [ and ] instead.
56885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56886  if test "x$has_forbidden_chars" != x; then
56887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56889  fi
56890
56891
56892  windows_path="$new_path"
56893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56894    unix_path=`$CYGPATH -u "$windows_path"`
56895    new_path="$unix_path"
56896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56898    new_path="$unix_path"
56899  fi
56900
56901  if test "x$path" != "x$new_path"; then
56902    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56904$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56905  fi
56906
56907  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56908  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56909
56910    else
56911      # We're on a unix platform. Hooray! :)
56912      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56913      has_space=`$ECHO "$path" | $GREP " "`
56914      if test "x$has_space" != x; then
56915        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56916$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56917        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56918      fi
56919
56920      # Use eval to expand a potential ~
56921      eval path="$path"
56922      if test ! -f "$path" && test ! -d "$path"; then
56923        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56924      fi
56925
56926      if test -d "$path"; then
56927        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56928      else
56929        dir="`$DIRNAME "$path"`"
56930        base="`$BASENAME "$path"`"
56931        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56932      fi
56933    fi
56934  fi
56935
56936
56937  # Only process if variable expands to non-empty
56938
56939  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56941
56942  # Input might be given as Windows format, start by converting to
56943  # unix format.
56944  path="$POTENTIAL_FREETYPE_LIB_PATH"
56945  new_path=`$CYGPATH -u "$path"`
56946
56947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56950  # "foo.exe" is OK but "foo" is an error.
56951  #
56952  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56953  # It is also a way to make sure we got the proper file name for the real test later on.
56954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56955  if test "x$test_shortpath" = x; then
56956    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56957$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56958    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56959  fi
56960
56961  # Call helper function which possibly converts this using DOS-style short mode.
56962  # If so, the updated path is stored in $new_path.
56963
56964  input_path="$new_path"
56965  # Check if we need to convert this using DOS-style short mode. If the path
56966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56967  # take no chances and rewrite it.
56968  # Note: m4 eats our [], so we need to use [ and ] instead.
56969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56970  if test "x$has_forbidden_chars" != x; then
56971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56975      # Going to short mode and back again did indeed matter. Since short mode is
56976      # case insensitive, let's make it lowercase to improve readability.
56977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56978      # Now convert it back to Unix-style (cygpath)
56979      input_path=`$CYGPATH -u "$shortmode_path"`
56980      new_path="$input_path"
56981    fi
56982  fi
56983
56984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56985  if test "x$test_cygdrive_prefix" = x; then
56986    # As a simple fix, exclude /usr/bin since it's not a real path.
56987    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56989      # a path prefixed by /cygdrive for fixpath to work.
56990      new_path="$CYGWIN_ROOT_PATH$input_path"
56991    fi
56992  fi
56993
56994
56995  if test "x$path" != "x$new_path"; then
56996    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56998$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56999  fi
57000
57001    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57002
57003  path="$POTENTIAL_FREETYPE_LIB_PATH"
57004  has_colon=`$ECHO $path | $GREP ^.:`
57005  new_path="$path"
57006  if test "x$has_colon" = x; then
57007    # Not in mixed or Windows style, start by that.
57008    new_path=`cmd //c echo $path`
57009  fi
57010
57011
57012  input_path="$new_path"
57013  # Check if we need to convert this using DOS-style short mode. If the path
57014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57015  # take no chances and rewrite it.
57016  # Note: m4 eats our [], so we need to use [ and ] instead.
57017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57018  if test "x$has_forbidden_chars" != x; then
57019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57021  fi
57022
57023
57024  windows_path="$new_path"
57025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57026    unix_path=`$CYGPATH -u "$windows_path"`
57027    new_path="$unix_path"
57028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57030    new_path="$unix_path"
57031  fi
57032
57033  if test "x$path" != "x$new_path"; then
57034    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57036$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57037  fi
57038
57039  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57040  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57041
57042    else
57043      # We're on a unix platform. Hooray! :)
57044      path="$POTENTIAL_FREETYPE_LIB_PATH"
57045      has_space=`$ECHO "$path" | $GREP " "`
57046      if test "x$has_space" != x; then
57047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57048$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57049        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57050      fi
57051
57052      # Use eval to expand a potential ~
57053      eval path="$path"
57054      if test ! -f "$path" && test ! -d "$path"; then
57055        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57056      fi
57057
57058      if test -d "$path"; then
57059        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57060      else
57061        dir="`$DIRNAME "$path"`"
57062        base="`$BASENAME "$path"`"
57063        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57064      fi
57065    fi
57066  fi
57067
57068
57069    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57070    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57071$as_echo_n "checking for freetype includes... " >&6; }
57072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57073$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57074    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57076$as_echo_n "checking for freetype libraries... " >&6; }
57077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57078$as_echo "$FREETYPE_LIB_PATH" >&6; }
57079  fi
57080
57081          if test "x$FOUND_FREETYPE" != xyes; then
57082            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57083          fi
57084        else
57085          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57086$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57087          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57088        fi
57089      else
57090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57091$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57092      fi
57093    fi
57094
57095    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57096      # User has specified settings
57097
57098      if test "x$BUNDLE_FREETYPE" = x; then
57099        # If not specified, default is to bundle freetype
57100        BUNDLE_FREETYPE=yes
57101      fi
57102
57103      if test "x$with_freetype" != x; then
57104        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57105        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57106      fi
57107
57108      # Allow --with-freetype-lib and --with-freetype-include to override
57109      if test "x$with_freetype_include" != x; then
57110        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57111      fi
57112      if test "x$with_freetype_lib" != x; then
57113        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57114      fi
57115
57116      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57117        # Okay, we got it. Check that it works.
57118
57119  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57120  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57121  METHOD="--with-freetype"
57122
57123  # Let's start with an optimistic view of the world :-)
57124  FOUND_FREETYPE=yes
57125
57126  # First look for the canonical freetype main include file ft2build.h.
57127  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57128    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57129    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57130    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57131      # Fail.
57132      FOUND_FREETYPE=no
57133    fi
57134  fi
57135
57136  if test "x$FOUND_FREETYPE" = xyes; then
57137    # Include file found, let's continue the sanity check.
57138    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57139$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57140
57141    # Reset to default value
57142    FREETYPE_BASE_NAME=freetype
57143    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57144    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57145      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57146          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57147        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57148        # for the .6 version explicitly.
57149        FREETYPE_BASE_NAME=freetype.6
57150        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57151        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57152$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57153      else
57154        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57155$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57156        FOUND_FREETYPE=no
57157      fi
57158    else
57159      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57160        # On Windows, we will need both .lib and .dll file.
57161        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57162          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57163$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57164          FOUND_FREETYPE=no
57165        fi
57166      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57167          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57168        # Found lib in isa dir, use that instead.
57169        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57170        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57171$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57172      fi
57173    fi
57174  fi
57175
57176  if test "x$FOUND_FREETYPE" = xyes; then
57177
57178  # Only process if variable expands to non-empty
57179
57180  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57182
57183  # Input might be given as Windows format, start by converting to
57184  # unix format.
57185  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57186  new_path=`$CYGPATH -u "$path"`
57187
57188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57191  # "foo.exe" is OK but "foo" is an error.
57192  #
57193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57194  # It is also a way to make sure we got the proper file name for the real test later on.
57195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57196  if test "x$test_shortpath" = x; then
57197    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57198$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57199    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57200  fi
57201
57202  # Call helper function which possibly converts this using DOS-style short mode.
57203  # If so, the updated path is stored in $new_path.
57204
57205  input_path="$new_path"
57206  # Check if we need to convert this using DOS-style short mode. If the path
57207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57208  # take no chances and rewrite it.
57209  # Note: m4 eats our [], so we need to use [ and ] instead.
57210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57211  if test "x$has_forbidden_chars" != x; then
57212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57216      # Going to short mode and back again did indeed matter. Since short mode is
57217      # case insensitive, let's make it lowercase to improve readability.
57218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57219      # Now convert it back to Unix-style (cygpath)
57220      input_path=`$CYGPATH -u "$shortmode_path"`
57221      new_path="$input_path"
57222    fi
57223  fi
57224
57225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57226  if test "x$test_cygdrive_prefix" = x; then
57227    # As a simple fix, exclude /usr/bin since it's not a real path.
57228    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57230      # a path prefixed by /cygdrive for fixpath to work.
57231      new_path="$CYGWIN_ROOT_PATH$input_path"
57232    fi
57233  fi
57234
57235
57236  if test "x$path" != "x$new_path"; then
57237    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57239$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57240  fi
57241
57242    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57243
57244  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57245  has_colon=`$ECHO $path | $GREP ^.:`
57246  new_path="$path"
57247  if test "x$has_colon" = x; then
57248    # Not in mixed or Windows style, start by that.
57249    new_path=`cmd //c echo $path`
57250  fi
57251
57252
57253  input_path="$new_path"
57254  # Check if we need to convert this using DOS-style short mode. If the path
57255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57256  # take no chances and rewrite it.
57257  # Note: m4 eats our [], so we need to use [ and ] instead.
57258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57259  if test "x$has_forbidden_chars" != x; then
57260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57262  fi
57263
57264
57265  windows_path="$new_path"
57266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57267    unix_path=`$CYGPATH -u "$windows_path"`
57268    new_path="$unix_path"
57269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57271    new_path="$unix_path"
57272  fi
57273
57274  if test "x$path" != "x$new_path"; then
57275    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57277$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57278  fi
57279
57280  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57281  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57282
57283    else
57284      # We're on a unix platform. Hooray! :)
57285      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57286      has_space=`$ECHO "$path" | $GREP " "`
57287      if test "x$has_space" != x; then
57288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57289$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57290        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57291      fi
57292
57293      # Use eval to expand a potential ~
57294      eval path="$path"
57295      if test ! -f "$path" && test ! -d "$path"; then
57296        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57297      fi
57298
57299      if test -d "$path"; then
57300        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57301      else
57302        dir="`$DIRNAME "$path"`"
57303        base="`$BASENAME "$path"`"
57304        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57305      fi
57306    fi
57307  fi
57308
57309
57310  # Only process if variable expands to non-empty
57311
57312  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57313    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57314
57315  # Input might be given as Windows format, start by converting to
57316  # unix format.
57317  path="$POTENTIAL_FREETYPE_LIB_PATH"
57318  new_path=`$CYGPATH -u "$path"`
57319
57320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57323  # "foo.exe" is OK but "foo" is an error.
57324  #
57325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57326  # It is also a way to make sure we got the proper file name for the real test later on.
57327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57328  if test "x$test_shortpath" = x; then
57329    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57330$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57331    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57332  fi
57333
57334  # Call helper function which possibly converts this using DOS-style short mode.
57335  # If so, the updated path is stored in $new_path.
57336
57337  input_path="$new_path"
57338  # Check if we need to convert this using DOS-style short mode. If the path
57339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57340  # take no chances and rewrite it.
57341  # Note: m4 eats our [], so we need to use [ and ] instead.
57342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57343  if test "x$has_forbidden_chars" != x; then
57344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57348      # Going to short mode and back again did indeed matter. Since short mode is
57349      # case insensitive, let's make it lowercase to improve readability.
57350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57351      # Now convert it back to Unix-style (cygpath)
57352      input_path=`$CYGPATH -u "$shortmode_path"`
57353      new_path="$input_path"
57354    fi
57355  fi
57356
57357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57358  if test "x$test_cygdrive_prefix" = x; then
57359    # As a simple fix, exclude /usr/bin since it's not a real path.
57360    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57362      # a path prefixed by /cygdrive for fixpath to work.
57363      new_path="$CYGWIN_ROOT_PATH$input_path"
57364    fi
57365  fi
57366
57367
57368  if test "x$path" != "x$new_path"; then
57369    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57371$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57372  fi
57373
57374    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57375
57376  path="$POTENTIAL_FREETYPE_LIB_PATH"
57377  has_colon=`$ECHO $path | $GREP ^.:`
57378  new_path="$path"
57379  if test "x$has_colon" = x; then
57380    # Not in mixed or Windows style, start by that.
57381    new_path=`cmd //c echo $path`
57382  fi
57383
57384
57385  input_path="$new_path"
57386  # Check if we need to convert this using DOS-style short mode. If the path
57387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57388  # take no chances and rewrite it.
57389  # Note: m4 eats our [], so we need to use [ and ] instead.
57390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57391  if test "x$has_forbidden_chars" != x; then
57392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57394  fi
57395
57396
57397  windows_path="$new_path"
57398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57399    unix_path=`$CYGPATH -u "$windows_path"`
57400    new_path="$unix_path"
57401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57403    new_path="$unix_path"
57404  fi
57405
57406  if test "x$path" != "x$new_path"; then
57407    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57409$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57410  fi
57411
57412  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57413  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57414
57415    else
57416      # We're on a unix platform. Hooray! :)
57417      path="$POTENTIAL_FREETYPE_LIB_PATH"
57418      has_space=`$ECHO "$path" | $GREP " "`
57419      if test "x$has_space" != x; then
57420        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57421$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57422        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57423      fi
57424
57425      # Use eval to expand a potential ~
57426      eval path="$path"
57427      if test ! -f "$path" && test ! -d "$path"; then
57428        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57429      fi
57430
57431      if test -d "$path"; then
57432        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57433      else
57434        dir="`$DIRNAME "$path"`"
57435        base="`$BASENAME "$path"`"
57436        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57437      fi
57438    fi
57439  fi
57440
57441
57442    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57443    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57444$as_echo_n "checking for freetype includes... " >&6; }
57445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57446$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57447    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57449$as_echo_n "checking for freetype libraries... " >&6; }
57450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57451$as_echo "$FREETYPE_LIB_PATH" >&6; }
57452  fi
57453
57454        if test "x$FOUND_FREETYPE" != xyes; then
57455          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57456        fi
57457      else
57458        # User specified only one of lib or include. This is an error.
57459        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57460          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57461$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57462          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57463        else
57464          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57465$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57466          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57467        fi
57468      fi
57469    else
57470      # User did not specify settings, but we need freetype. Try to locate it.
57471
57472      if test "x$BUNDLE_FREETYPE" = x; then
57473        # If not specified, default is to bundle freetype only on windows
57474        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57475          BUNDLE_FREETYPE=yes
57476        else
57477          BUNDLE_FREETYPE=no
57478        fi
57479      fi
57480
57481      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57482      if test "x$SYSROOT" = x; then
57483        if test "x$FOUND_FREETYPE" != xyes; then
57484          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57485          if test "x$PKG_CONFIG" != x; then
57486
57487pkg_failed=no
57488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57489$as_echo_n "checking for FREETYPE... " >&6; }
57490
57491if test -n "$FREETYPE_CFLAGS"; then
57492    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57493 elif test -n "$PKG_CONFIG"; then
57494    if test -n "$PKG_CONFIG" && \
57495    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57496  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57497  ac_status=$?
57498  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57499  test $ac_status = 0; }; then
57500  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57501else
57502  pkg_failed=yes
57503fi
57504 else
57505    pkg_failed=untried
57506fi
57507if test -n "$FREETYPE_LIBS"; then
57508    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57509 elif test -n "$PKG_CONFIG"; then
57510    if test -n "$PKG_CONFIG" && \
57511    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57512  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57513  ac_status=$?
57514  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57515  test $ac_status = 0; }; then
57516  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57517else
57518  pkg_failed=yes
57519fi
57520 else
57521    pkg_failed=untried
57522fi
57523
57524
57525
57526if test $pkg_failed = yes; then
57527
57528if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57529        _pkg_short_errors_supported=yes
57530else
57531        _pkg_short_errors_supported=no
57532fi
57533        if test $_pkg_short_errors_supported = yes; then
57534	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57535        else
57536	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57537        fi
57538	# Put the nasty error message in config.log where it belongs
57539	echo "$FREETYPE_PKG_ERRORS" >&5
57540
57541	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57542$as_echo "no" >&6; }
57543                FOUND_FREETYPE=no
57544elif test $pkg_failed = untried; then
57545	FOUND_FREETYPE=no
57546else
57547	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57548	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57550$as_echo "yes" >&6; }
57551	FOUND_FREETYPE=yes
57552fi
57553            if test "x$FOUND_FREETYPE" = xyes; then
57554              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57555              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57556              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57557              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57558                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57559              fi
57560              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57561              if test "x$BUNDLE_FREETYPE" = xyes; then
57562                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57563$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57564                FOUND_FREETYPE=no
57565              else
57566                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57567$as_echo_n "checking for freetype... " >&6; }
57568                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57569$as_echo "yes (using pkg-config)" >&6; }
57570              fi
57571            fi
57572          fi
57573        fi
57574      fi
57575
57576      if test "x$FOUND_FREETYPE" != xyes; then
57577        # Check in well-known locations
57578        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57579          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57580
57581  windows_path="$FREETYPE_BASE_DIR"
57582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57583    unix_path=`$CYGPATH -u "$windows_path"`
57584    FREETYPE_BASE_DIR="$unix_path"
57585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57587    FREETYPE_BASE_DIR="$unix_path"
57588  fi
57589
57590
57591  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57592  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57593  METHOD="well-known location"
57594
57595  # Let's start with an optimistic view of the world :-)
57596  FOUND_FREETYPE=yes
57597
57598  # First look for the canonical freetype main include file ft2build.h.
57599  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57600    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57601    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57602    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57603      # Fail.
57604      FOUND_FREETYPE=no
57605    fi
57606  fi
57607
57608  if test "x$FOUND_FREETYPE" = xyes; then
57609    # Include file found, let's continue the sanity check.
57610    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57611$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57612
57613    # Reset to default value
57614    FREETYPE_BASE_NAME=freetype
57615    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57616    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57617      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57618          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57619        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57620        # for the .6 version explicitly.
57621        FREETYPE_BASE_NAME=freetype.6
57622        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57623        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57624$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57625      else
57626        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57627$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57628        FOUND_FREETYPE=no
57629      fi
57630    else
57631      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57632        # On Windows, we will need both .lib and .dll file.
57633        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57634          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57635$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57636          FOUND_FREETYPE=no
57637        fi
57638      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57639          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57640        # Found lib in isa dir, use that instead.
57641        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57642        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57643$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57644      fi
57645    fi
57646  fi
57647
57648  if test "x$FOUND_FREETYPE" = xyes; then
57649
57650  # Only process if variable expands to non-empty
57651
57652  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57653    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57654
57655  # Input might be given as Windows format, start by converting to
57656  # unix format.
57657  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57658  new_path=`$CYGPATH -u "$path"`
57659
57660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57663  # "foo.exe" is OK but "foo" is an error.
57664  #
57665  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57666  # It is also a way to make sure we got the proper file name for the real test later on.
57667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57668  if test "x$test_shortpath" = x; then
57669    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57670$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57671    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57672  fi
57673
57674  # Call helper function which possibly converts this using DOS-style short mode.
57675  # If so, the updated path is stored in $new_path.
57676
57677  input_path="$new_path"
57678  # Check if we need to convert this using DOS-style short mode. If the path
57679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57680  # take no chances and rewrite it.
57681  # Note: m4 eats our [], so we need to use [ and ] instead.
57682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57683  if test "x$has_forbidden_chars" != x; then
57684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57688      # Going to short mode and back again did indeed matter. Since short mode is
57689      # case insensitive, let's make it lowercase to improve readability.
57690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57691      # Now convert it back to Unix-style (cygpath)
57692      input_path=`$CYGPATH -u "$shortmode_path"`
57693      new_path="$input_path"
57694    fi
57695  fi
57696
57697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57698  if test "x$test_cygdrive_prefix" = x; then
57699    # As a simple fix, exclude /usr/bin since it's not a real path.
57700    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57702      # a path prefixed by /cygdrive for fixpath to work.
57703      new_path="$CYGWIN_ROOT_PATH$input_path"
57704    fi
57705  fi
57706
57707
57708  if test "x$path" != "x$new_path"; then
57709    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57711$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57712  fi
57713
57714    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57715
57716  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57717  has_colon=`$ECHO $path | $GREP ^.:`
57718  new_path="$path"
57719  if test "x$has_colon" = x; then
57720    # Not in mixed or Windows style, start by that.
57721    new_path=`cmd //c echo $path`
57722  fi
57723
57724
57725  input_path="$new_path"
57726  # Check if we need to convert this using DOS-style short mode. If the path
57727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57728  # take no chances and rewrite it.
57729  # Note: m4 eats our [], so we need to use [ and ] instead.
57730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57731  if test "x$has_forbidden_chars" != x; then
57732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57734  fi
57735
57736
57737  windows_path="$new_path"
57738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57739    unix_path=`$CYGPATH -u "$windows_path"`
57740    new_path="$unix_path"
57741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57743    new_path="$unix_path"
57744  fi
57745
57746  if test "x$path" != "x$new_path"; then
57747    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57749$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57750  fi
57751
57752  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57753  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57754
57755    else
57756      # We're on a unix platform. Hooray! :)
57757      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57758      has_space=`$ECHO "$path" | $GREP " "`
57759      if test "x$has_space" != x; then
57760        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57761$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57762        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57763      fi
57764
57765      # Use eval to expand a potential ~
57766      eval path="$path"
57767      if test ! -f "$path" && test ! -d "$path"; then
57768        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57769      fi
57770
57771      if test -d "$path"; then
57772        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57773      else
57774        dir="`$DIRNAME "$path"`"
57775        base="`$BASENAME "$path"`"
57776        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57777      fi
57778    fi
57779  fi
57780
57781
57782  # Only process if variable expands to non-empty
57783
57784  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57785    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57786
57787  # Input might be given as Windows format, start by converting to
57788  # unix format.
57789  path="$POTENTIAL_FREETYPE_LIB_PATH"
57790  new_path=`$CYGPATH -u "$path"`
57791
57792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57795  # "foo.exe" is OK but "foo" is an error.
57796  #
57797  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57798  # It is also a way to make sure we got the proper file name for the real test later on.
57799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57800  if test "x$test_shortpath" = x; then
57801    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57802$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57803    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57804  fi
57805
57806  # Call helper function which possibly converts this using DOS-style short mode.
57807  # If so, the updated path is stored in $new_path.
57808
57809  input_path="$new_path"
57810  # Check if we need to convert this using DOS-style short mode. If the path
57811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57812  # take no chances and rewrite it.
57813  # Note: m4 eats our [], so we need to use [ and ] instead.
57814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57815  if test "x$has_forbidden_chars" != x; then
57816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57820      # Going to short mode and back again did indeed matter. Since short mode is
57821      # case insensitive, let's make it lowercase to improve readability.
57822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57823      # Now convert it back to Unix-style (cygpath)
57824      input_path=`$CYGPATH -u "$shortmode_path"`
57825      new_path="$input_path"
57826    fi
57827  fi
57828
57829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57830  if test "x$test_cygdrive_prefix" = x; then
57831    # As a simple fix, exclude /usr/bin since it's not a real path.
57832    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57834      # a path prefixed by /cygdrive for fixpath to work.
57835      new_path="$CYGWIN_ROOT_PATH$input_path"
57836    fi
57837  fi
57838
57839
57840  if test "x$path" != "x$new_path"; then
57841    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57843$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57844  fi
57845
57846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57847
57848  path="$POTENTIAL_FREETYPE_LIB_PATH"
57849  has_colon=`$ECHO $path | $GREP ^.:`
57850  new_path="$path"
57851  if test "x$has_colon" = x; then
57852    # Not in mixed or Windows style, start by that.
57853    new_path=`cmd //c echo $path`
57854  fi
57855
57856
57857  input_path="$new_path"
57858  # Check if we need to convert this using DOS-style short mode. If the path
57859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57860  # take no chances and rewrite it.
57861  # Note: m4 eats our [], so we need to use [ and ] instead.
57862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57863  if test "x$has_forbidden_chars" != x; then
57864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57866  fi
57867
57868
57869  windows_path="$new_path"
57870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57871    unix_path=`$CYGPATH -u "$windows_path"`
57872    new_path="$unix_path"
57873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57875    new_path="$unix_path"
57876  fi
57877
57878  if test "x$path" != "x$new_path"; then
57879    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57881$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57882  fi
57883
57884  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57885  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57886
57887    else
57888      # We're on a unix platform. Hooray! :)
57889      path="$POTENTIAL_FREETYPE_LIB_PATH"
57890      has_space=`$ECHO "$path" | $GREP " "`
57891      if test "x$has_space" != x; then
57892        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57893$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57894        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57895      fi
57896
57897      # Use eval to expand a potential ~
57898      eval path="$path"
57899      if test ! -f "$path" && test ! -d "$path"; then
57900        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57901      fi
57902
57903      if test -d "$path"; then
57904        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57905      else
57906        dir="`$DIRNAME "$path"`"
57907        base="`$BASENAME "$path"`"
57908        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57909      fi
57910    fi
57911  fi
57912
57913
57914    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57916$as_echo_n "checking for freetype includes... " >&6; }
57917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57918$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57919    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57920    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57921$as_echo_n "checking for freetype libraries... " >&6; }
57922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57923$as_echo "$FREETYPE_LIB_PATH" >&6; }
57924  fi
57925
57926          if test "x$FOUND_FREETYPE" != xyes; then
57927            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
57928
57929  windows_path="$FREETYPE_BASE_DIR"
57930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57931    unix_path=`$CYGPATH -u "$windows_path"`
57932    FREETYPE_BASE_DIR="$unix_path"
57933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57935    FREETYPE_BASE_DIR="$unix_path"
57936  fi
57937
57938
57939  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57940  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57941  METHOD="well-known location"
57942
57943  # Let's start with an optimistic view of the world :-)
57944  FOUND_FREETYPE=yes
57945
57946  # First look for the canonical freetype main include file ft2build.h.
57947  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57948    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57949    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57950    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57951      # Fail.
57952      FOUND_FREETYPE=no
57953    fi
57954  fi
57955
57956  if test "x$FOUND_FREETYPE" = xyes; then
57957    # Include file found, let's continue the sanity check.
57958    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57959$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57960
57961    # Reset to default value
57962    FREETYPE_BASE_NAME=freetype
57963    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57964    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57965      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57966          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57967        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57968        # for the .6 version explicitly.
57969        FREETYPE_BASE_NAME=freetype.6
57970        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57971        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57972$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57973      else
57974        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57975$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57976        FOUND_FREETYPE=no
57977      fi
57978    else
57979      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57980        # On Windows, we will need both .lib and .dll file.
57981        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57982          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57983$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57984          FOUND_FREETYPE=no
57985        fi
57986      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57987          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57988        # Found lib in isa dir, use that instead.
57989        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57990        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57991$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57992      fi
57993    fi
57994  fi
57995
57996  if test "x$FOUND_FREETYPE" = xyes; then
57997
57998  # Only process if variable expands to non-empty
57999
58000  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58001    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58002
58003  # Input might be given as Windows format, start by converting to
58004  # unix format.
58005  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58006  new_path=`$CYGPATH -u "$path"`
58007
58008  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58009  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58010  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58011  # "foo.exe" is OK but "foo" is an error.
58012  #
58013  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58014  # It is also a way to make sure we got the proper file name for the real test later on.
58015  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58016  if test "x$test_shortpath" = x; then
58017    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58018$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58019    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58020  fi
58021
58022  # Call helper function which possibly converts this using DOS-style short mode.
58023  # If so, the updated path is stored in $new_path.
58024
58025  input_path="$new_path"
58026  # Check if we need to convert this using DOS-style short mode. If the path
58027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58028  # take no chances and rewrite it.
58029  # Note: m4 eats our [], so we need to use [ and ] instead.
58030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58031  if test "x$has_forbidden_chars" != x; then
58032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58036      # Going to short mode and back again did indeed matter. Since short mode is
58037      # case insensitive, let's make it lowercase to improve readability.
58038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58039      # Now convert it back to Unix-style (cygpath)
58040      input_path=`$CYGPATH -u "$shortmode_path"`
58041      new_path="$input_path"
58042    fi
58043  fi
58044
58045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58046  if test "x$test_cygdrive_prefix" = x; then
58047    # As a simple fix, exclude /usr/bin since it's not a real path.
58048    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58050      # a path prefixed by /cygdrive for fixpath to work.
58051      new_path="$CYGWIN_ROOT_PATH$input_path"
58052    fi
58053  fi
58054
58055
58056  if test "x$path" != "x$new_path"; then
58057    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58059$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58060  fi
58061
58062    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58063
58064  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58065  has_colon=`$ECHO $path | $GREP ^.:`
58066  new_path="$path"
58067  if test "x$has_colon" = x; then
58068    # Not in mixed or Windows style, start by that.
58069    new_path=`cmd //c echo $path`
58070  fi
58071
58072
58073  input_path="$new_path"
58074  # Check if we need to convert this using DOS-style short mode. If the path
58075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58076  # take no chances and rewrite it.
58077  # Note: m4 eats our [], so we need to use [ and ] instead.
58078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58079  if test "x$has_forbidden_chars" != x; then
58080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58081    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58082  fi
58083
58084
58085  windows_path="$new_path"
58086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58087    unix_path=`$CYGPATH -u "$windows_path"`
58088    new_path="$unix_path"
58089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58091    new_path="$unix_path"
58092  fi
58093
58094  if test "x$path" != "x$new_path"; then
58095    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58097$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58098  fi
58099
58100  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58101  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58102
58103    else
58104      # We're on a unix platform. Hooray! :)
58105      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58106      has_space=`$ECHO "$path" | $GREP " "`
58107      if test "x$has_space" != x; then
58108        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58109$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58110        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58111      fi
58112
58113      # Use eval to expand a potential ~
58114      eval path="$path"
58115      if test ! -f "$path" && test ! -d "$path"; then
58116        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58117      fi
58118
58119      if test -d "$path"; then
58120        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58121      else
58122        dir="`$DIRNAME "$path"`"
58123        base="`$BASENAME "$path"`"
58124        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58125      fi
58126    fi
58127  fi
58128
58129
58130  # Only process if variable expands to non-empty
58131
58132  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58134
58135  # Input might be given as Windows format, start by converting to
58136  # unix format.
58137  path="$POTENTIAL_FREETYPE_LIB_PATH"
58138  new_path=`$CYGPATH -u "$path"`
58139
58140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58143  # "foo.exe" is OK but "foo" is an error.
58144  #
58145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58146  # It is also a way to make sure we got the proper file name for the real test later on.
58147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58148  if test "x$test_shortpath" = x; then
58149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58150$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58151    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58152  fi
58153
58154  # Call helper function which possibly converts this using DOS-style short mode.
58155  # If so, the updated path is stored in $new_path.
58156
58157  input_path="$new_path"
58158  # Check if we need to convert this using DOS-style short mode. If the path
58159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58160  # take no chances and rewrite it.
58161  # Note: m4 eats our [], so we need to use [ and ] instead.
58162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58163  if test "x$has_forbidden_chars" != x; then
58164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58168      # Going to short mode and back again did indeed matter. Since short mode is
58169      # case insensitive, let's make it lowercase to improve readability.
58170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58171      # Now convert it back to Unix-style (cygpath)
58172      input_path=`$CYGPATH -u "$shortmode_path"`
58173      new_path="$input_path"
58174    fi
58175  fi
58176
58177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58178  if test "x$test_cygdrive_prefix" = x; then
58179    # As a simple fix, exclude /usr/bin since it's not a real path.
58180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58182      # a path prefixed by /cygdrive for fixpath to work.
58183      new_path="$CYGWIN_ROOT_PATH$input_path"
58184    fi
58185  fi
58186
58187
58188  if test "x$path" != "x$new_path"; then
58189    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58191$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58192  fi
58193
58194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58195
58196  path="$POTENTIAL_FREETYPE_LIB_PATH"
58197  has_colon=`$ECHO $path | $GREP ^.:`
58198  new_path="$path"
58199  if test "x$has_colon" = x; then
58200    # Not in mixed or Windows style, start by that.
58201    new_path=`cmd //c echo $path`
58202  fi
58203
58204
58205  input_path="$new_path"
58206  # Check if we need to convert this using DOS-style short mode. If the path
58207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58208  # take no chances and rewrite it.
58209  # Note: m4 eats our [], so we need to use [ and ] instead.
58210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58211  if test "x$has_forbidden_chars" != x; then
58212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58214  fi
58215
58216
58217  windows_path="$new_path"
58218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58219    unix_path=`$CYGPATH -u "$windows_path"`
58220    new_path="$unix_path"
58221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58223    new_path="$unix_path"
58224  fi
58225
58226  if test "x$path" != "x$new_path"; then
58227    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58229$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58230  fi
58231
58232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58234
58235    else
58236      # We're on a unix platform. Hooray! :)
58237      path="$POTENTIAL_FREETYPE_LIB_PATH"
58238      has_space=`$ECHO "$path" | $GREP " "`
58239      if test "x$has_space" != x; then
58240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58241$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58242        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58243      fi
58244
58245      # Use eval to expand a potential ~
58246      eval path="$path"
58247      if test ! -f "$path" && test ! -d "$path"; then
58248        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58249      fi
58250
58251      if test -d "$path"; then
58252        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58253      else
58254        dir="`$DIRNAME "$path"`"
58255        base="`$BASENAME "$path"`"
58256        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58257      fi
58258    fi
58259  fi
58260
58261
58262    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58264$as_echo_n "checking for freetype includes... " >&6; }
58265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58266$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58267    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58268    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58269$as_echo_n "checking for freetype libraries... " >&6; }
58270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58271$as_echo "$FREETYPE_LIB_PATH" >&6; }
58272  fi
58273
58274          fi
58275          if test "x$FOUND_FREETYPE" != xyes; then
58276            FREETYPE_BASE_DIR="$HOME/freetype"
58277
58278  windows_path="$FREETYPE_BASE_DIR"
58279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58280    unix_path=`$CYGPATH -u "$windows_path"`
58281    FREETYPE_BASE_DIR="$unix_path"
58282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58284    FREETYPE_BASE_DIR="$unix_path"
58285  fi
58286
58287            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58288
58289  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58290  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58291  METHOD="well-known location"
58292
58293  # Let's start with an optimistic view of the world :-)
58294  FOUND_FREETYPE=yes
58295
58296  # First look for the canonical freetype main include file ft2build.h.
58297  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58298    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58299    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58300    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58301      # Fail.
58302      FOUND_FREETYPE=no
58303    fi
58304  fi
58305
58306  if test "x$FOUND_FREETYPE" = xyes; then
58307    # Include file found, let's continue the sanity check.
58308    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58309$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58310
58311    # Reset to default value
58312    FREETYPE_BASE_NAME=freetype
58313    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58314    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58315      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58316          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58317        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58318        # for the .6 version explicitly.
58319        FREETYPE_BASE_NAME=freetype.6
58320        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58321        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58322$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58323      else
58324        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58325$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58326        FOUND_FREETYPE=no
58327      fi
58328    else
58329      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58330        # On Windows, we will need both .lib and .dll file.
58331        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58332          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58333$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58334          FOUND_FREETYPE=no
58335        fi
58336      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58337          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58338        # Found lib in isa dir, use that instead.
58339        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58340        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58341$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58342      fi
58343    fi
58344  fi
58345
58346  if test "x$FOUND_FREETYPE" = xyes; then
58347
58348  # Only process if variable expands to non-empty
58349
58350  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58352
58353  # Input might be given as Windows format, start by converting to
58354  # unix format.
58355  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58356  new_path=`$CYGPATH -u "$path"`
58357
58358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58361  # "foo.exe" is OK but "foo" is an error.
58362  #
58363  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58364  # It is also a way to make sure we got the proper file name for the real test later on.
58365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58366  if test "x$test_shortpath" = x; then
58367    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58368$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58369    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58370  fi
58371
58372  # Call helper function which possibly converts this using DOS-style short mode.
58373  # If so, the updated path is stored in $new_path.
58374
58375  input_path="$new_path"
58376  # Check if we need to convert this using DOS-style short mode. If the path
58377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58378  # take no chances and rewrite it.
58379  # Note: m4 eats our [], so we need to use [ and ] instead.
58380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58381  if test "x$has_forbidden_chars" != x; then
58382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58386      # Going to short mode and back again did indeed matter. Since short mode is
58387      # case insensitive, let's make it lowercase to improve readability.
58388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58389      # Now convert it back to Unix-style (cygpath)
58390      input_path=`$CYGPATH -u "$shortmode_path"`
58391      new_path="$input_path"
58392    fi
58393  fi
58394
58395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58396  if test "x$test_cygdrive_prefix" = x; then
58397    # As a simple fix, exclude /usr/bin since it's not a real path.
58398    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58400      # a path prefixed by /cygdrive for fixpath to work.
58401      new_path="$CYGWIN_ROOT_PATH$input_path"
58402    fi
58403  fi
58404
58405
58406  if test "x$path" != "x$new_path"; then
58407    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58409$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58410  fi
58411
58412    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58413
58414  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58415  has_colon=`$ECHO $path | $GREP ^.:`
58416  new_path="$path"
58417  if test "x$has_colon" = x; then
58418    # Not in mixed or Windows style, start by that.
58419    new_path=`cmd //c echo $path`
58420  fi
58421
58422
58423  input_path="$new_path"
58424  # Check if we need to convert this using DOS-style short mode. If the path
58425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58426  # take no chances and rewrite it.
58427  # Note: m4 eats our [], so we need to use [ and ] instead.
58428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58429  if test "x$has_forbidden_chars" != x; then
58430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58432  fi
58433
58434
58435  windows_path="$new_path"
58436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58437    unix_path=`$CYGPATH -u "$windows_path"`
58438    new_path="$unix_path"
58439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58441    new_path="$unix_path"
58442  fi
58443
58444  if test "x$path" != "x$new_path"; then
58445    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58447$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58448  fi
58449
58450  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58451  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58452
58453    else
58454      # We're on a unix platform. Hooray! :)
58455      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58456      has_space=`$ECHO "$path" | $GREP " "`
58457      if test "x$has_space" != x; then
58458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58459$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58460        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58461      fi
58462
58463      # Use eval to expand a potential ~
58464      eval path="$path"
58465      if test ! -f "$path" && test ! -d "$path"; then
58466        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58467      fi
58468
58469      if test -d "$path"; then
58470        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58471      else
58472        dir="`$DIRNAME "$path"`"
58473        base="`$BASENAME "$path"`"
58474        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58475      fi
58476    fi
58477  fi
58478
58479
58480  # Only process if variable expands to non-empty
58481
58482  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58483    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58484
58485  # Input might be given as Windows format, start by converting to
58486  # unix format.
58487  path="$POTENTIAL_FREETYPE_LIB_PATH"
58488  new_path=`$CYGPATH -u "$path"`
58489
58490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58493  # "foo.exe" is OK but "foo" is an error.
58494  #
58495  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58496  # It is also a way to make sure we got the proper file name for the real test later on.
58497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58498  if test "x$test_shortpath" = x; then
58499    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58500$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58501    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58502  fi
58503
58504  # Call helper function which possibly converts this using DOS-style short mode.
58505  # If so, the updated path is stored in $new_path.
58506
58507  input_path="$new_path"
58508  # Check if we need to convert this using DOS-style short mode. If the path
58509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58510  # take no chances and rewrite it.
58511  # Note: m4 eats our [], so we need to use [ and ] instead.
58512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58513  if test "x$has_forbidden_chars" != x; then
58514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58518      # Going to short mode and back again did indeed matter. Since short mode is
58519      # case insensitive, let's make it lowercase to improve readability.
58520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58521      # Now convert it back to Unix-style (cygpath)
58522      input_path=`$CYGPATH -u "$shortmode_path"`
58523      new_path="$input_path"
58524    fi
58525  fi
58526
58527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58528  if test "x$test_cygdrive_prefix" = x; then
58529    # As a simple fix, exclude /usr/bin since it's not a real path.
58530    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58532      # a path prefixed by /cygdrive for fixpath to work.
58533      new_path="$CYGWIN_ROOT_PATH$input_path"
58534    fi
58535  fi
58536
58537
58538  if test "x$path" != "x$new_path"; then
58539    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58541$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58542  fi
58543
58544    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58545
58546  path="$POTENTIAL_FREETYPE_LIB_PATH"
58547  has_colon=`$ECHO $path | $GREP ^.:`
58548  new_path="$path"
58549  if test "x$has_colon" = x; then
58550    # Not in mixed or Windows style, start by that.
58551    new_path=`cmd //c echo $path`
58552  fi
58553
58554
58555  input_path="$new_path"
58556  # Check if we need to convert this using DOS-style short mode. If the path
58557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58558  # take no chances and rewrite it.
58559  # Note: m4 eats our [], so we need to use [ and ] instead.
58560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58561  if test "x$has_forbidden_chars" != x; then
58562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58563    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58564  fi
58565
58566
58567  windows_path="$new_path"
58568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58569    unix_path=`$CYGPATH -u "$windows_path"`
58570    new_path="$unix_path"
58571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58573    new_path="$unix_path"
58574  fi
58575
58576  if test "x$path" != "x$new_path"; then
58577    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58579$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58580  fi
58581
58582  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58583  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58584
58585    else
58586      # We're on a unix platform. Hooray! :)
58587      path="$POTENTIAL_FREETYPE_LIB_PATH"
58588      has_space=`$ECHO "$path" | $GREP " "`
58589      if test "x$has_space" != x; then
58590        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58591$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58592        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58593      fi
58594
58595      # Use eval to expand a potential ~
58596      eval path="$path"
58597      if test ! -f "$path" && test ! -d "$path"; then
58598        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58599      fi
58600
58601      if test -d "$path"; then
58602        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58603      else
58604        dir="`$DIRNAME "$path"`"
58605        base="`$BASENAME "$path"`"
58606        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58607      fi
58608    fi
58609  fi
58610
58611
58612    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58614$as_echo_n "checking for freetype includes... " >&6; }
58615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58616$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58617    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58618    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58619$as_echo_n "checking for freetype libraries... " >&6; }
58620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58621$as_echo "$FREETYPE_LIB_PATH" >&6; }
58622  fi
58623
58624            else
58625
58626  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58627  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58628  METHOD="well-known location"
58629
58630  # Let's start with an optimistic view of the world :-)
58631  FOUND_FREETYPE=yes
58632
58633  # First look for the canonical freetype main include file ft2build.h.
58634  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58635    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58636    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58637    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58638      # Fail.
58639      FOUND_FREETYPE=no
58640    fi
58641  fi
58642
58643  if test "x$FOUND_FREETYPE" = xyes; then
58644    # Include file found, let's continue the sanity check.
58645    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58646$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58647
58648    # Reset to default value
58649    FREETYPE_BASE_NAME=freetype
58650    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58651    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58652      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58653          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58654        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58655        # for the .6 version explicitly.
58656        FREETYPE_BASE_NAME=freetype.6
58657        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58658        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58659$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58660      else
58661        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58662$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58663        FOUND_FREETYPE=no
58664      fi
58665    else
58666      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58667        # On Windows, we will need both .lib and .dll file.
58668        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58669          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58670$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58671          FOUND_FREETYPE=no
58672        fi
58673      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58674          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58675        # Found lib in isa dir, use that instead.
58676        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58677        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58678$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58679      fi
58680    fi
58681  fi
58682
58683  if test "x$FOUND_FREETYPE" = xyes; then
58684
58685  # Only process if variable expands to non-empty
58686
58687  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58688    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58689
58690  # Input might be given as Windows format, start by converting to
58691  # unix format.
58692  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58693  new_path=`$CYGPATH -u "$path"`
58694
58695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58698  # "foo.exe" is OK but "foo" is an error.
58699  #
58700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58701  # It is also a way to make sure we got the proper file name for the real test later on.
58702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58703  if test "x$test_shortpath" = x; then
58704    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58705$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58706    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58707  fi
58708
58709  # Call helper function which possibly converts this using DOS-style short mode.
58710  # If so, the updated path is stored in $new_path.
58711
58712  input_path="$new_path"
58713  # Check if we need to convert this using DOS-style short mode. If the path
58714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58715  # take no chances and rewrite it.
58716  # Note: m4 eats our [], so we need to use [ and ] instead.
58717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58718  if test "x$has_forbidden_chars" != x; then
58719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58723      # Going to short mode and back again did indeed matter. Since short mode is
58724      # case insensitive, let's make it lowercase to improve readability.
58725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58726      # Now convert it back to Unix-style (cygpath)
58727      input_path=`$CYGPATH -u "$shortmode_path"`
58728      new_path="$input_path"
58729    fi
58730  fi
58731
58732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58733  if test "x$test_cygdrive_prefix" = x; then
58734    # As a simple fix, exclude /usr/bin since it's not a real path.
58735    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58737      # a path prefixed by /cygdrive for fixpath to work.
58738      new_path="$CYGWIN_ROOT_PATH$input_path"
58739    fi
58740  fi
58741
58742
58743  if test "x$path" != "x$new_path"; then
58744    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58746$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58747  fi
58748
58749    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58750
58751  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58752  has_colon=`$ECHO $path | $GREP ^.:`
58753  new_path="$path"
58754  if test "x$has_colon" = x; then
58755    # Not in mixed or Windows style, start by that.
58756    new_path=`cmd //c echo $path`
58757  fi
58758
58759
58760  input_path="$new_path"
58761  # Check if we need to convert this using DOS-style short mode. If the path
58762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58763  # take no chances and rewrite it.
58764  # Note: m4 eats our [], so we need to use [ and ] instead.
58765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58766  if test "x$has_forbidden_chars" != x; then
58767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58769  fi
58770
58771
58772  windows_path="$new_path"
58773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58774    unix_path=`$CYGPATH -u "$windows_path"`
58775    new_path="$unix_path"
58776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58778    new_path="$unix_path"
58779  fi
58780
58781  if test "x$path" != "x$new_path"; then
58782    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58784$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58785  fi
58786
58787  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58788  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58789
58790    else
58791      # We're on a unix platform. Hooray! :)
58792      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58793      has_space=`$ECHO "$path" | $GREP " "`
58794      if test "x$has_space" != x; then
58795        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58796$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58797        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58798      fi
58799
58800      # Use eval to expand a potential ~
58801      eval path="$path"
58802      if test ! -f "$path" && test ! -d "$path"; then
58803        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58804      fi
58805
58806      if test -d "$path"; then
58807        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58808      else
58809        dir="`$DIRNAME "$path"`"
58810        base="`$BASENAME "$path"`"
58811        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58812      fi
58813    fi
58814  fi
58815
58816
58817  # Only process if variable expands to non-empty
58818
58819  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58821
58822  # Input might be given as Windows format, start by converting to
58823  # unix format.
58824  path="$POTENTIAL_FREETYPE_LIB_PATH"
58825  new_path=`$CYGPATH -u "$path"`
58826
58827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58830  # "foo.exe" is OK but "foo" is an error.
58831  #
58832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58833  # It is also a way to make sure we got the proper file name for the real test later on.
58834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58835  if test "x$test_shortpath" = x; then
58836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58837$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58838    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58839  fi
58840
58841  # Call helper function which possibly converts this using DOS-style short mode.
58842  # If so, the updated path is stored in $new_path.
58843
58844  input_path="$new_path"
58845  # Check if we need to convert this using DOS-style short mode. If the path
58846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58847  # take no chances and rewrite it.
58848  # Note: m4 eats our [], so we need to use [ and ] instead.
58849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58850  if test "x$has_forbidden_chars" != x; then
58851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58855      # Going to short mode and back again did indeed matter. Since short mode is
58856      # case insensitive, let's make it lowercase to improve readability.
58857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58858      # Now convert it back to Unix-style (cygpath)
58859      input_path=`$CYGPATH -u "$shortmode_path"`
58860      new_path="$input_path"
58861    fi
58862  fi
58863
58864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58865  if test "x$test_cygdrive_prefix" = x; then
58866    # As a simple fix, exclude /usr/bin since it's not a real path.
58867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58869      # a path prefixed by /cygdrive for fixpath to work.
58870      new_path="$CYGWIN_ROOT_PATH$input_path"
58871    fi
58872  fi
58873
58874
58875  if test "x$path" != "x$new_path"; then
58876    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58878$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58879  fi
58880
58881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58882
58883  path="$POTENTIAL_FREETYPE_LIB_PATH"
58884  has_colon=`$ECHO $path | $GREP ^.:`
58885  new_path="$path"
58886  if test "x$has_colon" = x; then
58887    # Not in mixed or Windows style, start by that.
58888    new_path=`cmd //c echo $path`
58889  fi
58890
58891
58892  input_path="$new_path"
58893  # Check if we need to convert this using DOS-style short mode. If the path
58894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58895  # take no chances and rewrite it.
58896  # Note: m4 eats our [], so we need to use [ and ] instead.
58897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58898  if test "x$has_forbidden_chars" != x; then
58899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58901  fi
58902
58903
58904  windows_path="$new_path"
58905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58906    unix_path=`$CYGPATH -u "$windows_path"`
58907    new_path="$unix_path"
58908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58910    new_path="$unix_path"
58911  fi
58912
58913  if test "x$path" != "x$new_path"; then
58914    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58916$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58917  fi
58918
58919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58921
58922    else
58923      # We're on a unix platform. Hooray! :)
58924      path="$POTENTIAL_FREETYPE_LIB_PATH"
58925      has_space=`$ECHO "$path" | $GREP " "`
58926      if test "x$has_space" != x; then
58927        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58928$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58929        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58930      fi
58931
58932      # Use eval to expand a potential ~
58933      eval path="$path"
58934      if test ! -f "$path" && test ! -d "$path"; then
58935        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58936      fi
58937
58938      if test -d "$path"; then
58939        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58940      else
58941        dir="`$DIRNAME "$path"`"
58942        base="`$BASENAME "$path"`"
58943        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58944      fi
58945    fi
58946  fi
58947
58948
58949    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58950    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58951$as_echo_n "checking for freetype includes... " >&6; }
58952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58953$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58954    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58955    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58956$as_echo_n "checking for freetype libraries... " >&6; }
58957    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58958$as_echo "$FREETYPE_LIB_PATH" >&6; }
58959  fi
58960
58961            fi
58962            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
58963                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
58964              # Source is available, as a last resort try to build freetype in default location
58965
58966  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
58967  BUILD_FREETYPE=yes
58968
58969  # Check if the freetype sources are acessible..
58970  if ! test -d $FREETYPE_SRC_PATH; then
58971    { $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
58972$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
58973    BUILD_FREETYPE=no
58974  fi
58975  # ..and contain a vc2010 project file
58976  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
58977  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
58978    { $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
58979$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
58980    BUILD_FREETYPE=no
58981  fi
58982  # Now check if configure found a version of 'msbuild.exe'
58983  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
58984    { $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
58985$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;}
58986    BUILD_FREETYPE=no
58987  fi
58988
58989  # Ready to go..
58990  if test "x$BUILD_FREETYPE" = xyes; then
58991    # msbuild requires trailing slashes for output directories
58992    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
58993    freetype_lib_path_unix="$freetype_lib_path"
58994    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
58995
58996  unix_path="$vcxproj_path"
58997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58998    windows_path=`$CYGPATH -m "$unix_path"`
58999    vcxproj_path="$windows_path"
59000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59001    windows_path=`cmd //c echo $unix_path`
59002    vcxproj_path="$windows_path"
59003  fi
59004
59005
59006  unix_path="$freetype_lib_path"
59007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59008    windows_path=`$CYGPATH -m "$unix_path"`
59009    freetype_lib_path="$windows_path"
59010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59011    windows_path=`cmd //c echo $unix_path`
59012    freetype_lib_path="$windows_path"
59013  fi
59014
59015
59016  unix_path="$freetype_obj_path"
59017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59018    windows_path=`$CYGPATH -m "$unix_path"`
59019    freetype_obj_path="$windows_path"
59020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59021    windows_path=`cmd //c echo $unix_path`
59022    freetype_obj_path="$windows_path"
59023  fi
59024
59025    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59026      freetype_platform=x64
59027    else
59028      freetype_platform=win32
59029    fi
59030
59031    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59032    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59033    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59034    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59035    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59036$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59037
59038    # First we try to build the freetype.dll
59039    $ECHO -e "@echo off\n"\
59040        "$MSBUILD $vcxproj_path "\
59041        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59042        "/p:Configuration=\"Release Multithreaded\" "\
59043        "/p:Platform=$freetype_platform "\
59044        "/p:ConfigurationType=DynamicLibrary "\
59045        "/p:TargetName=freetype "\
59046        "/p:OutDir=\"$freetype_lib_path\" "\
59047        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59048    cmd /c freetype.bat
59049
59050    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59051      # If that succeeds we also build freetype.lib
59052      $ECHO -e "@echo off\n"\
59053          "$MSBUILD $vcxproj_path "\
59054          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59055          "/p:Configuration=\"Release Multithreaded\" "\
59056          "/p:Platform=$freetype_platform "\
59057          "/p:ConfigurationType=StaticLibrary "\
59058          "/p:TargetName=freetype "\
59059          "/p:OutDir=\"$freetype_lib_path\" "\
59060          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59061      cmd /c freetype.bat
59062
59063      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59064        # Once we build both, lib and dll, set freetype lib and include path appropriately
59065        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59066        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59067        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59068$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59069      else
59070        BUILD_FREETYPE=no
59071      fi
59072    else
59073      BUILD_FREETYPE=no
59074    fi
59075  fi
59076
59077              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59078
59079  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59080  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59081  METHOD="well-known location"
59082
59083  # Let's start with an optimistic view of the world :-)
59084  FOUND_FREETYPE=yes
59085
59086  # First look for the canonical freetype main include file ft2build.h.
59087  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59088    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59089    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59090    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59091      # Fail.
59092      FOUND_FREETYPE=no
59093    fi
59094  fi
59095
59096  if test "x$FOUND_FREETYPE" = xyes; then
59097    # Include file found, let's continue the sanity check.
59098    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59099$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59100
59101    # Reset to default value
59102    FREETYPE_BASE_NAME=freetype
59103    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59104    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59105      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59106          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59107        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59108        # for the .6 version explicitly.
59109        FREETYPE_BASE_NAME=freetype.6
59110        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59111        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59112$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59113      else
59114        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59115$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59116        FOUND_FREETYPE=no
59117      fi
59118    else
59119      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59120        # On Windows, we will need both .lib and .dll file.
59121        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59122          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59123$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59124          FOUND_FREETYPE=no
59125        fi
59126      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59127          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59128        # Found lib in isa dir, use that instead.
59129        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59130        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59131$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59132      fi
59133    fi
59134  fi
59135
59136  if test "x$FOUND_FREETYPE" = xyes; then
59137
59138  # Only process if variable expands to non-empty
59139
59140  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59142
59143  # Input might be given as Windows format, start by converting to
59144  # unix format.
59145  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59146  new_path=`$CYGPATH -u "$path"`
59147
59148  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59149  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59150  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59151  # "foo.exe" is OK but "foo" is an error.
59152  #
59153  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59154  # It is also a way to make sure we got the proper file name for the real test later on.
59155  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59156  if test "x$test_shortpath" = x; then
59157    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59158$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59159    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59160  fi
59161
59162  # Call helper function which possibly converts this using DOS-style short mode.
59163  # If so, the updated path is stored in $new_path.
59164
59165  input_path="$new_path"
59166  # Check if we need to convert this using DOS-style short mode. If the path
59167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59168  # take no chances and rewrite it.
59169  # Note: m4 eats our [], so we need to use [ and ] instead.
59170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59171  if test "x$has_forbidden_chars" != x; then
59172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59176      # Going to short mode and back again did indeed matter. Since short mode is
59177      # case insensitive, let's make it lowercase to improve readability.
59178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59179      # Now convert it back to Unix-style (cygpath)
59180      input_path=`$CYGPATH -u "$shortmode_path"`
59181      new_path="$input_path"
59182    fi
59183  fi
59184
59185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59186  if test "x$test_cygdrive_prefix" = x; then
59187    # As a simple fix, exclude /usr/bin since it's not a real path.
59188    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59190      # a path prefixed by /cygdrive for fixpath to work.
59191      new_path="$CYGWIN_ROOT_PATH$input_path"
59192    fi
59193  fi
59194
59195
59196  if test "x$path" != "x$new_path"; then
59197    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59199$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59200  fi
59201
59202    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59203
59204  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59205  has_colon=`$ECHO $path | $GREP ^.:`
59206  new_path="$path"
59207  if test "x$has_colon" = x; then
59208    # Not in mixed or Windows style, start by that.
59209    new_path=`cmd //c echo $path`
59210  fi
59211
59212
59213  input_path="$new_path"
59214  # Check if we need to convert this using DOS-style short mode. If the path
59215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59216  # take no chances and rewrite it.
59217  # Note: m4 eats our [], so we need to use [ and ] instead.
59218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59219  if test "x$has_forbidden_chars" != x; then
59220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59222  fi
59223
59224
59225  windows_path="$new_path"
59226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59227    unix_path=`$CYGPATH -u "$windows_path"`
59228    new_path="$unix_path"
59229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59231    new_path="$unix_path"
59232  fi
59233
59234  if test "x$path" != "x$new_path"; then
59235    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59237$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59238  fi
59239
59240  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59241  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59242
59243    else
59244      # We're on a unix platform. Hooray! :)
59245      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59246      has_space=`$ECHO "$path" | $GREP " "`
59247      if test "x$has_space" != x; then
59248        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59249$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59250        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59251      fi
59252
59253      # Use eval to expand a potential ~
59254      eval path="$path"
59255      if test ! -f "$path" && test ! -d "$path"; then
59256        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59257      fi
59258
59259      if test -d "$path"; then
59260        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59261      else
59262        dir="`$DIRNAME "$path"`"
59263        base="`$BASENAME "$path"`"
59264        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59265      fi
59266    fi
59267  fi
59268
59269
59270  # Only process if variable expands to non-empty
59271
59272  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59274
59275  # Input might be given as Windows format, start by converting to
59276  # unix format.
59277  path="$POTENTIAL_FREETYPE_LIB_PATH"
59278  new_path=`$CYGPATH -u "$path"`
59279
59280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59283  # "foo.exe" is OK but "foo" is an error.
59284  #
59285  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59286  # It is also a way to make sure we got the proper file name for the real test later on.
59287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59288  if test "x$test_shortpath" = x; then
59289    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59290$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59291    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59292  fi
59293
59294  # Call helper function which possibly converts this using DOS-style short mode.
59295  # If so, the updated path is stored in $new_path.
59296
59297  input_path="$new_path"
59298  # Check if we need to convert this using DOS-style short mode. If the path
59299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59300  # take no chances and rewrite it.
59301  # Note: m4 eats our [], so we need to use [ and ] instead.
59302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59303  if test "x$has_forbidden_chars" != x; then
59304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59308      # Going to short mode and back again did indeed matter. Since short mode is
59309      # case insensitive, let's make it lowercase to improve readability.
59310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59311      # Now convert it back to Unix-style (cygpath)
59312      input_path=`$CYGPATH -u "$shortmode_path"`
59313      new_path="$input_path"
59314    fi
59315  fi
59316
59317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59318  if test "x$test_cygdrive_prefix" = x; then
59319    # As a simple fix, exclude /usr/bin since it's not a real path.
59320    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59322      # a path prefixed by /cygdrive for fixpath to work.
59323      new_path="$CYGWIN_ROOT_PATH$input_path"
59324    fi
59325  fi
59326
59327
59328  if test "x$path" != "x$new_path"; then
59329    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59331$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59332  fi
59333
59334    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59335
59336  path="$POTENTIAL_FREETYPE_LIB_PATH"
59337  has_colon=`$ECHO $path | $GREP ^.:`
59338  new_path="$path"
59339  if test "x$has_colon" = x; then
59340    # Not in mixed or Windows style, start by that.
59341    new_path=`cmd //c echo $path`
59342  fi
59343
59344
59345  input_path="$new_path"
59346  # Check if we need to convert this using DOS-style short mode. If the path
59347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59348  # take no chances and rewrite it.
59349  # Note: m4 eats our [], so we need to use [ and ] instead.
59350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59351  if test "x$has_forbidden_chars" != x; then
59352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59354  fi
59355
59356
59357  windows_path="$new_path"
59358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59359    unix_path=`$CYGPATH -u "$windows_path"`
59360    new_path="$unix_path"
59361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59363    new_path="$unix_path"
59364  fi
59365
59366  if test "x$path" != "x$new_path"; then
59367    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59369$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59370  fi
59371
59372  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59373  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59374
59375    else
59376      # We're on a unix platform. Hooray! :)
59377      path="$POTENTIAL_FREETYPE_LIB_PATH"
59378      has_space=`$ECHO "$path" | $GREP " "`
59379      if test "x$has_space" != x; then
59380        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59381$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59382        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59383      fi
59384
59385      # Use eval to expand a potential ~
59386      eval path="$path"
59387      if test ! -f "$path" && test ! -d "$path"; then
59388        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59389      fi
59390
59391      if test -d "$path"; then
59392        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59393      else
59394        dir="`$DIRNAME "$path"`"
59395        base="`$BASENAME "$path"`"
59396        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59397      fi
59398    fi
59399  fi
59400
59401
59402    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59404$as_echo_n "checking for freetype includes... " >&6; }
59405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59406$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59407    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59408    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59409$as_echo_n "checking for freetype libraries... " >&6; }
59410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59411$as_echo "$FREETYPE_LIB_PATH" >&6; }
59412  fi
59413
59414              else
59415
59416  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59417  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59418  METHOD="well-known location"
59419
59420  # Let's start with an optimistic view of the world :-)
59421  FOUND_FREETYPE=yes
59422
59423  # First look for the canonical freetype main include file ft2build.h.
59424  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59425    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59426    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59427    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59428      # Fail.
59429      FOUND_FREETYPE=no
59430    fi
59431  fi
59432
59433  if test "x$FOUND_FREETYPE" = xyes; then
59434    # Include file found, let's continue the sanity check.
59435    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59436$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59437
59438    # Reset to default value
59439    FREETYPE_BASE_NAME=freetype
59440    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59441    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59442      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59443          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59444        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59445        # for the .6 version explicitly.
59446        FREETYPE_BASE_NAME=freetype.6
59447        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59448        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59449$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59450      else
59451        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59452$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59453        FOUND_FREETYPE=no
59454      fi
59455    else
59456      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59457        # On Windows, we will need both .lib and .dll file.
59458        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59459          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59460$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59461          FOUND_FREETYPE=no
59462        fi
59463      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59464          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59465        # Found lib in isa dir, use that instead.
59466        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59467        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59468$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59469      fi
59470    fi
59471  fi
59472
59473  if test "x$FOUND_FREETYPE" = xyes; then
59474
59475  # Only process if variable expands to non-empty
59476
59477  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59478    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59479
59480  # Input might be given as Windows format, start by converting to
59481  # unix format.
59482  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59483  new_path=`$CYGPATH -u "$path"`
59484
59485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59488  # "foo.exe" is OK but "foo" is an error.
59489  #
59490  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59491  # It is also a way to make sure we got the proper file name for the real test later on.
59492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59493  if test "x$test_shortpath" = x; then
59494    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59495$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59496    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59497  fi
59498
59499  # Call helper function which possibly converts this using DOS-style short mode.
59500  # If so, the updated path is stored in $new_path.
59501
59502  input_path="$new_path"
59503  # Check if we need to convert this using DOS-style short mode. If the path
59504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59505  # take no chances and rewrite it.
59506  # Note: m4 eats our [], so we need to use [ and ] instead.
59507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59508  if test "x$has_forbidden_chars" != x; then
59509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59513      # Going to short mode and back again did indeed matter. Since short mode is
59514      # case insensitive, let's make it lowercase to improve readability.
59515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59516      # Now convert it back to Unix-style (cygpath)
59517      input_path=`$CYGPATH -u "$shortmode_path"`
59518      new_path="$input_path"
59519    fi
59520  fi
59521
59522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59523  if test "x$test_cygdrive_prefix" = x; then
59524    # As a simple fix, exclude /usr/bin since it's not a real path.
59525    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59527      # a path prefixed by /cygdrive for fixpath to work.
59528      new_path="$CYGWIN_ROOT_PATH$input_path"
59529    fi
59530  fi
59531
59532
59533  if test "x$path" != "x$new_path"; then
59534    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59536$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59537  fi
59538
59539    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59540
59541  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59542  has_colon=`$ECHO $path | $GREP ^.:`
59543  new_path="$path"
59544  if test "x$has_colon" = x; then
59545    # Not in mixed or Windows style, start by that.
59546    new_path=`cmd //c echo $path`
59547  fi
59548
59549
59550  input_path="$new_path"
59551  # Check if we need to convert this using DOS-style short mode. If the path
59552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59553  # take no chances and rewrite it.
59554  # Note: m4 eats our [], so we need to use [ and ] instead.
59555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59556  if test "x$has_forbidden_chars" != x; then
59557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59559  fi
59560
59561
59562  windows_path="$new_path"
59563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59564    unix_path=`$CYGPATH -u "$windows_path"`
59565    new_path="$unix_path"
59566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59568    new_path="$unix_path"
59569  fi
59570
59571  if test "x$path" != "x$new_path"; then
59572    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59574$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59575  fi
59576
59577  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59578  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59579
59580    else
59581      # We're on a unix platform. Hooray! :)
59582      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59583      has_space=`$ECHO "$path" | $GREP " "`
59584      if test "x$has_space" != x; then
59585        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59586$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59587        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59588      fi
59589
59590      # Use eval to expand a potential ~
59591      eval path="$path"
59592      if test ! -f "$path" && test ! -d "$path"; then
59593        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59594      fi
59595
59596      if test -d "$path"; then
59597        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59598      else
59599        dir="`$DIRNAME "$path"`"
59600        base="`$BASENAME "$path"`"
59601        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59602      fi
59603    fi
59604  fi
59605
59606
59607  # Only process if variable expands to non-empty
59608
59609  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59610    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59611
59612  # Input might be given as Windows format, start by converting to
59613  # unix format.
59614  path="$POTENTIAL_FREETYPE_LIB_PATH"
59615  new_path=`$CYGPATH -u "$path"`
59616
59617  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59618  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59619  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59620  # "foo.exe" is OK but "foo" is an error.
59621  #
59622  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59623  # It is also a way to make sure we got the proper file name for the real test later on.
59624  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59625  if test "x$test_shortpath" = x; then
59626    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59627$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59628    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59629  fi
59630
59631  # Call helper function which possibly converts this using DOS-style short mode.
59632  # If so, the updated path is stored in $new_path.
59633
59634  input_path="$new_path"
59635  # Check if we need to convert this using DOS-style short mode. If the path
59636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59637  # take no chances and rewrite it.
59638  # Note: m4 eats our [], so we need to use [ and ] instead.
59639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59640  if test "x$has_forbidden_chars" != x; then
59641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59645      # Going to short mode and back again did indeed matter. Since short mode is
59646      # case insensitive, let's make it lowercase to improve readability.
59647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59648      # Now convert it back to Unix-style (cygpath)
59649      input_path=`$CYGPATH -u "$shortmode_path"`
59650      new_path="$input_path"
59651    fi
59652  fi
59653
59654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59655  if test "x$test_cygdrive_prefix" = x; then
59656    # As a simple fix, exclude /usr/bin since it's not a real path.
59657    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59659      # a path prefixed by /cygdrive for fixpath to work.
59660      new_path="$CYGWIN_ROOT_PATH$input_path"
59661    fi
59662  fi
59663
59664
59665  if test "x$path" != "x$new_path"; then
59666    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59668$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59669  fi
59670
59671    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59672
59673  path="$POTENTIAL_FREETYPE_LIB_PATH"
59674  has_colon=`$ECHO $path | $GREP ^.:`
59675  new_path="$path"
59676  if test "x$has_colon" = x; then
59677    # Not in mixed or Windows style, start by that.
59678    new_path=`cmd //c echo $path`
59679  fi
59680
59681
59682  input_path="$new_path"
59683  # Check if we need to convert this using DOS-style short mode. If the path
59684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59685  # take no chances and rewrite it.
59686  # Note: m4 eats our [], so we need to use [ and ] instead.
59687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59688  if test "x$has_forbidden_chars" != x; then
59689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59690    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59691  fi
59692
59693
59694  windows_path="$new_path"
59695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59696    unix_path=`$CYGPATH -u "$windows_path"`
59697    new_path="$unix_path"
59698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59700    new_path="$unix_path"
59701  fi
59702
59703  if test "x$path" != "x$new_path"; then
59704    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59706$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59707  fi
59708
59709  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59710  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59711
59712    else
59713      # We're on a unix platform. Hooray! :)
59714      path="$POTENTIAL_FREETYPE_LIB_PATH"
59715      has_space=`$ECHO "$path" | $GREP " "`
59716      if test "x$has_space" != x; then
59717        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59718$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59719        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59720      fi
59721
59722      # Use eval to expand a potential ~
59723      eval path="$path"
59724      if test ! -f "$path" && test ! -d "$path"; then
59725        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59726      fi
59727
59728      if test -d "$path"; then
59729        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59730      else
59731        dir="`$DIRNAME "$path"`"
59732        base="`$BASENAME "$path"`"
59733        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59734      fi
59735    fi
59736  fi
59737
59738
59739    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59740    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59741$as_echo_n "checking for freetype includes... " >&6; }
59742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59743$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59744    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59746$as_echo_n "checking for freetype libraries... " >&6; }
59747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59748$as_echo "$FREETYPE_LIB_PATH" >&6; }
59749  fi
59750
59751              fi
59752            fi
59753          fi
59754        else
59755          FREETYPE_BASE_DIR="$SYSROOT/usr"
59756
59757  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59758  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59759  METHOD="well-known location"
59760
59761  # Let's start with an optimistic view of the world :-)
59762  FOUND_FREETYPE=yes
59763
59764  # First look for the canonical freetype main include file ft2build.h.
59765  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59766    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59767    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59768    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59769      # Fail.
59770      FOUND_FREETYPE=no
59771    fi
59772  fi
59773
59774  if test "x$FOUND_FREETYPE" = xyes; then
59775    # Include file found, let's continue the sanity check.
59776    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59777$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59778
59779    # Reset to default value
59780    FREETYPE_BASE_NAME=freetype
59781    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59782    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59783      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59784          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59785        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59786        # for the .6 version explicitly.
59787        FREETYPE_BASE_NAME=freetype.6
59788        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59789        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59790$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59791      else
59792        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59793$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59794        FOUND_FREETYPE=no
59795      fi
59796    else
59797      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59798        # On Windows, we will need both .lib and .dll file.
59799        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59800          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59801$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59802          FOUND_FREETYPE=no
59803        fi
59804      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59805          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59806        # Found lib in isa dir, use that instead.
59807        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59808        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59809$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59810      fi
59811    fi
59812  fi
59813
59814  if test "x$FOUND_FREETYPE" = xyes; then
59815
59816  # Only process if variable expands to non-empty
59817
59818  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59820
59821  # Input might be given as Windows format, start by converting to
59822  # unix format.
59823  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59824  new_path=`$CYGPATH -u "$path"`
59825
59826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59829  # "foo.exe" is OK but "foo" is an error.
59830  #
59831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59832  # It is also a way to make sure we got the proper file name for the real test later on.
59833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59834  if test "x$test_shortpath" = x; then
59835    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59836$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59837    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59838  fi
59839
59840  # Call helper function which possibly converts this using DOS-style short mode.
59841  # If so, the updated path is stored in $new_path.
59842
59843  input_path="$new_path"
59844  # Check if we need to convert this using DOS-style short mode. If the path
59845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59846  # take no chances and rewrite it.
59847  # Note: m4 eats our [], so we need to use [ and ] instead.
59848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59849  if test "x$has_forbidden_chars" != x; then
59850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59854      # Going to short mode and back again did indeed matter. Since short mode is
59855      # case insensitive, let's make it lowercase to improve readability.
59856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59857      # Now convert it back to Unix-style (cygpath)
59858      input_path=`$CYGPATH -u "$shortmode_path"`
59859      new_path="$input_path"
59860    fi
59861  fi
59862
59863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59864  if test "x$test_cygdrive_prefix" = x; then
59865    # As a simple fix, exclude /usr/bin since it's not a real path.
59866    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59868      # a path prefixed by /cygdrive for fixpath to work.
59869      new_path="$CYGWIN_ROOT_PATH$input_path"
59870    fi
59871  fi
59872
59873
59874  if test "x$path" != "x$new_path"; then
59875    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59877$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59878  fi
59879
59880    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59881
59882  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59883  has_colon=`$ECHO $path | $GREP ^.:`
59884  new_path="$path"
59885  if test "x$has_colon" = x; then
59886    # Not in mixed or Windows style, start by that.
59887    new_path=`cmd //c echo $path`
59888  fi
59889
59890
59891  input_path="$new_path"
59892  # Check if we need to convert this using DOS-style short mode. If the path
59893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59894  # take no chances and rewrite it.
59895  # Note: m4 eats our [], so we need to use [ and ] instead.
59896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59897  if test "x$has_forbidden_chars" != x; then
59898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59900  fi
59901
59902
59903  windows_path="$new_path"
59904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59905    unix_path=`$CYGPATH -u "$windows_path"`
59906    new_path="$unix_path"
59907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59909    new_path="$unix_path"
59910  fi
59911
59912  if test "x$path" != "x$new_path"; then
59913    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59915$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59916  fi
59917
59918  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59919  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59920
59921    else
59922      # We're on a unix platform. Hooray! :)
59923      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59924      has_space=`$ECHO "$path" | $GREP " "`
59925      if test "x$has_space" != x; then
59926        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59927$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59928        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59929      fi
59930
59931      # Use eval to expand a potential ~
59932      eval path="$path"
59933      if test ! -f "$path" && test ! -d "$path"; then
59934        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59935      fi
59936
59937      if test -d "$path"; then
59938        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59939      else
59940        dir="`$DIRNAME "$path"`"
59941        base="`$BASENAME "$path"`"
59942        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59943      fi
59944    fi
59945  fi
59946
59947
59948  # Only process if variable expands to non-empty
59949
59950  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59951    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59952
59953  # Input might be given as Windows format, start by converting to
59954  # unix format.
59955  path="$POTENTIAL_FREETYPE_LIB_PATH"
59956  new_path=`$CYGPATH -u "$path"`
59957
59958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59961  # "foo.exe" is OK but "foo" is an error.
59962  #
59963  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59964  # It is also a way to make sure we got the proper file name for the real test later on.
59965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59966  if test "x$test_shortpath" = x; then
59967    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59968$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59969    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59970  fi
59971
59972  # Call helper function which possibly converts this using DOS-style short mode.
59973  # If so, the updated path is stored in $new_path.
59974
59975  input_path="$new_path"
59976  # Check if we need to convert this using DOS-style short mode. If the path
59977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59978  # take no chances and rewrite it.
59979  # Note: m4 eats our [], so we need to use [ and ] instead.
59980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59981  if test "x$has_forbidden_chars" != x; then
59982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59986      # Going to short mode and back again did indeed matter. Since short mode is
59987      # case insensitive, let's make it lowercase to improve readability.
59988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59989      # Now convert it back to Unix-style (cygpath)
59990      input_path=`$CYGPATH -u "$shortmode_path"`
59991      new_path="$input_path"
59992    fi
59993  fi
59994
59995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59996  if test "x$test_cygdrive_prefix" = x; then
59997    # As a simple fix, exclude /usr/bin since it's not a real path.
59998    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60000      # a path prefixed by /cygdrive for fixpath to work.
60001      new_path="$CYGWIN_ROOT_PATH$input_path"
60002    fi
60003  fi
60004
60005
60006  if test "x$path" != "x$new_path"; then
60007    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60009$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60010  fi
60011
60012    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60013
60014  path="$POTENTIAL_FREETYPE_LIB_PATH"
60015  has_colon=`$ECHO $path | $GREP ^.:`
60016  new_path="$path"
60017  if test "x$has_colon" = x; then
60018    # Not in mixed or Windows style, start by that.
60019    new_path=`cmd //c echo $path`
60020  fi
60021
60022
60023  input_path="$new_path"
60024  # Check if we need to convert this using DOS-style short mode. If the path
60025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60026  # take no chances and rewrite it.
60027  # Note: m4 eats our [], so we need to use [ and ] instead.
60028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60029  if test "x$has_forbidden_chars" != x; then
60030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60032  fi
60033
60034
60035  windows_path="$new_path"
60036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60037    unix_path=`$CYGPATH -u "$windows_path"`
60038    new_path="$unix_path"
60039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60041    new_path="$unix_path"
60042  fi
60043
60044  if test "x$path" != "x$new_path"; then
60045    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60047$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60048  fi
60049
60050  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60051  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60052
60053    else
60054      # We're on a unix platform. Hooray! :)
60055      path="$POTENTIAL_FREETYPE_LIB_PATH"
60056      has_space=`$ECHO "$path" | $GREP " "`
60057      if test "x$has_space" != x; then
60058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60059$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60060        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60061      fi
60062
60063      # Use eval to expand a potential ~
60064      eval path="$path"
60065      if test ! -f "$path" && test ! -d "$path"; then
60066        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60067      fi
60068
60069      if test -d "$path"; then
60070        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60071      else
60072        dir="`$DIRNAME "$path"`"
60073        base="`$BASENAME "$path"`"
60074        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60075      fi
60076    fi
60077  fi
60078
60079
60080    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60082$as_echo_n "checking for freetype includes... " >&6; }
60083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60084$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60085    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60086    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60087$as_echo_n "checking for freetype libraries... " >&6; }
60088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60089$as_echo "$FREETYPE_LIB_PATH" >&6; }
60090  fi
60091
60092
60093          if test "x$FOUND_FREETYPE" != xyes; then
60094            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60095
60096  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60097  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60098  METHOD="well-known location"
60099
60100  # Let's start with an optimistic view of the world :-)
60101  FOUND_FREETYPE=yes
60102
60103  # First look for the canonical freetype main include file ft2build.h.
60104  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60105    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60106    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60107    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60108      # Fail.
60109      FOUND_FREETYPE=no
60110    fi
60111  fi
60112
60113  if test "x$FOUND_FREETYPE" = xyes; then
60114    # Include file found, let's continue the sanity check.
60115    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60116$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60117
60118    # Reset to default value
60119    FREETYPE_BASE_NAME=freetype
60120    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60121    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60122      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60123          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60124        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60125        # for the .6 version explicitly.
60126        FREETYPE_BASE_NAME=freetype.6
60127        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60128        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60129$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60130      else
60131        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60132$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60133        FOUND_FREETYPE=no
60134      fi
60135    else
60136      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60137        # On Windows, we will need both .lib and .dll file.
60138        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60139          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60140$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60141          FOUND_FREETYPE=no
60142        fi
60143      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60144          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60145        # Found lib in isa dir, use that instead.
60146        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60147        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60148$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60149      fi
60150    fi
60151  fi
60152
60153  if test "x$FOUND_FREETYPE" = xyes; then
60154
60155  # Only process if variable expands to non-empty
60156
60157  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60158    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60159
60160  # Input might be given as Windows format, start by converting to
60161  # unix format.
60162  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60163  new_path=`$CYGPATH -u "$path"`
60164
60165  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60166  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60167  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60168  # "foo.exe" is OK but "foo" is an error.
60169  #
60170  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60171  # It is also a way to make sure we got the proper file name for the real test later on.
60172  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60173  if test "x$test_shortpath" = x; then
60174    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60175$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60176    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60177  fi
60178
60179  # Call helper function which possibly converts this using DOS-style short mode.
60180  # If so, the updated path is stored in $new_path.
60181
60182  input_path="$new_path"
60183  # Check if we need to convert this using DOS-style short mode. If the path
60184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60185  # take no chances and rewrite it.
60186  # Note: m4 eats our [], so we need to use [ and ] instead.
60187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60188  if test "x$has_forbidden_chars" != x; then
60189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60190    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60191    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60192    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60193      # Going to short mode and back again did indeed matter. Since short mode is
60194      # case insensitive, let's make it lowercase to improve readability.
60195      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60196      # Now convert it back to Unix-style (cygpath)
60197      input_path=`$CYGPATH -u "$shortmode_path"`
60198      new_path="$input_path"
60199    fi
60200  fi
60201
60202  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60203  if test "x$test_cygdrive_prefix" = x; then
60204    # As a simple fix, exclude /usr/bin since it's not a real path.
60205    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60206      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60207      # a path prefixed by /cygdrive for fixpath to work.
60208      new_path="$CYGWIN_ROOT_PATH$input_path"
60209    fi
60210  fi
60211
60212
60213  if test "x$path" != "x$new_path"; then
60214    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60216$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60217  fi
60218
60219    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60220
60221  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60222  has_colon=`$ECHO $path | $GREP ^.:`
60223  new_path="$path"
60224  if test "x$has_colon" = x; then
60225    # Not in mixed or Windows style, start by that.
60226    new_path=`cmd //c echo $path`
60227  fi
60228
60229
60230  input_path="$new_path"
60231  # Check if we need to convert this using DOS-style short mode. If the path
60232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60233  # take no chances and rewrite it.
60234  # Note: m4 eats our [], so we need to use [ and ] instead.
60235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60236  if test "x$has_forbidden_chars" != x; then
60237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60239  fi
60240
60241
60242  windows_path="$new_path"
60243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60244    unix_path=`$CYGPATH -u "$windows_path"`
60245    new_path="$unix_path"
60246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60248    new_path="$unix_path"
60249  fi
60250
60251  if test "x$path" != "x$new_path"; then
60252    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60254$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60255  fi
60256
60257  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60258  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60259
60260    else
60261      # We're on a unix platform. Hooray! :)
60262      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60263      has_space=`$ECHO "$path" | $GREP " "`
60264      if test "x$has_space" != x; then
60265        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60266$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60267        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60268      fi
60269
60270      # Use eval to expand a potential ~
60271      eval path="$path"
60272      if test ! -f "$path" && test ! -d "$path"; then
60273        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60274      fi
60275
60276      if test -d "$path"; then
60277        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60278      else
60279        dir="`$DIRNAME "$path"`"
60280        base="`$BASENAME "$path"`"
60281        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60282      fi
60283    fi
60284  fi
60285
60286
60287  # Only process if variable expands to non-empty
60288
60289  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60291
60292  # Input might be given as Windows format, start by converting to
60293  # unix format.
60294  path="$POTENTIAL_FREETYPE_LIB_PATH"
60295  new_path=`$CYGPATH -u "$path"`
60296
60297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60300  # "foo.exe" is OK but "foo" is an error.
60301  #
60302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60303  # It is also a way to make sure we got the proper file name for the real test later on.
60304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60305  if test "x$test_shortpath" = x; then
60306    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60307$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60308    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60309  fi
60310
60311  # Call helper function which possibly converts this using DOS-style short mode.
60312  # If so, the updated path is stored in $new_path.
60313
60314  input_path="$new_path"
60315  # Check if we need to convert this using DOS-style short mode. If the path
60316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60317  # take no chances and rewrite it.
60318  # Note: m4 eats our [], so we need to use [ and ] instead.
60319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60320  if test "x$has_forbidden_chars" != x; then
60321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60325      # Going to short mode and back again did indeed matter. Since short mode is
60326      # case insensitive, let's make it lowercase to improve readability.
60327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60328      # Now convert it back to Unix-style (cygpath)
60329      input_path=`$CYGPATH -u "$shortmode_path"`
60330      new_path="$input_path"
60331    fi
60332  fi
60333
60334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60335  if test "x$test_cygdrive_prefix" = x; then
60336    # As a simple fix, exclude /usr/bin since it's not a real path.
60337    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60339      # a path prefixed by /cygdrive for fixpath to work.
60340      new_path="$CYGWIN_ROOT_PATH$input_path"
60341    fi
60342  fi
60343
60344
60345  if test "x$path" != "x$new_path"; then
60346    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60348$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60349  fi
60350
60351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60352
60353  path="$POTENTIAL_FREETYPE_LIB_PATH"
60354  has_colon=`$ECHO $path | $GREP ^.:`
60355  new_path="$path"
60356  if test "x$has_colon" = x; then
60357    # Not in mixed or Windows style, start by that.
60358    new_path=`cmd //c echo $path`
60359  fi
60360
60361
60362  input_path="$new_path"
60363  # Check if we need to convert this using DOS-style short mode. If the path
60364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60365  # take no chances and rewrite it.
60366  # Note: m4 eats our [], so we need to use [ and ] instead.
60367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60368  if test "x$has_forbidden_chars" != x; then
60369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60371  fi
60372
60373
60374  windows_path="$new_path"
60375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60376    unix_path=`$CYGPATH -u "$windows_path"`
60377    new_path="$unix_path"
60378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60380    new_path="$unix_path"
60381  fi
60382
60383  if test "x$path" != "x$new_path"; then
60384    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60386$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60387  fi
60388
60389  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60390  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60391
60392    else
60393      # We're on a unix platform. Hooray! :)
60394      path="$POTENTIAL_FREETYPE_LIB_PATH"
60395      has_space=`$ECHO "$path" | $GREP " "`
60396      if test "x$has_space" != x; then
60397        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60398$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60399        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60400      fi
60401
60402      # Use eval to expand a potential ~
60403      eval path="$path"
60404      if test ! -f "$path" && test ! -d "$path"; then
60405        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60406      fi
60407
60408      if test -d "$path"; then
60409        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60410      else
60411        dir="`$DIRNAME "$path"`"
60412        base="`$BASENAME "$path"`"
60413        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60414      fi
60415    fi
60416  fi
60417
60418
60419    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60420    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60421$as_echo_n "checking for freetype includes... " >&6; }
60422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60423$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60424    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60425    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60426$as_echo_n "checking for freetype libraries... " >&6; }
60427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60428$as_echo "$FREETYPE_LIB_PATH" >&6; }
60429  fi
60430
60431          fi
60432
60433          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60434            if test "x$FOUND_FREETYPE" != xyes; then
60435              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60436              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60437
60438  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60439  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60440  METHOD="well-known location"
60441
60442  # Let's start with an optimistic view of the world :-)
60443  FOUND_FREETYPE=yes
60444
60445  # First look for the canonical freetype main include file ft2build.h.
60446  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60447    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60448    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60449    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60450      # Fail.
60451      FOUND_FREETYPE=no
60452    fi
60453  fi
60454
60455  if test "x$FOUND_FREETYPE" = xyes; then
60456    # Include file found, let's continue the sanity check.
60457    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60458$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60459
60460    # Reset to default value
60461    FREETYPE_BASE_NAME=freetype
60462    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60463    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60464      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60465          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60466        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60467        # for the .6 version explicitly.
60468        FREETYPE_BASE_NAME=freetype.6
60469        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60470        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60471$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60472      else
60473        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60474$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60475        FOUND_FREETYPE=no
60476      fi
60477    else
60478      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60479        # On Windows, we will need both .lib and .dll file.
60480        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60481          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60482$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60483          FOUND_FREETYPE=no
60484        fi
60485      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60486          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60487        # Found lib in isa dir, use that instead.
60488        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60489        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60490$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60491      fi
60492    fi
60493  fi
60494
60495  if test "x$FOUND_FREETYPE" = xyes; then
60496
60497  # Only process if variable expands to non-empty
60498
60499  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60500    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60501
60502  # Input might be given as Windows format, start by converting to
60503  # unix format.
60504  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60505  new_path=`$CYGPATH -u "$path"`
60506
60507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60510  # "foo.exe" is OK but "foo" is an error.
60511  #
60512  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60513  # It is also a way to make sure we got the proper file name for the real test later on.
60514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60515  if test "x$test_shortpath" = x; then
60516    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60517$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60518    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60519  fi
60520
60521  # Call helper function which possibly converts this using DOS-style short mode.
60522  # If so, the updated path is stored in $new_path.
60523
60524  input_path="$new_path"
60525  # Check if we need to convert this using DOS-style short mode. If the path
60526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60527  # take no chances and rewrite it.
60528  # Note: m4 eats our [], so we need to use [ and ] instead.
60529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60530  if test "x$has_forbidden_chars" != x; then
60531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60535      # Going to short mode and back again did indeed matter. Since short mode is
60536      # case insensitive, let's make it lowercase to improve readability.
60537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60538      # Now convert it back to Unix-style (cygpath)
60539      input_path=`$CYGPATH -u "$shortmode_path"`
60540      new_path="$input_path"
60541    fi
60542  fi
60543
60544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60545  if test "x$test_cygdrive_prefix" = x; then
60546    # As a simple fix, exclude /usr/bin since it's not a real path.
60547    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60549      # a path prefixed by /cygdrive for fixpath to work.
60550      new_path="$CYGWIN_ROOT_PATH$input_path"
60551    fi
60552  fi
60553
60554
60555  if test "x$path" != "x$new_path"; then
60556    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60558$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60559  fi
60560
60561    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60562
60563  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60564  has_colon=`$ECHO $path | $GREP ^.:`
60565  new_path="$path"
60566  if test "x$has_colon" = x; then
60567    # Not in mixed or Windows style, start by that.
60568    new_path=`cmd //c echo $path`
60569  fi
60570
60571
60572  input_path="$new_path"
60573  # Check if we need to convert this using DOS-style short mode. If the path
60574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60575  # take no chances and rewrite it.
60576  # Note: m4 eats our [], so we need to use [ and ] instead.
60577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60578  if test "x$has_forbidden_chars" != x; then
60579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60581  fi
60582
60583
60584  windows_path="$new_path"
60585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60586    unix_path=`$CYGPATH -u "$windows_path"`
60587    new_path="$unix_path"
60588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60590    new_path="$unix_path"
60591  fi
60592
60593  if test "x$path" != "x$new_path"; then
60594    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60596$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60597  fi
60598
60599  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60600  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60601
60602    else
60603      # We're on a unix platform. Hooray! :)
60604      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60605      has_space=`$ECHO "$path" | $GREP " "`
60606      if test "x$has_space" != x; then
60607        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60608$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60609        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60610      fi
60611
60612      # Use eval to expand a potential ~
60613      eval path="$path"
60614      if test ! -f "$path" && test ! -d "$path"; then
60615        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60616      fi
60617
60618      if test -d "$path"; then
60619        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60620      else
60621        dir="`$DIRNAME "$path"`"
60622        base="`$BASENAME "$path"`"
60623        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60624      fi
60625    fi
60626  fi
60627
60628
60629  # Only process if variable expands to non-empty
60630
60631  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60632    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60633
60634  # Input might be given as Windows format, start by converting to
60635  # unix format.
60636  path="$POTENTIAL_FREETYPE_LIB_PATH"
60637  new_path=`$CYGPATH -u "$path"`
60638
60639  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60640  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60641  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60642  # "foo.exe" is OK but "foo" is an error.
60643  #
60644  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60645  # It is also a way to make sure we got the proper file name for the real test later on.
60646  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60647  if test "x$test_shortpath" = x; then
60648    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60649$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60650    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60651  fi
60652
60653  # Call helper function which possibly converts this using DOS-style short mode.
60654  # If so, the updated path is stored in $new_path.
60655
60656  input_path="$new_path"
60657  # Check if we need to convert this using DOS-style short mode. If the path
60658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60659  # take no chances and rewrite it.
60660  # Note: m4 eats our [], so we need to use [ and ] instead.
60661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60662  if test "x$has_forbidden_chars" != x; then
60663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60664    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60665    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60666    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60667      # Going to short mode and back again did indeed matter. Since short mode is
60668      # case insensitive, let's make it lowercase to improve readability.
60669      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60670      # Now convert it back to Unix-style (cygpath)
60671      input_path=`$CYGPATH -u "$shortmode_path"`
60672      new_path="$input_path"
60673    fi
60674  fi
60675
60676  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60677  if test "x$test_cygdrive_prefix" = x; then
60678    # As a simple fix, exclude /usr/bin since it's not a real path.
60679    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60680      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60681      # a path prefixed by /cygdrive for fixpath to work.
60682      new_path="$CYGWIN_ROOT_PATH$input_path"
60683    fi
60684  fi
60685
60686
60687  if test "x$path" != "x$new_path"; then
60688    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60690$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60691  fi
60692
60693    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60694
60695  path="$POTENTIAL_FREETYPE_LIB_PATH"
60696  has_colon=`$ECHO $path | $GREP ^.:`
60697  new_path="$path"
60698  if test "x$has_colon" = x; then
60699    # Not in mixed or Windows style, start by that.
60700    new_path=`cmd //c echo $path`
60701  fi
60702
60703
60704  input_path="$new_path"
60705  # Check if we need to convert this using DOS-style short mode. If the path
60706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60707  # take no chances and rewrite it.
60708  # Note: m4 eats our [], so we need to use [ and ] instead.
60709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60710  if test "x$has_forbidden_chars" != x; then
60711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60712    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60713  fi
60714
60715
60716  windows_path="$new_path"
60717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60718    unix_path=`$CYGPATH -u "$windows_path"`
60719    new_path="$unix_path"
60720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60722    new_path="$unix_path"
60723  fi
60724
60725  if test "x$path" != "x$new_path"; then
60726    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60728$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60729  fi
60730
60731  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60732  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60733
60734    else
60735      # We're on a unix platform. Hooray! :)
60736      path="$POTENTIAL_FREETYPE_LIB_PATH"
60737      has_space=`$ECHO "$path" | $GREP " "`
60738      if test "x$has_space" != x; then
60739        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60740$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60741        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60742      fi
60743
60744      # Use eval to expand a potential ~
60745      eval path="$path"
60746      if test ! -f "$path" && test ! -d "$path"; then
60747        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60748      fi
60749
60750      if test -d "$path"; then
60751        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60752      else
60753        dir="`$DIRNAME "$path"`"
60754        base="`$BASENAME "$path"`"
60755        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60756      fi
60757    fi
60758  fi
60759
60760
60761    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60763$as_echo_n "checking for freetype includes... " >&6; }
60764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60765$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60766    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60768$as_echo_n "checking for freetype libraries... " >&6; }
60769    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60770$as_echo "$FREETYPE_LIB_PATH" >&6; }
60771  fi
60772
60773            fi
60774          fi
60775
60776          if test "x$FOUND_FREETYPE" != xyes; then
60777            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
60778
60779  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60780  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60781  METHOD="well-known location"
60782
60783  # Let's start with an optimistic view of the world :-)
60784  FOUND_FREETYPE=yes
60785
60786  # First look for the canonical freetype main include file ft2build.h.
60787  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60788    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60789    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60790    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60791      # Fail.
60792      FOUND_FREETYPE=no
60793    fi
60794  fi
60795
60796  if test "x$FOUND_FREETYPE" = xyes; then
60797    # Include file found, let's continue the sanity check.
60798    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60799$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60800
60801    # Reset to default value
60802    FREETYPE_BASE_NAME=freetype
60803    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60804    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60805      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60806          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60807        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60808        # for the .6 version explicitly.
60809        FREETYPE_BASE_NAME=freetype.6
60810        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60811        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60812$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60813      else
60814        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60815$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60816        FOUND_FREETYPE=no
60817      fi
60818    else
60819      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60820        # On Windows, we will need both .lib and .dll file.
60821        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60822          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60823$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60824          FOUND_FREETYPE=no
60825        fi
60826      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60827          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60828        # Found lib in isa dir, use that instead.
60829        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60830        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60831$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60832      fi
60833    fi
60834  fi
60835
60836  if test "x$FOUND_FREETYPE" = xyes; then
60837
60838  # Only process if variable expands to non-empty
60839
60840  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60841    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60842
60843  # Input might be given as Windows format, start by converting to
60844  # unix format.
60845  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60846  new_path=`$CYGPATH -u "$path"`
60847
60848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60851  # "foo.exe" is OK but "foo" is an error.
60852  #
60853  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60854  # It is also a way to make sure we got the proper file name for the real test later on.
60855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60856  if test "x$test_shortpath" = x; then
60857    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60858$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60859    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60860  fi
60861
60862  # Call helper function which possibly converts this using DOS-style short mode.
60863  # If so, the updated path is stored in $new_path.
60864
60865  input_path="$new_path"
60866  # Check if we need to convert this using DOS-style short mode. If the path
60867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60868  # take no chances and rewrite it.
60869  # Note: m4 eats our [], so we need to use [ and ] instead.
60870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60871  if test "x$has_forbidden_chars" != x; then
60872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60876      # Going to short mode and back again did indeed matter. Since short mode is
60877      # case insensitive, let's make it lowercase to improve readability.
60878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60879      # Now convert it back to Unix-style (cygpath)
60880      input_path=`$CYGPATH -u "$shortmode_path"`
60881      new_path="$input_path"
60882    fi
60883  fi
60884
60885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60886  if test "x$test_cygdrive_prefix" = x; then
60887    # As a simple fix, exclude /usr/bin since it's not a real path.
60888    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60890      # a path prefixed by /cygdrive for fixpath to work.
60891      new_path="$CYGWIN_ROOT_PATH$input_path"
60892    fi
60893  fi
60894
60895
60896  if test "x$path" != "x$new_path"; then
60897    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60899$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60900  fi
60901
60902    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60903
60904  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60905  has_colon=`$ECHO $path | $GREP ^.:`
60906  new_path="$path"
60907  if test "x$has_colon" = x; then
60908    # Not in mixed or Windows style, start by that.
60909    new_path=`cmd //c echo $path`
60910  fi
60911
60912
60913  input_path="$new_path"
60914  # Check if we need to convert this using DOS-style short mode. If the path
60915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60916  # take no chances and rewrite it.
60917  # Note: m4 eats our [], so we need to use [ and ] instead.
60918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60919  if test "x$has_forbidden_chars" != x; then
60920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60921    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60922  fi
60923
60924
60925  windows_path="$new_path"
60926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60927    unix_path=`$CYGPATH -u "$windows_path"`
60928    new_path="$unix_path"
60929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60931    new_path="$unix_path"
60932  fi
60933
60934  if test "x$path" != "x$new_path"; then
60935    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60937$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60938  fi
60939
60940  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60941  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60942
60943    else
60944      # We're on a unix platform. Hooray! :)
60945      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60946      has_space=`$ECHO "$path" | $GREP " "`
60947      if test "x$has_space" != x; then
60948        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60949$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60950        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60951      fi
60952
60953      # Use eval to expand a potential ~
60954      eval path="$path"
60955      if test ! -f "$path" && test ! -d "$path"; then
60956        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60957      fi
60958
60959      if test -d "$path"; then
60960        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60961      else
60962        dir="`$DIRNAME "$path"`"
60963        base="`$BASENAME "$path"`"
60964        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60965      fi
60966    fi
60967  fi
60968
60969
60970  # Only process if variable expands to non-empty
60971
60972  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60973    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60974
60975  # Input might be given as Windows format, start by converting to
60976  # unix format.
60977  path="$POTENTIAL_FREETYPE_LIB_PATH"
60978  new_path=`$CYGPATH -u "$path"`
60979
60980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60983  # "foo.exe" is OK but "foo" is an error.
60984  #
60985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60986  # It is also a way to make sure we got the proper file name for the real test later on.
60987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60988  if test "x$test_shortpath" = x; then
60989    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60990$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60991    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60992  fi
60993
60994  # Call helper function which possibly converts this using DOS-style short mode.
60995  # If so, the updated path is stored in $new_path.
60996
60997  input_path="$new_path"
60998  # Check if we need to convert this using DOS-style short mode. If the path
60999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61000  # take no chances and rewrite it.
61001  # Note: m4 eats our [], so we need to use [ and ] instead.
61002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61003  if test "x$has_forbidden_chars" != x; then
61004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61008      # Going to short mode and back again did indeed matter. Since short mode is
61009      # case insensitive, let's make it lowercase to improve readability.
61010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61011      # Now convert it back to Unix-style (cygpath)
61012      input_path=`$CYGPATH -u "$shortmode_path"`
61013      new_path="$input_path"
61014    fi
61015  fi
61016
61017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61018  if test "x$test_cygdrive_prefix" = x; then
61019    # As a simple fix, exclude /usr/bin since it's not a real path.
61020    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61022      # a path prefixed by /cygdrive for fixpath to work.
61023      new_path="$CYGWIN_ROOT_PATH$input_path"
61024    fi
61025  fi
61026
61027
61028  if test "x$path" != "x$new_path"; then
61029    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61031$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61032  fi
61033
61034    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61035
61036  path="$POTENTIAL_FREETYPE_LIB_PATH"
61037  has_colon=`$ECHO $path | $GREP ^.:`
61038  new_path="$path"
61039  if test "x$has_colon" = x; then
61040    # Not in mixed or Windows style, start by that.
61041    new_path=`cmd //c echo $path`
61042  fi
61043
61044
61045  input_path="$new_path"
61046  # Check if we need to convert this using DOS-style short mode. If the path
61047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61048  # take no chances and rewrite it.
61049  # Note: m4 eats our [], so we need to use [ and ] instead.
61050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61051  if test "x$has_forbidden_chars" != x; then
61052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61054  fi
61055
61056
61057  windows_path="$new_path"
61058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61059    unix_path=`$CYGPATH -u "$windows_path"`
61060    new_path="$unix_path"
61061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61063    new_path="$unix_path"
61064  fi
61065
61066  if test "x$path" != "x$new_path"; then
61067    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61069$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61070  fi
61071
61072  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61073  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61074
61075    else
61076      # We're on a unix platform. Hooray! :)
61077      path="$POTENTIAL_FREETYPE_LIB_PATH"
61078      has_space=`$ECHO "$path" | $GREP " "`
61079      if test "x$has_space" != x; then
61080        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61081$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61082        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61083      fi
61084
61085      # Use eval to expand a potential ~
61086      eval path="$path"
61087      if test ! -f "$path" && test ! -d "$path"; then
61088        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61089      fi
61090
61091      if test -d "$path"; then
61092        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61093      else
61094        dir="`$DIRNAME "$path"`"
61095        base="`$BASENAME "$path"`"
61096        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61097      fi
61098    fi
61099  fi
61100
61101
61102    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61104$as_echo_n "checking for freetype includes... " >&6; }
61105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61106$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61107    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61109$as_echo_n "checking for freetype libraries... " >&6; }
61110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61111$as_echo "$FREETYPE_LIB_PATH" >&6; }
61112  fi
61113
61114          fi
61115
61116          if test "x$FOUND_FREETYPE" != xyes; then
61117            FREETYPE_BASE_DIR="$SYSROOT/usr"
61118            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61119
61120  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61121  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61122  METHOD="well-known location"
61123
61124  # Let's start with an optimistic view of the world :-)
61125  FOUND_FREETYPE=yes
61126
61127  # First look for the canonical freetype main include file ft2build.h.
61128  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61129    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61130    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61131    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61132      # Fail.
61133      FOUND_FREETYPE=no
61134    fi
61135  fi
61136
61137  if test "x$FOUND_FREETYPE" = xyes; then
61138    # Include file found, let's continue the sanity check.
61139    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61140$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61141
61142    # Reset to default value
61143    FREETYPE_BASE_NAME=freetype
61144    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61145    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61146      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61147          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61148        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61149        # for the .6 version explicitly.
61150        FREETYPE_BASE_NAME=freetype.6
61151        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61152        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61153$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61154      else
61155        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61156$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61157        FOUND_FREETYPE=no
61158      fi
61159    else
61160      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61161        # On Windows, we will need both .lib and .dll file.
61162        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61163          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61164$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61165          FOUND_FREETYPE=no
61166        fi
61167      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61168          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61169        # Found lib in isa dir, use that instead.
61170        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61171        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61172$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61173      fi
61174    fi
61175  fi
61176
61177  if test "x$FOUND_FREETYPE" = xyes; then
61178
61179  # Only process if variable expands to non-empty
61180
61181  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61183
61184  # Input might be given as Windows format, start by converting to
61185  # unix format.
61186  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61187  new_path=`$CYGPATH -u "$path"`
61188
61189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61192  # "foo.exe" is OK but "foo" is an error.
61193  #
61194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61195  # It is also a way to make sure we got the proper file name for the real test later on.
61196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61197  if test "x$test_shortpath" = x; then
61198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61199$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61200    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61201  fi
61202
61203  # Call helper function which possibly converts this using DOS-style short mode.
61204  # If so, the updated path is stored in $new_path.
61205
61206  input_path="$new_path"
61207  # Check if we need to convert this using DOS-style short mode. If the path
61208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61209  # take no chances and rewrite it.
61210  # Note: m4 eats our [], so we need to use [ and ] instead.
61211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61212  if test "x$has_forbidden_chars" != x; then
61213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61217      # Going to short mode and back again did indeed matter. Since short mode is
61218      # case insensitive, let's make it lowercase to improve readability.
61219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61220      # Now convert it back to Unix-style (cygpath)
61221      input_path=`$CYGPATH -u "$shortmode_path"`
61222      new_path="$input_path"
61223    fi
61224  fi
61225
61226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61227  if test "x$test_cygdrive_prefix" = x; then
61228    # As a simple fix, exclude /usr/bin since it's not a real path.
61229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61231      # a path prefixed by /cygdrive for fixpath to work.
61232      new_path="$CYGWIN_ROOT_PATH$input_path"
61233    fi
61234  fi
61235
61236
61237  if test "x$path" != "x$new_path"; then
61238    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61240$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61241  fi
61242
61243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61244
61245  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61246  has_colon=`$ECHO $path | $GREP ^.:`
61247  new_path="$path"
61248  if test "x$has_colon" = x; then
61249    # Not in mixed or Windows style, start by that.
61250    new_path=`cmd //c echo $path`
61251  fi
61252
61253
61254  input_path="$new_path"
61255  # Check if we need to convert this using DOS-style short mode. If the path
61256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61257  # take no chances and rewrite it.
61258  # Note: m4 eats our [], so we need to use [ and ] instead.
61259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61260  if test "x$has_forbidden_chars" != x; then
61261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61263  fi
61264
61265
61266  windows_path="$new_path"
61267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61268    unix_path=`$CYGPATH -u "$windows_path"`
61269    new_path="$unix_path"
61270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61272    new_path="$unix_path"
61273  fi
61274
61275  if test "x$path" != "x$new_path"; then
61276    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61278$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61279  fi
61280
61281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61283
61284    else
61285      # We're on a unix platform. Hooray! :)
61286      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61287      has_space=`$ECHO "$path" | $GREP " "`
61288      if test "x$has_space" != x; then
61289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61290$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61291        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61292      fi
61293
61294      # Use eval to expand a potential ~
61295      eval path="$path"
61296      if test ! -f "$path" && test ! -d "$path"; then
61297        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61298      fi
61299
61300      if test -d "$path"; then
61301        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61302      else
61303        dir="`$DIRNAME "$path"`"
61304        base="`$BASENAME "$path"`"
61305        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61306      fi
61307    fi
61308  fi
61309
61310
61311  # Only process if variable expands to non-empty
61312
61313  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61315
61316  # Input might be given as Windows format, start by converting to
61317  # unix format.
61318  path="$POTENTIAL_FREETYPE_LIB_PATH"
61319  new_path=`$CYGPATH -u "$path"`
61320
61321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61324  # "foo.exe" is OK but "foo" is an error.
61325  #
61326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61327  # It is also a way to make sure we got the proper file name for the real test later on.
61328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61329  if test "x$test_shortpath" = x; then
61330    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61331$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61332    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61333  fi
61334
61335  # Call helper function which possibly converts this using DOS-style short mode.
61336  # If so, the updated path is stored in $new_path.
61337
61338  input_path="$new_path"
61339  # Check if we need to convert this using DOS-style short mode. If the path
61340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61341  # take no chances and rewrite it.
61342  # Note: m4 eats our [], so we need to use [ and ] instead.
61343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61344  if test "x$has_forbidden_chars" != x; then
61345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61349      # Going to short mode and back again did indeed matter. Since short mode is
61350      # case insensitive, let's make it lowercase to improve readability.
61351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61352      # Now convert it back to Unix-style (cygpath)
61353      input_path=`$CYGPATH -u "$shortmode_path"`
61354      new_path="$input_path"
61355    fi
61356  fi
61357
61358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61359  if test "x$test_cygdrive_prefix" = x; then
61360    # As a simple fix, exclude /usr/bin since it's not a real path.
61361    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61363      # a path prefixed by /cygdrive for fixpath to work.
61364      new_path="$CYGWIN_ROOT_PATH$input_path"
61365    fi
61366  fi
61367
61368
61369  if test "x$path" != "x$new_path"; then
61370    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61372$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61373  fi
61374
61375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61376
61377  path="$POTENTIAL_FREETYPE_LIB_PATH"
61378  has_colon=`$ECHO $path | $GREP ^.:`
61379  new_path="$path"
61380  if test "x$has_colon" = x; then
61381    # Not in mixed or Windows style, start by that.
61382    new_path=`cmd //c echo $path`
61383  fi
61384
61385
61386  input_path="$new_path"
61387  # Check if we need to convert this using DOS-style short mode. If the path
61388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61389  # take no chances and rewrite it.
61390  # Note: m4 eats our [], so we need to use [ and ] instead.
61391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61392  if test "x$has_forbidden_chars" != x; then
61393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61395  fi
61396
61397
61398  windows_path="$new_path"
61399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61400    unix_path=`$CYGPATH -u "$windows_path"`
61401    new_path="$unix_path"
61402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61404    new_path="$unix_path"
61405  fi
61406
61407  if test "x$path" != "x$new_path"; then
61408    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61410$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61411  fi
61412
61413  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61414  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61415
61416    else
61417      # We're on a unix platform. Hooray! :)
61418      path="$POTENTIAL_FREETYPE_LIB_PATH"
61419      has_space=`$ECHO "$path" | $GREP " "`
61420      if test "x$has_space" != x; then
61421        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61422$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61423        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61424      fi
61425
61426      # Use eval to expand a potential ~
61427      eval path="$path"
61428      if test ! -f "$path" && test ! -d "$path"; then
61429        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61430      fi
61431
61432      if test -d "$path"; then
61433        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61434      else
61435        dir="`$DIRNAME "$path"`"
61436        base="`$BASENAME "$path"`"
61437        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61438      fi
61439    fi
61440  fi
61441
61442
61443    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61445$as_echo_n "checking for freetype includes... " >&6; }
61446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61447$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61448    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61450$as_echo_n "checking for freetype libraries... " >&6; }
61451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61452$as_echo "$FREETYPE_LIB_PATH" >&6; }
61453  fi
61454
61455            else
61456
61457  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61458  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61459  METHOD="well-known location"
61460
61461  # Let's start with an optimistic view of the world :-)
61462  FOUND_FREETYPE=yes
61463
61464  # First look for the canonical freetype main include file ft2build.h.
61465  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61466    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61467    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61468    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61469      # Fail.
61470      FOUND_FREETYPE=no
61471    fi
61472  fi
61473
61474  if test "x$FOUND_FREETYPE" = xyes; then
61475    # Include file found, let's continue the sanity check.
61476    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61477$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61478
61479    # Reset to default value
61480    FREETYPE_BASE_NAME=freetype
61481    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61482    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61483      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61484          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61485        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61486        # for the .6 version explicitly.
61487        FREETYPE_BASE_NAME=freetype.6
61488        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61489        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61490$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61491      else
61492        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61493$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61494        FOUND_FREETYPE=no
61495      fi
61496    else
61497      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61498        # On Windows, we will need both .lib and .dll file.
61499        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61500          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61501$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61502          FOUND_FREETYPE=no
61503        fi
61504      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61505          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61506        # Found lib in isa dir, use that instead.
61507        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61508        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61509$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61510      fi
61511    fi
61512  fi
61513
61514  if test "x$FOUND_FREETYPE" = xyes; then
61515
61516  # Only process if variable expands to non-empty
61517
61518  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61519    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61520
61521  # Input might be given as Windows format, start by converting to
61522  # unix format.
61523  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61524  new_path=`$CYGPATH -u "$path"`
61525
61526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61529  # "foo.exe" is OK but "foo" is an error.
61530  #
61531  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61532  # It is also a way to make sure we got the proper file name for the real test later on.
61533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61534  if test "x$test_shortpath" = x; then
61535    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61536$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61537    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61538  fi
61539
61540  # Call helper function which possibly converts this using DOS-style short mode.
61541  # If so, the updated path is stored in $new_path.
61542
61543  input_path="$new_path"
61544  # Check if we need to convert this using DOS-style short mode. If the path
61545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61546  # take no chances and rewrite it.
61547  # Note: m4 eats our [], so we need to use [ and ] instead.
61548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61549  if test "x$has_forbidden_chars" != x; then
61550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61554      # Going to short mode and back again did indeed matter. Since short mode is
61555      # case insensitive, let's make it lowercase to improve readability.
61556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61557      # Now convert it back to Unix-style (cygpath)
61558      input_path=`$CYGPATH -u "$shortmode_path"`
61559      new_path="$input_path"
61560    fi
61561  fi
61562
61563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61564  if test "x$test_cygdrive_prefix" = x; then
61565    # As a simple fix, exclude /usr/bin since it's not a real path.
61566    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61568      # a path prefixed by /cygdrive for fixpath to work.
61569      new_path="$CYGWIN_ROOT_PATH$input_path"
61570    fi
61571  fi
61572
61573
61574  if test "x$path" != "x$new_path"; then
61575    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61577$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61578  fi
61579
61580    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61581
61582  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61583  has_colon=`$ECHO $path | $GREP ^.:`
61584  new_path="$path"
61585  if test "x$has_colon" = x; then
61586    # Not in mixed or Windows style, start by that.
61587    new_path=`cmd //c echo $path`
61588  fi
61589
61590
61591  input_path="$new_path"
61592  # Check if we need to convert this using DOS-style short mode. If the path
61593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61594  # take no chances and rewrite it.
61595  # Note: m4 eats our [], so we need to use [ and ] instead.
61596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61597  if test "x$has_forbidden_chars" != x; then
61598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61599    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61600  fi
61601
61602
61603  windows_path="$new_path"
61604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61605    unix_path=`$CYGPATH -u "$windows_path"`
61606    new_path="$unix_path"
61607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61609    new_path="$unix_path"
61610  fi
61611
61612  if test "x$path" != "x$new_path"; then
61613    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61615$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61616  fi
61617
61618  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61619  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61620
61621    else
61622      # We're on a unix platform. Hooray! :)
61623      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61624      has_space=`$ECHO "$path" | $GREP " "`
61625      if test "x$has_space" != x; then
61626        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61627$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61628        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61629      fi
61630
61631      # Use eval to expand a potential ~
61632      eval path="$path"
61633      if test ! -f "$path" && test ! -d "$path"; then
61634        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61635      fi
61636
61637      if test -d "$path"; then
61638        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61639      else
61640        dir="`$DIRNAME "$path"`"
61641        base="`$BASENAME "$path"`"
61642        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61643      fi
61644    fi
61645  fi
61646
61647
61648  # Only process if variable expands to non-empty
61649
61650  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61652
61653  # Input might be given as Windows format, start by converting to
61654  # unix format.
61655  path="$POTENTIAL_FREETYPE_LIB_PATH"
61656  new_path=`$CYGPATH -u "$path"`
61657
61658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61661  # "foo.exe" is OK but "foo" is an error.
61662  #
61663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61664  # It is also a way to make sure we got the proper file name for the real test later on.
61665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61666  if test "x$test_shortpath" = x; then
61667    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61668$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61669    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61670  fi
61671
61672  # Call helper function which possibly converts this using DOS-style short mode.
61673  # If so, the updated path is stored in $new_path.
61674
61675  input_path="$new_path"
61676  # Check if we need to convert this using DOS-style short mode. If the path
61677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61678  # take no chances and rewrite it.
61679  # Note: m4 eats our [], so we need to use [ and ] instead.
61680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61681  if test "x$has_forbidden_chars" != x; then
61682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61686      # Going to short mode and back again did indeed matter. Since short mode is
61687      # case insensitive, let's make it lowercase to improve readability.
61688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61689      # Now convert it back to Unix-style (cygpath)
61690      input_path=`$CYGPATH -u "$shortmode_path"`
61691      new_path="$input_path"
61692    fi
61693  fi
61694
61695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61696  if test "x$test_cygdrive_prefix" = x; then
61697    # As a simple fix, exclude /usr/bin since it's not a real path.
61698    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61700      # a path prefixed by /cygdrive for fixpath to work.
61701      new_path="$CYGWIN_ROOT_PATH$input_path"
61702    fi
61703  fi
61704
61705
61706  if test "x$path" != "x$new_path"; then
61707    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61709$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61710  fi
61711
61712    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61713
61714  path="$POTENTIAL_FREETYPE_LIB_PATH"
61715  has_colon=`$ECHO $path | $GREP ^.:`
61716  new_path="$path"
61717  if test "x$has_colon" = x; then
61718    # Not in mixed or Windows style, start by that.
61719    new_path=`cmd //c echo $path`
61720  fi
61721
61722
61723  input_path="$new_path"
61724  # Check if we need to convert this using DOS-style short mode. If the path
61725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61726  # take no chances and rewrite it.
61727  # Note: m4 eats our [], so we need to use [ and ] instead.
61728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61729  if test "x$has_forbidden_chars" != x; then
61730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61732  fi
61733
61734
61735  windows_path="$new_path"
61736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61737    unix_path=`$CYGPATH -u "$windows_path"`
61738    new_path="$unix_path"
61739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61741    new_path="$unix_path"
61742  fi
61743
61744  if test "x$path" != "x$new_path"; then
61745    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61747$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61748  fi
61749
61750  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61751  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61752
61753    else
61754      # We're on a unix platform. Hooray! :)
61755      path="$POTENTIAL_FREETYPE_LIB_PATH"
61756      has_space=`$ECHO "$path" | $GREP " "`
61757      if test "x$has_space" != x; then
61758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61759$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61760        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61761      fi
61762
61763      # Use eval to expand a potential ~
61764      eval path="$path"
61765      if test ! -f "$path" && test ! -d "$path"; then
61766        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61767      fi
61768
61769      if test -d "$path"; then
61770        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61771      else
61772        dir="`$DIRNAME "$path"`"
61773        base="`$BASENAME "$path"`"
61774        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61775      fi
61776    fi
61777  fi
61778
61779
61780    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61781    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61782$as_echo_n "checking for freetype includes... " >&6; }
61783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61784$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61785    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61787$as_echo_n "checking for freetype libraries... " >&6; }
61788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61789$as_echo "$FREETYPE_LIB_PATH" >&6; }
61790  fi
61791
61792              if test "x$FOUND_FREETYPE" != xyes; then
61793
61794  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61795  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61796  METHOD="well-known location"
61797
61798  # Let's start with an optimistic view of the world :-)
61799  FOUND_FREETYPE=yes
61800
61801  # First look for the canonical freetype main include file ft2build.h.
61802  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61803    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61804    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61805    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61806      # Fail.
61807      FOUND_FREETYPE=no
61808    fi
61809  fi
61810
61811  if test "x$FOUND_FREETYPE" = xyes; then
61812    # Include file found, let's continue the sanity check.
61813    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61814$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61815
61816    # Reset to default value
61817    FREETYPE_BASE_NAME=freetype
61818    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61819    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61820      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61821          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61822        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61823        # for the .6 version explicitly.
61824        FREETYPE_BASE_NAME=freetype.6
61825        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61826        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61827$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61828      else
61829        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61830$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61831        FOUND_FREETYPE=no
61832      fi
61833    else
61834      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61835        # On Windows, we will need both .lib and .dll file.
61836        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61837          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61838$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61839          FOUND_FREETYPE=no
61840        fi
61841      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61842          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61843        # Found lib in isa dir, use that instead.
61844        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61845        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61846$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61847      fi
61848    fi
61849  fi
61850
61851  if test "x$FOUND_FREETYPE" = xyes; then
61852
61853  # Only process if variable expands to non-empty
61854
61855  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61857
61858  # Input might be given as Windows format, start by converting to
61859  # unix format.
61860  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61861  new_path=`$CYGPATH -u "$path"`
61862
61863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61866  # "foo.exe" is OK but "foo" is an error.
61867  #
61868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61869  # It is also a way to make sure we got the proper file name for the real test later on.
61870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61871  if test "x$test_shortpath" = x; then
61872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61873$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61874    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61875  fi
61876
61877  # Call helper function which possibly converts this using DOS-style short mode.
61878  # If so, the updated path is stored in $new_path.
61879
61880  input_path="$new_path"
61881  # Check if we need to convert this using DOS-style short mode. If the path
61882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61883  # take no chances and rewrite it.
61884  # Note: m4 eats our [], so we need to use [ and ] instead.
61885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61886  if test "x$has_forbidden_chars" != x; then
61887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61891      # Going to short mode and back again did indeed matter. Since short mode is
61892      # case insensitive, let's make it lowercase to improve readability.
61893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61894      # Now convert it back to Unix-style (cygpath)
61895      input_path=`$CYGPATH -u "$shortmode_path"`
61896      new_path="$input_path"
61897    fi
61898  fi
61899
61900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61901  if test "x$test_cygdrive_prefix" = x; then
61902    # As a simple fix, exclude /usr/bin since it's not a real path.
61903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61905      # a path prefixed by /cygdrive for fixpath to work.
61906      new_path="$CYGWIN_ROOT_PATH$input_path"
61907    fi
61908  fi
61909
61910
61911  if test "x$path" != "x$new_path"; then
61912    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61914$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61915  fi
61916
61917    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61918
61919  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61920  has_colon=`$ECHO $path | $GREP ^.:`
61921  new_path="$path"
61922  if test "x$has_colon" = x; then
61923    # Not in mixed or Windows style, start by that.
61924    new_path=`cmd //c echo $path`
61925  fi
61926
61927
61928  input_path="$new_path"
61929  # Check if we need to convert this using DOS-style short mode. If the path
61930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61931  # take no chances and rewrite it.
61932  # Note: m4 eats our [], so we need to use [ and ] instead.
61933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61934  if test "x$has_forbidden_chars" != x; then
61935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61937  fi
61938
61939
61940  windows_path="$new_path"
61941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61942    unix_path=`$CYGPATH -u "$windows_path"`
61943    new_path="$unix_path"
61944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61946    new_path="$unix_path"
61947  fi
61948
61949  if test "x$path" != "x$new_path"; then
61950    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61952$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61953  fi
61954
61955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61957
61958    else
61959      # We're on a unix platform. Hooray! :)
61960      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61961      has_space=`$ECHO "$path" | $GREP " "`
61962      if test "x$has_space" != x; then
61963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61964$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61965        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61966      fi
61967
61968      # Use eval to expand a potential ~
61969      eval path="$path"
61970      if test ! -f "$path" && test ! -d "$path"; then
61971        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61972      fi
61973
61974      if test -d "$path"; then
61975        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61976      else
61977        dir="`$DIRNAME "$path"`"
61978        base="`$BASENAME "$path"`"
61979        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61980      fi
61981    fi
61982  fi
61983
61984
61985  # Only process if variable expands to non-empty
61986
61987  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61988    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61989
61990  # Input might be given as Windows format, start by converting to
61991  # unix format.
61992  path="$POTENTIAL_FREETYPE_LIB_PATH"
61993  new_path=`$CYGPATH -u "$path"`
61994
61995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61998  # "foo.exe" is OK but "foo" is an error.
61999  #
62000  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62001  # It is also a way to make sure we got the proper file name for the real test later on.
62002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62003  if test "x$test_shortpath" = x; then
62004    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62005$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62006    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62007  fi
62008
62009  # Call helper function which possibly converts this using DOS-style short mode.
62010  # If so, the updated path is stored in $new_path.
62011
62012  input_path="$new_path"
62013  # Check if we need to convert this using DOS-style short mode. If the path
62014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62015  # take no chances and rewrite it.
62016  # Note: m4 eats our [], so we need to use [ and ] instead.
62017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62018  if test "x$has_forbidden_chars" != x; then
62019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62023      # Going to short mode and back again did indeed matter. Since short mode is
62024      # case insensitive, let's make it lowercase to improve readability.
62025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62026      # Now convert it back to Unix-style (cygpath)
62027      input_path=`$CYGPATH -u "$shortmode_path"`
62028      new_path="$input_path"
62029    fi
62030  fi
62031
62032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62033  if test "x$test_cygdrive_prefix" = x; then
62034    # As a simple fix, exclude /usr/bin since it's not a real path.
62035    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62037      # a path prefixed by /cygdrive for fixpath to work.
62038      new_path="$CYGWIN_ROOT_PATH$input_path"
62039    fi
62040  fi
62041
62042
62043  if test "x$path" != "x$new_path"; then
62044    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62046$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62047  fi
62048
62049    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62050
62051  path="$POTENTIAL_FREETYPE_LIB_PATH"
62052  has_colon=`$ECHO $path | $GREP ^.:`
62053  new_path="$path"
62054  if test "x$has_colon" = x; then
62055    # Not in mixed or Windows style, start by that.
62056    new_path=`cmd //c echo $path`
62057  fi
62058
62059
62060  input_path="$new_path"
62061  # Check if we need to convert this using DOS-style short mode. If the path
62062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62063  # take no chances and rewrite it.
62064  # Note: m4 eats our [], so we need to use [ and ] instead.
62065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62066  if test "x$has_forbidden_chars" != x; then
62067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62068    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62069  fi
62070
62071
62072  windows_path="$new_path"
62073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62074    unix_path=`$CYGPATH -u "$windows_path"`
62075    new_path="$unix_path"
62076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62078    new_path="$unix_path"
62079  fi
62080
62081  if test "x$path" != "x$new_path"; then
62082    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62084$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62085  fi
62086
62087  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62088  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62089
62090    else
62091      # We're on a unix platform. Hooray! :)
62092      path="$POTENTIAL_FREETYPE_LIB_PATH"
62093      has_space=`$ECHO "$path" | $GREP " "`
62094      if test "x$has_space" != x; then
62095        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62096$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62097        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62098      fi
62099
62100      # Use eval to expand a potential ~
62101      eval path="$path"
62102      if test ! -f "$path" && test ! -d "$path"; then
62103        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62104      fi
62105
62106      if test -d "$path"; then
62107        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62108      else
62109        dir="`$DIRNAME "$path"`"
62110        base="`$BASENAME "$path"`"
62111        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62112      fi
62113    fi
62114  fi
62115
62116
62117    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62118    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62119$as_echo_n "checking for freetype includes... " >&6; }
62120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62121$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62122    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62124$as_echo_n "checking for freetype libraries... " >&6; }
62125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62126$as_echo "$FREETYPE_LIB_PATH" >&6; }
62127  fi
62128
62129              fi
62130            fi
62131          fi
62132        fi
62133      fi # end check in well-known locations
62134
62135      if test "x$FOUND_FREETYPE" != xyes; then
62136
62137  # Print a helpful message on how to acquire the necessary build dependency.
62138  # freetype is the help tag: freetype, cups, alsa etc
62139  MISSING_DEPENDENCY=freetype
62140
62141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62142    cygwin_help $MISSING_DEPENDENCY
62143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62144    msys_help $MISSING_DEPENDENCY
62145  else
62146    PKGHANDLER_COMMAND=
62147
62148    case $PKGHANDLER in
62149      apt-get)
62150        apt_help     $MISSING_DEPENDENCY ;;
62151      yum)
62152        yum_help     $MISSING_DEPENDENCY ;;
62153      port)
62154        port_help    $MISSING_DEPENDENCY ;;
62155      pkgutil)
62156        pkgutil_help $MISSING_DEPENDENCY ;;
62157      pkgadd)
62158        pkgadd_help  $MISSING_DEPENDENCY ;;
62159    esac
62160
62161    if test "x$PKGHANDLER_COMMAND" != x; then
62162      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62163    fi
62164  fi
62165
62166        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62167      fi
62168    fi # end user specified settings
62169
62170    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62171    if test "x$FREETYPE_CFLAGS" = x; then
62172
62173  # Only process if variable expands to non-empty
62174
62175  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62176    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62177
62178  # Input might be given as Windows format, start by converting to
62179  # unix format.
62180  path="$FREETYPE_INCLUDE_PATH"
62181  new_path=`$CYGPATH -u "$path"`
62182
62183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62186  # "foo.exe" is OK but "foo" is an error.
62187  #
62188  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62189  # It is also a way to make sure we got the proper file name for the real test later on.
62190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62191  if test "x$test_shortpath" = x; then
62192    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62193$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62194    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62195  fi
62196
62197  # Call helper function which possibly converts this using DOS-style short mode.
62198  # If so, the updated path is stored in $new_path.
62199
62200  input_path="$new_path"
62201  # Check if we need to convert this using DOS-style short mode. If the path
62202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62203  # take no chances and rewrite it.
62204  # Note: m4 eats our [], so we need to use [ and ] instead.
62205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62206  if test "x$has_forbidden_chars" != x; then
62207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62211      # Going to short mode and back again did indeed matter. Since short mode is
62212      # case insensitive, let's make it lowercase to improve readability.
62213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62214      # Now convert it back to Unix-style (cygpath)
62215      input_path=`$CYGPATH -u "$shortmode_path"`
62216      new_path="$input_path"
62217    fi
62218  fi
62219
62220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62221  if test "x$test_cygdrive_prefix" = x; then
62222    # As a simple fix, exclude /usr/bin since it's not a real path.
62223    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62225      # a path prefixed by /cygdrive for fixpath to work.
62226      new_path="$CYGWIN_ROOT_PATH$input_path"
62227    fi
62228  fi
62229
62230
62231  if test "x$path" != "x$new_path"; then
62232    FREETYPE_INCLUDE_PATH="$new_path"
62233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62234$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62235  fi
62236
62237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62238
62239  path="$FREETYPE_INCLUDE_PATH"
62240  has_colon=`$ECHO $path | $GREP ^.:`
62241  new_path="$path"
62242  if test "x$has_colon" = x; then
62243    # Not in mixed or Windows style, start by that.
62244    new_path=`cmd //c echo $path`
62245  fi
62246
62247
62248  input_path="$new_path"
62249  # Check if we need to convert this using DOS-style short mode. If the path
62250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62251  # take no chances and rewrite it.
62252  # Note: m4 eats our [], so we need to use [ and ] instead.
62253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62254  if test "x$has_forbidden_chars" != x; then
62255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62257  fi
62258
62259
62260  windows_path="$new_path"
62261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62262    unix_path=`$CYGPATH -u "$windows_path"`
62263    new_path="$unix_path"
62264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62266    new_path="$unix_path"
62267  fi
62268
62269  if test "x$path" != "x$new_path"; then
62270    FREETYPE_INCLUDE_PATH="$new_path"
62271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62272$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62273  fi
62274
62275  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62276  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62277
62278    else
62279      # We're on a unix platform. Hooray! :)
62280      path="$FREETYPE_INCLUDE_PATH"
62281      has_space=`$ECHO "$path" | $GREP " "`
62282      if test "x$has_space" != x; then
62283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62284$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62285        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62286      fi
62287
62288      # Use eval to expand a potential ~
62289      eval path="$path"
62290      if test ! -f "$path" && test ! -d "$path"; then
62291        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62292      fi
62293
62294      if test -d "$path"; then
62295        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62296      else
62297        dir="`$DIRNAME "$path"`"
62298        base="`$BASENAME "$path"`"
62299        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62300      fi
62301    fi
62302  fi
62303
62304      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62305        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62306      else
62307        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62308      fi
62309    fi
62310
62311    if test "x$FREETYPE_LIBS" = x; then
62312
62313  # Only process if variable expands to non-empty
62314
62315  if test "x$FREETYPE_LIB_PATH" != x; then
62316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62317
62318  # Input might be given as Windows format, start by converting to
62319  # unix format.
62320  path="$FREETYPE_LIB_PATH"
62321  new_path=`$CYGPATH -u "$path"`
62322
62323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62326  # "foo.exe" is OK but "foo" is an error.
62327  #
62328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62329  # It is also a way to make sure we got the proper file name for the real test later on.
62330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62331  if test "x$test_shortpath" = x; then
62332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62333$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62334    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62335  fi
62336
62337  # Call helper function which possibly converts this using DOS-style short mode.
62338  # If so, the updated path is stored in $new_path.
62339
62340  input_path="$new_path"
62341  # Check if we need to convert this using DOS-style short mode. If the path
62342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62343  # take no chances and rewrite it.
62344  # Note: m4 eats our [], so we need to use [ and ] instead.
62345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62346  if test "x$has_forbidden_chars" != x; then
62347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62351      # Going to short mode and back again did indeed matter. Since short mode is
62352      # case insensitive, let's make it lowercase to improve readability.
62353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62354      # Now convert it back to Unix-style (cygpath)
62355      input_path=`$CYGPATH -u "$shortmode_path"`
62356      new_path="$input_path"
62357    fi
62358  fi
62359
62360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62361  if test "x$test_cygdrive_prefix" = x; then
62362    # As a simple fix, exclude /usr/bin since it's not a real path.
62363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62365      # a path prefixed by /cygdrive for fixpath to work.
62366      new_path="$CYGWIN_ROOT_PATH$input_path"
62367    fi
62368  fi
62369
62370
62371  if test "x$path" != "x$new_path"; then
62372    FREETYPE_LIB_PATH="$new_path"
62373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62374$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62375  fi
62376
62377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62378
62379  path="$FREETYPE_LIB_PATH"
62380  has_colon=`$ECHO $path | $GREP ^.:`
62381  new_path="$path"
62382  if test "x$has_colon" = x; then
62383    # Not in mixed or Windows style, start by that.
62384    new_path=`cmd //c echo $path`
62385  fi
62386
62387
62388  input_path="$new_path"
62389  # Check if we need to convert this using DOS-style short mode. If the path
62390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62391  # take no chances and rewrite it.
62392  # Note: m4 eats our [], so we need to use [ and ] instead.
62393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62394  if test "x$has_forbidden_chars" != x; then
62395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62397  fi
62398
62399
62400  windows_path="$new_path"
62401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62402    unix_path=`$CYGPATH -u "$windows_path"`
62403    new_path="$unix_path"
62404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62406    new_path="$unix_path"
62407  fi
62408
62409  if test "x$path" != "x$new_path"; then
62410    FREETYPE_LIB_PATH="$new_path"
62411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62412$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62413  fi
62414
62415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62417
62418    else
62419      # We're on a unix platform. Hooray! :)
62420      path="$FREETYPE_LIB_PATH"
62421      has_space=`$ECHO "$path" | $GREP " "`
62422      if test "x$has_space" != x; then
62423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62424$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62425        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62426      fi
62427
62428      # Use eval to expand a potential ~
62429      eval path="$path"
62430      if test ! -f "$path" && test ! -d "$path"; then
62431        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62432      fi
62433
62434      if test -d "$path"; then
62435        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62436      else
62437        dir="`$DIRNAME "$path"`"
62438        base="`$BASENAME "$path"`"
62439        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62440      fi
62441    fi
62442  fi
62443
62444      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62445        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62446      else
62447        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62448      fi
62449    fi
62450
62451    # Try to compile it
62452    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62453$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62454    ac_ext=cpp
62455ac_cpp='$CXXCPP $CPPFLAGS'
62456ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62457ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62458ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62459
62460    PREV_CXXCFLAGS="$CXXFLAGS"
62461    PREV_LIBS="$LIBS"
62462    PREV_CXX="$CXX"
62463    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62464    LIBS="$LIBS $FREETYPE_LIBS"
62465    CXX="$FIXPATH $CXX"
62466    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62467/* end confdefs.h.  */
62468
62469          #include<ft2build.h>
62470          #include FT_FREETYPE_H
62471          int main () {
62472            FT_Init_FreeType(NULL);
62473            return 0;
62474          }
62475
62476_ACEOF
62477if ac_fn_cxx_try_link "$LINENO"; then :
62478
62479          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62480$as_echo "yes" >&6; }
62481
62482else
62483
62484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62485$as_echo "no" >&6; }
62486          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62487$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62488          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62489$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62490
62491
62492  # Print a helpful message on how to acquire the necessary build dependency.
62493  # freetype is the help tag: freetype, cups, alsa etc
62494  MISSING_DEPENDENCY=freetype
62495
62496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62497    cygwin_help $MISSING_DEPENDENCY
62498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62499    msys_help $MISSING_DEPENDENCY
62500  else
62501    PKGHANDLER_COMMAND=
62502
62503    case $PKGHANDLER in
62504      apt-get)
62505        apt_help     $MISSING_DEPENDENCY ;;
62506      yum)
62507        yum_help     $MISSING_DEPENDENCY ;;
62508      port)
62509        port_help    $MISSING_DEPENDENCY ;;
62510      pkgutil)
62511        pkgutil_help $MISSING_DEPENDENCY ;;
62512      pkgadd)
62513        pkgadd_help  $MISSING_DEPENDENCY ;;
62514    esac
62515
62516    if test "x$PKGHANDLER_COMMAND" != x; then
62517      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62518    fi
62519  fi
62520
62521
62522          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62523
62524
62525fi
62526rm -f core conftest.err conftest.$ac_objext \
62527    conftest$ac_exeext conftest.$ac_ext
62528    CXXCFLAGS="$PREV_CXXFLAGS"
62529    LIBS="$PREV_LIBS"
62530    CXX="$PREV_CXX"
62531    ac_ext=cpp
62532ac_cpp='$CXXCPP $CPPFLAGS'
62533ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62534ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62535ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62536
62537
62538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62539$as_echo_n "checking if we should bundle freetype... " >&6; }
62540    if test "x$BUNDLE_FREETYPE" = xyes; then
62541      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62542    fi
62543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62544$as_echo "$BUNDLE_FREETYPE" >&6; }
62545
62546  fi # end freetype needed
62547
62548
62549
62550
62551
62552
62553
62554# Check whether --with-alsa was given.
62555if test "${with_alsa+set}" = set; then :
62556  withval=$with_alsa;
62557fi
62558
62559
62560# Check whether --with-alsa-include was given.
62561if test "${with_alsa_include+set}" = set; then :
62562  withval=$with_alsa_include;
62563fi
62564
62565
62566# Check whether --with-alsa-lib was given.
62567if test "${with_alsa_lib+set}" = set; then :
62568  withval=$with_alsa_lib;
62569fi
62570
62571
62572  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62573    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62574        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62575        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62576      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62577$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62578    fi
62579    ALSA_CFLAGS=
62580    ALSA_LIBS=
62581  else
62582    ALSA_FOUND=no
62583
62584    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62585      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62586    fi
62587
62588    if test "x${with_alsa}" != x; then
62589      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62590      ALSA_CFLAGS="-I${with_alsa}/include"
62591      ALSA_FOUND=yes
62592    fi
62593    if test "x${with_alsa_include}" != x; then
62594      ALSA_CFLAGS="-I${with_alsa_include}"
62595      ALSA_FOUND=yes
62596    fi
62597    if test "x${with_alsa_lib}" != x; then
62598      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62599      ALSA_FOUND=yes
62600    fi
62601    # Do not try pkg-config if we have a sysroot set.
62602    if test "x$SYSROOT" = x; then
62603      if test "x$ALSA_FOUND" = xno; then
62604
62605pkg_failed=no
62606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62607$as_echo_n "checking for ALSA... " >&6; }
62608
62609if test -n "$ALSA_CFLAGS"; then
62610    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62611 elif test -n "$PKG_CONFIG"; then
62612    if test -n "$PKG_CONFIG" && \
62613    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62614  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62615  ac_status=$?
62616  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62617  test $ac_status = 0; }; then
62618  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62619else
62620  pkg_failed=yes
62621fi
62622 else
62623    pkg_failed=untried
62624fi
62625if test -n "$ALSA_LIBS"; then
62626    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62627 elif test -n "$PKG_CONFIG"; then
62628    if test -n "$PKG_CONFIG" && \
62629    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62630  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62631  ac_status=$?
62632  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62633  test $ac_status = 0; }; then
62634  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62635else
62636  pkg_failed=yes
62637fi
62638 else
62639    pkg_failed=untried
62640fi
62641
62642
62643
62644if test $pkg_failed = yes; then
62645
62646if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62647        _pkg_short_errors_supported=yes
62648else
62649        _pkg_short_errors_supported=no
62650fi
62651        if test $_pkg_short_errors_supported = yes; then
62652	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62653        else
62654	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62655        fi
62656	# Put the nasty error message in config.log where it belongs
62657	echo "$ALSA_PKG_ERRORS" >&5
62658
62659	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62660$as_echo "no" >&6; }
62661                ALSA_FOUND=no
62662elif test $pkg_failed = untried; then
62663	ALSA_FOUND=no
62664else
62665	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62666	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62668$as_echo "yes" >&6; }
62669	ALSA_FOUND=yes
62670fi
62671      fi
62672    fi
62673    if test "x$ALSA_FOUND" = xno; then
62674      for ac_header in alsa/asoundlib.h
62675do :
62676  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62677if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62678  cat >>confdefs.h <<_ACEOF
62679#define HAVE_ALSA_ASOUNDLIB_H 1
62680_ACEOF
62681
62682            ALSA_FOUND=yes
62683            ALSA_CFLAGS=-Iignoreme
62684            ALSA_LIBS=-lasound
62685            DEFAULT_ALSA=yes
62686
62687else
62688  ALSA_FOUND=no
62689
62690fi
62691
62692done
62693
62694    fi
62695    if test "x$ALSA_FOUND" = xno; then
62696
62697  # Print a helpful message on how to acquire the necessary build dependency.
62698  # alsa is the help tag: freetype, cups, alsa etc
62699  MISSING_DEPENDENCY=alsa
62700
62701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62702    cygwin_help $MISSING_DEPENDENCY
62703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62704    msys_help $MISSING_DEPENDENCY
62705  else
62706    PKGHANDLER_COMMAND=
62707
62708    case $PKGHANDLER in
62709      apt-get)
62710        apt_help     $MISSING_DEPENDENCY ;;
62711      yum)
62712        yum_help     $MISSING_DEPENDENCY ;;
62713      port)
62714        port_help    $MISSING_DEPENDENCY ;;
62715      pkgutil)
62716        pkgutil_help $MISSING_DEPENDENCY ;;
62717      pkgadd)
62718        pkgadd_help  $MISSING_DEPENDENCY ;;
62719    esac
62720
62721    if test "x$PKGHANDLER_COMMAND" != x; then
62722      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62723    fi
62724  fi
62725
62726      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62727    fi
62728  fi
62729
62730
62731
62732
62733
62734
62735# Check whether --with-libffi was given.
62736if test "${with_libffi+set}" = set; then :
62737  withval=$with_libffi;
62738fi
62739
62740
62741# Check whether --with-libffi-include was given.
62742if test "${with_libffi_include+set}" = set; then :
62743  withval=$with_libffi_include;
62744fi
62745
62746
62747# Check whether --with-libffi-lib was given.
62748if test "${with_libffi_lib+set}" = set; then :
62749  withval=$with_libffi_lib;
62750fi
62751
62752
62753  if test "x$NEEDS_LIB_FFI" = xfalse; then
62754    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62755        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62756        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62757      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62758$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62759    fi
62760    LIBFFI_CFLAGS=
62761    LIBFFI_LIBS=
62762  else
62763    LIBFFI_FOUND=no
62764
62765    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62766      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62767    fi
62768
62769    if test "x${with_libffi}" != x; then
62770      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62771      LIBFFI_CFLAGS="-I${with_libffi}/include"
62772      LIBFFI_FOUND=yes
62773    fi
62774    if test "x${with_libffi_include}" != x; then
62775      LIBFFI_CFLAGS="-I${with_libffi_include}"
62776      LIBFFI_FOUND=yes
62777    fi
62778    if test "x${with_libffi_lib}" != x; then
62779      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62780      LIBFFI_FOUND=yes
62781    fi
62782    # Do not try pkg-config if we have a sysroot set.
62783    if test "x$SYSROOT" = x; then
62784      if test "x$LIBFFI_FOUND" = xno; then
62785        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62786
62787pkg_failed=no
62788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62789$as_echo_n "checking for LIBFFI... " >&6; }
62790
62791if test -n "$LIBFFI_CFLAGS"; then
62792    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62793 elif test -n "$PKG_CONFIG"; then
62794    if test -n "$PKG_CONFIG" && \
62795    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62796  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62797  ac_status=$?
62798  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62799  test $ac_status = 0; }; then
62800  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62801else
62802  pkg_failed=yes
62803fi
62804 else
62805    pkg_failed=untried
62806fi
62807if test -n "$LIBFFI_LIBS"; then
62808    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62809 elif test -n "$PKG_CONFIG"; then
62810    if test -n "$PKG_CONFIG" && \
62811    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62812  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62813  ac_status=$?
62814  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62815  test $ac_status = 0; }; then
62816  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62817else
62818  pkg_failed=yes
62819fi
62820 else
62821    pkg_failed=untried
62822fi
62823
62824
62825
62826if test $pkg_failed = yes; then
62827
62828if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62829        _pkg_short_errors_supported=yes
62830else
62831        _pkg_short_errors_supported=no
62832fi
62833        if test $_pkg_short_errors_supported = yes; then
62834	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62835        else
62836	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62837        fi
62838	# Put the nasty error message in config.log where it belongs
62839	echo "$LIBFFI_PKG_ERRORS" >&5
62840
62841	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62842$as_echo "no" >&6; }
62843                LIBFFI_FOUND=no
62844elif test $pkg_failed = untried; then
62845	LIBFFI_FOUND=no
62846else
62847	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62848	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62849        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62850$as_echo "yes" >&6; }
62851	LIBFFI_FOUND=yes
62852fi
62853      fi
62854    fi
62855    if test "x$LIBFFI_FOUND" = xno; then
62856      for ac_header in ffi.h
62857do :
62858  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62859if test "x$ac_cv_header_ffi_h" = xyes; then :
62860  cat >>confdefs.h <<_ACEOF
62861#define HAVE_FFI_H 1
62862_ACEOF
62863
62864            LIBFFI_FOUND=yes
62865            LIBFFI_CFLAGS=
62866            LIBFFI_LIBS=-lffi
62867
62868else
62869  LIBFFI_FOUND=no
62870
62871fi
62872
62873done
62874
62875    fi
62876    if test "x$LIBFFI_FOUND" = xno; then
62877
62878  # Print a helpful message on how to acquire the necessary build dependency.
62879  # ffi is the help tag: freetype, cups, alsa etc
62880  MISSING_DEPENDENCY=ffi
62881
62882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62883    cygwin_help $MISSING_DEPENDENCY
62884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62885    msys_help $MISSING_DEPENDENCY
62886  else
62887    PKGHANDLER_COMMAND=
62888
62889    case $PKGHANDLER in
62890      apt-get)
62891        apt_help     $MISSING_DEPENDENCY ;;
62892      yum)
62893        yum_help     $MISSING_DEPENDENCY ;;
62894      port)
62895        port_help    $MISSING_DEPENDENCY ;;
62896      pkgutil)
62897        pkgutil_help $MISSING_DEPENDENCY ;;
62898      pkgadd)
62899        pkgadd_help  $MISSING_DEPENDENCY ;;
62900    esac
62901
62902    if test "x$PKGHANDLER_COMMAND" != x; then
62903      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62904    fi
62905  fi
62906
62907      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62908    fi
62909
62910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62911$as_echo_n "checking if libffi works... " >&6; }
62912    ac_ext=c
62913ac_cpp='$CPP $CPPFLAGS'
62914ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62915ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62916ac_compiler_gnu=$ac_cv_c_compiler_gnu
62917
62918    OLD_CFLAGS="$CFLAGS"
62919    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62920    OLD_LIBS="$LIBS"
62921    LIBS="$LIBS $LIBFFI_LIBS"
62922    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62923/* end confdefs.h.  */
62924#include <ffi.h>
62925int
62926main ()
62927{
62928
62929          ffi_call(NULL, NULL, NULL, NULL);
62930          return 0;
62931
62932  ;
62933  return 0;
62934}
62935_ACEOF
62936if ac_fn_c_try_link "$LINENO"; then :
62937  LIBFFI_WORKS=yes
62938else
62939  LIBFFI_WORKS=no
62940
62941fi
62942rm -f core conftest.err conftest.$ac_objext \
62943    conftest$ac_exeext conftest.$ac_ext
62944    CFLAGS="$OLD_CFLAGS"
62945    LIBS="$OLD_LIBS"
62946    ac_ext=cpp
62947ac_cpp='$CXXCPP $CPPFLAGS'
62948ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62949ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62950ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62951
62952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62953$as_echo "$LIBFFI_WORKS" >&6; }
62954
62955    if test "x$LIBFFI_WORKS" = xno; then
62956
62957  # Print a helpful message on how to acquire the necessary build dependency.
62958  # ffi is the help tag: freetype, cups, alsa etc
62959  MISSING_DEPENDENCY=ffi
62960
62961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62962    cygwin_help $MISSING_DEPENDENCY
62963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62964    msys_help $MISSING_DEPENDENCY
62965  else
62966    PKGHANDLER_COMMAND=
62967
62968    case $PKGHANDLER in
62969      apt-get)
62970        apt_help     $MISSING_DEPENDENCY ;;
62971      yum)
62972        yum_help     $MISSING_DEPENDENCY ;;
62973      port)
62974        port_help    $MISSING_DEPENDENCY ;;
62975      pkgutil)
62976        pkgutil_help $MISSING_DEPENDENCY ;;
62977      pkgadd)
62978        pkgadd_help  $MISSING_DEPENDENCY ;;
62979    esac
62980
62981    if test "x$PKGHANDLER_COMMAND" != x; then
62982      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62983    fi
62984  fi
62985
62986      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62987    fi
62988  fi
62989
62990
62991
62992
62993
62994  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62995    # Extract the first word of "llvm-config", so it can be a program name with args.
62996set dummy llvm-config; ac_word=$2
62997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62998$as_echo_n "checking for $ac_word... " >&6; }
62999if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63000  $as_echo_n "(cached) " >&6
63001else
63002  if test -n "$LLVM_CONFIG"; then
63003  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63004else
63005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63006for as_dir in $PATH
63007do
63008  IFS=$as_save_IFS
63009  test -z "$as_dir" && as_dir=.
63010    for ac_exec_ext in '' $ac_executable_extensions; do
63011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63012    ac_cv_prog_LLVM_CONFIG="llvm-config"
63013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63014    break 2
63015  fi
63016done
63017  done
63018IFS=$as_save_IFS
63019
63020fi
63021fi
63022LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63023if test -n "$LLVM_CONFIG"; then
63024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63025$as_echo "$LLVM_CONFIG" >&6; }
63026else
63027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63028$as_echo "no" >&6; }
63029fi
63030
63031
63032
63033    if test "x$LLVM_CONFIG" != xllvm-config; then
63034      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63035    fi
63036
63037    llvm_components="jit mcjit engine nativecodegen native"
63038    unset LLVM_CFLAGS
63039    for flag in $("$LLVM_CONFIG" --cxxflags); do
63040      if echo "${flag}" | grep -q '^-[ID]'; then
63041        if test "${flag}" != "-D_DEBUG" ; then
63042          if test "${LLVM_CFLAGS}" != "" ; then
63043            LLVM_CFLAGS="${LLVM_CFLAGS} "
63044          fi
63045          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63046        fi
63047      fi
63048    done
63049    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
63050    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63051
63052    unset LLVM_LDFLAGS
63053    for flag in $("${LLVM_CONFIG}" --ldflags); do
63054      if echo "${flag}" | grep -q '^-L'; then
63055        if test "${LLVM_LDFLAGS}" != ""; then
63056          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63057        fi
63058        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63059      fi
63060    done
63061
63062    unset LLVM_LIBS
63063    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63064      if echo "${flag}" | grep -q '^-l'; then
63065        if test "${LLVM_LIBS}" != ""; then
63066          LLVM_LIBS="${LLVM_LIBS} "
63067        fi
63068        LLVM_LIBS="${LLVM_LIBS}${flag}"
63069      fi
63070    done
63071
63072    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63073    # always properly detect -ltinfo
63074    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63075
63076
63077
63078
63079  fi
63080
63081
63082
63083# Check whether --with-libjpeg was given.
63084if test "${with_libjpeg+set}" = set; then :
63085  withval=$with_libjpeg;
63086fi
63087
63088
63089  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63090$as_echo_n "checking for which libjpeg to use... " >&6; }
63091  # default is bundled
63092  DEFAULT_LIBJPEG=bundled
63093  # if user didn't specify, use DEFAULT_LIBJPEG
63094  if test "x${with_libjpeg}" = "x"; then
63095    with_libjpeg=${DEFAULT_LIBJPEG}
63096  fi
63097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63098$as_echo "${with_libjpeg}" >&6; }
63099
63100  if test "x${with_libjpeg}" = "xbundled"; then
63101    USE_EXTERNAL_LIBJPEG=false
63102  elif test "x${with_libjpeg}" = "xsystem"; then
63103    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63104if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63105
63106else
63107   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63108fi
63109
63110
63111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63112$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63113if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63114  $as_echo_n "(cached) " >&6
63115else
63116  ac_check_lib_save_LIBS=$LIBS
63117LIBS="-ljpeg  $LIBS"
63118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63119/* end confdefs.h.  */
63120
63121/* Override any GCC internal prototype to avoid an error.
63122   Use char because int might match the return type of a GCC
63123   builtin and then its argument prototype would still apply.  */
63124#ifdef __cplusplus
63125extern "C"
63126#endif
63127char jpeg_CreateDecompress ();
63128int
63129main ()
63130{
63131return jpeg_CreateDecompress ();
63132  ;
63133  return 0;
63134}
63135_ACEOF
63136if ac_fn_cxx_try_link "$LINENO"; then :
63137  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63138else
63139  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63140fi
63141rm -f core conftest.err conftest.$ac_objext \
63142    conftest$ac_exeext conftest.$ac_ext
63143LIBS=$ac_check_lib_save_LIBS
63144fi
63145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63146$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63147if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63148  cat >>confdefs.h <<_ACEOF
63149#define HAVE_LIBJPEG 1
63150_ACEOF
63151
63152  LIBS="-ljpeg $LIBS"
63153
63154else
63155   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63156fi
63157
63158
63159    USE_EXTERNAL_LIBJPEG=true
63160  else
63161    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63162  fi
63163
63164
63165
63166
63167
63168# Check whether --with-giflib was given.
63169if test "${with_giflib+set}" = set; then :
63170  withval=$with_giflib;
63171fi
63172
63173
63174  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63175$as_echo_n "checking for which giflib to use... " >&6; }
63176  # default is bundled
63177  DEFAULT_GIFLIB=bundled
63178  # if user didn't specify, use DEFAULT_GIFLIB
63179  if test "x${with_giflib}" = "x"; then
63180    with_giflib=${DEFAULT_GIFLIB}
63181  fi
63182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63183$as_echo "${with_giflib}" >&6; }
63184
63185  if test "x${with_giflib}" = "xbundled"; then
63186    USE_EXTERNAL_LIBGIF=false
63187  elif test "x${with_giflib}" = "xsystem"; then
63188    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63189if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63190
63191else
63192   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63193fi
63194
63195
63196    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63197$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63198if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63199  $as_echo_n "(cached) " >&6
63200else
63201  ac_check_lib_save_LIBS=$LIBS
63202LIBS="-lgif  $LIBS"
63203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63204/* end confdefs.h.  */
63205
63206/* Override any GCC internal prototype to avoid an error.
63207   Use char because int might match the return type of a GCC
63208   builtin and then its argument prototype would still apply.  */
63209#ifdef __cplusplus
63210extern "C"
63211#endif
63212char DGifGetCode ();
63213int
63214main ()
63215{
63216return DGifGetCode ();
63217  ;
63218  return 0;
63219}
63220_ACEOF
63221if ac_fn_cxx_try_link "$LINENO"; then :
63222  ac_cv_lib_gif_DGifGetCode=yes
63223else
63224  ac_cv_lib_gif_DGifGetCode=no
63225fi
63226rm -f core conftest.err conftest.$ac_objext \
63227    conftest$ac_exeext conftest.$ac_ext
63228LIBS=$ac_check_lib_save_LIBS
63229fi
63230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63231$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63232if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63233  cat >>confdefs.h <<_ACEOF
63234#define HAVE_LIBGIF 1
63235_ACEOF
63236
63237  LIBS="-lgif $LIBS"
63238
63239else
63240   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63241fi
63242
63243
63244    USE_EXTERNAL_LIBGIF=true
63245  else
63246    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63247  fi
63248
63249
63250
63251
63252
63253# Check whether --with-libpng was given.
63254if test "${with_libpng+set}" = set; then :
63255  withval=$with_libpng;
63256fi
63257
63258
63259  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63260$as_echo_n "checking for which libpng to use... " >&6; }
63261
63262  # default is bundled
63263  DEFAULT_LIBPNG=bundled
63264  # if user didn't specify, use DEFAULT_LIBPNG
63265  if test "x${with_libpng}" = "x"; then
63266      with_libpng=${DEFAULT_LIBPNG}
63267  fi
63268
63269  if test "x${with_libpng}" = "xbundled"; then
63270      USE_EXTERNAL_LIBPNG=false
63271      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63272$as_echo "bundled" >&6; }
63273  elif test "x${with_libpng}" = "xsystem"; then
63274
63275pkg_failed=no
63276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63277$as_echo_n "checking for PNG... " >&6; }
63278
63279if test -n "$PNG_CFLAGS"; then
63280    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63281 elif test -n "$PKG_CONFIG"; then
63282    if test -n "$PKG_CONFIG" && \
63283    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63284  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63285  ac_status=$?
63286  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63287  test $ac_status = 0; }; then
63288  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63289else
63290  pkg_failed=yes
63291fi
63292 else
63293    pkg_failed=untried
63294fi
63295if test -n "$PNG_LIBS"; then
63296    pkg_cv_PNG_LIBS="$PNG_LIBS"
63297 elif test -n "$PKG_CONFIG"; then
63298    if test -n "$PKG_CONFIG" && \
63299    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63300  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63301  ac_status=$?
63302  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63303  test $ac_status = 0; }; then
63304  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63305else
63306  pkg_failed=yes
63307fi
63308 else
63309    pkg_failed=untried
63310fi
63311
63312
63313
63314if test $pkg_failed = yes; then
63315
63316if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63317        _pkg_short_errors_supported=yes
63318else
63319        _pkg_short_errors_supported=no
63320fi
63321        if test $_pkg_short_errors_supported = yes; then
63322	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63323        else
63324	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63325        fi
63326	# Put the nasty error message in config.log where it belongs
63327	echo "$PNG_PKG_ERRORS" >&5
63328
63329	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63330$as_echo "no" >&6; }
63331                 LIBPNG_FOUND=no
63332elif test $pkg_failed = untried; then
63333	 LIBPNG_FOUND=no
63334else
63335	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63336	PNG_LIBS=$pkg_cv_PNG_LIBS
63337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63338$as_echo "yes" >&6; }
63339	 LIBPNG_FOUND=yes
63340fi
63341      if test "x${LIBPNG_FOUND}" = "xyes"; then
63342          USE_EXTERNAL_LIBPNG=true
63343          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63344$as_echo "system" >&6; }
63345      else
63346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63347$as_echo "system not found" >&6; }
63348          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63349      fi
63350  else
63351      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63352  fi
63353
63354
63355
63356
63357
63358# Check whether --with-zlib was given.
63359if test "${with_zlib+set}" = set; then :
63360  withval=$with_zlib;
63361fi
63362
63363
63364  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63365$as_echo_n "checking for compress in -lz... " >&6; }
63366if ${ac_cv_lib_z_compress+:} false; then :
63367  $as_echo_n "(cached) " >&6
63368else
63369  ac_check_lib_save_LIBS=$LIBS
63370LIBS="-lz  $LIBS"
63371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63372/* end confdefs.h.  */
63373
63374/* Override any GCC internal prototype to avoid an error.
63375   Use char because int might match the return type of a GCC
63376   builtin and then its argument prototype would still apply.  */
63377#ifdef __cplusplus
63378extern "C"
63379#endif
63380char compress ();
63381int
63382main ()
63383{
63384return compress ();
63385  ;
63386  return 0;
63387}
63388_ACEOF
63389if ac_fn_cxx_try_link "$LINENO"; then :
63390  ac_cv_lib_z_compress=yes
63391else
63392  ac_cv_lib_z_compress=no
63393fi
63394rm -f core conftest.err conftest.$ac_objext \
63395    conftest$ac_exeext conftest.$ac_ext
63396LIBS=$ac_check_lib_save_LIBS
63397fi
63398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63399$as_echo "$ac_cv_lib_z_compress" >&6; }
63400if test "x$ac_cv_lib_z_compress" = xyes; then :
63401   ZLIB_FOUND=yes
63402else
63403   ZLIB_FOUND=no
63404fi
63405
63406
63407  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63408$as_echo_n "checking for which zlib to use... " >&6; }
63409
63410  DEFAULT_ZLIB=system
63411  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63412    # On windows default is bundled...on others default is system
63413    DEFAULT_ZLIB=bundled
63414  fi
63415
63416  if test "x${ZLIB_FOUND}" != "xyes"; then
63417    # If we don't find any system...set default to bundled
63418    DEFAULT_ZLIB=bundled
63419  fi
63420
63421  # If user didn't specify, use DEFAULT_ZLIB
63422  if test "x${with_zlib}" = "x"; then
63423    with_zlib=${DEFAULT_ZLIB}
63424  fi
63425
63426  if test "x${with_zlib}" = "xbundled"; then
63427    USE_EXTERNAL_LIBZ=false
63428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63429$as_echo "bundled" >&6; }
63430  elif test "x${with_zlib}" = "xsystem"; then
63431    if test "x${ZLIB_FOUND}" = "xyes"; then
63432      USE_EXTERNAL_LIBZ=true
63433      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63434$as_echo "system" >&6; }
63435    else
63436      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63437$as_echo "system not found" >&6; }
63438      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63439    fi
63440  else
63441    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63442  fi
63443
63444
63445
63446
63447
63448# Check whether --with-lcms was given.
63449if test "${with_lcms+set}" = set; then :
63450  withval=$with_lcms;
63451fi
63452
63453
63454  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63455$as_echo_n "checking for which lcms to use... " >&6; }
63456
63457  DEFAULT_LCMS=bundled
63458  # If user didn't specify, use DEFAULT_LCMS
63459  if test "x${with_lcms}" = "x"; then
63460      with_lcms=${DEFAULT_LCMS}
63461  fi
63462
63463  if test "x${with_lcms}" = "xbundled"; then
63464    USE_EXTERNAL_LCMS=false
63465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63466$as_echo "bundled" >&6; }
63467  elif test "x${with_lcms}" = "xsystem"; then
63468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63469$as_echo "system" >&6; }
63470
63471pkg_failed=no
63472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63473$as_echo_n "checking for LCMS... " >&6; }
63474
63475if test -n "$LCMS_CFLAGS"; then
63476    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63477 elif test -n "$PKG_CONFIG"; then
63478    if test -n "$PKG_CONFIG" && \
63479    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63480  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63481  ac_status=$?
63482  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63483  test $ac_status = 0; }; then
63484  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63485else
63486  pkg_failed=yes
63487fi
63488 else
63489    pkg_failed=untried
63490fi
63491if test -n "$LCMS_LIBS"; then
63492    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63493 elif test -n "$PKG_CONFIG"; then
63494    if test -n "$PKG_CONFIG" && \
63495    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63496  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63497  ac_status=$?
63498  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63499  test $ac_status = 0; }; then
63500  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63501else
63502  pkg_failed=yes
63503fi
63504 else
63505    pkg_failed=untried
63506fi
63507
63508
63509
63510if test $pkg_failed = yes; then
63511
63512if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63513        _pkg_short_errors_supported=yes
63514else
63515        _pkg_short_errors_supported=no
63516fi
63517        if test $_pkg_short_errors_supported = yes; then
63518	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63519        else
63520	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63521        fi
63522	# Put the nasty error message in config.log where it belongs
63523	echo "$LCMS_PKG_ERRORS" >&5
63524
63525	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63526$as_echo "no" >&6; }
63527                LCMS_FOUND=no
63528elif test $pkg_failed = untried; then
63529	LCMS_FOUND=no
63530else
63531	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63532	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63533        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63534$as_echo "yes" >&6; }
63535	LCMS_FOUND=yes
63536fi
63537    if test "x${LCMS_FOUND}" = "xyes"; then
63538      USE_EXTERNAL_LCMS=true
63539    else
63540      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63541    fi
63542  else
63543    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63544  fi
63545
63546
63547
63548
63549
63550
63551
63552
63553
63554
63555
63556  # Setup libm (the maths library)
63557  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63559$as_echo_n "checking for cos in -lm... " >&6; }
63560if ${ac_cv_lib_m_cos+:} false; then :
63561  $as_echo_n "(cached) " >&6
63562else
63563  ac_check_lib_save_LIBS=$LIBS
63564LIBS="-lm  $LIBS"
63565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63566/* end confdefs.h.  */
63567
63568/* Override any GCC internal prototype to avoid an error.
63569   Use char because int might match the return type of a GCC
63570   builtin and then its argument prototype would still apply.  */
63571#ifdef __cplusplus
63572extern "C"
63573#endif
63574char cos ();
63575int
63576main ()
63577{
63578return cos ();
63579  ;
63580  return 0;
63581}
63582_ACEOF
63583if ac_fn_cxx_try_link "$LINENO"; then :
63584  ac_cv_lib_m_cos=yes
63585else
63586  ac_cv_lib_m_cos=no
63587fi
63588rm -f core conftest.err conftest.$ac_objext \
63589    conftest$ac_exeext conftest.$ac_ext
63590LIBS=$ac_check_lib_save_LIBS
63591fi
63592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63593$as_echo "$ac_cv_lib_m_cos" >&6; }
63594if test "x$ac_cv_lib_m_cos" = xyes; then :
63595  cat >>confdefs.h <<_ACEOF
63596#define HAVE_LIBM 1
63597_ACEOF
63598
63599  LIBS="-lm $LIBS"
63600
63601else
63602
63603        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63604$as_echo "$as_me: Maths library was not found" >&6;}
63605
63606fi
63607
63608    LIBM="-lm"
63609  else
63610    LIBM=""
63611  fi
63612
63613
63614  # Setup libdl (for dynamic library loading)
63615  save_LIBS="$LIBS"
63616  LIBS=""
63617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63618$as_echo_n "checking for dlopen in -ldl... " >&6; }
63619if ${ac_cv_lib_dl_dlopen+:} false; then :
63620  $as_echo_n "(cached) " >&6
63621else
63622  ac_check_lib_save_LIBS=$LIBS
63623LIBS="-ldl  $LIBS"
63624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63625/* end confdefs.h.  */
63626
63627/* Override any GCC internal prototype to avoid an error.
63628   Use char because int might match the return type of a GCC
63629   builtin and then its argument prototype would still apply.  */
63630#ifdef __cplusplus
63631extern "C"
63632#endif
63633char dlopen ();
63634int
63635main ()
63636{
63637return dlopen ();
63638  ;
63639  return 0;
63640}
63641_ACEOF
63642if ac_fn_cxx_try_link "$LINENO"; then :
63643  ac_cv_lib_dl_dlopen=yes
63644else
63645  ac_cv_lib_dl_dlopen=no
63646fi
63647rm -f core conftest.err conftest.$ac_objext \
63648    conftest$ac_exeext conftest.$ac_ext
63649LIBS=$ac_check_lib_save_LIBS
63650fi
63651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63652$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63653if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63654  cat >>confdefs.h <<_ACEOF
63655#define HAVE_LIBDL 1
63656_ACEOF
63657
63658  LIBS="-ldl $LIBS"
63659
63660fi
63661
63662  LIBDL="$LIBS"
63663
63664  LIBS="$save_LIBS"
63665
63666  # Deprecated libraries, keep the flags for backwards compatibility
63667  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63668
63669
63670# Check whether --with-dxsdk was given.
63671if test "${with_dxsdk+set}" = set; then :
63672  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63673$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63674fi
63675
63676
63677
63678
63679# Check whether --with-dxsdk-lib was given.
63680if test "${with_dxsdk_lib+set}" = set; then :
63681  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63682$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63683fi
63684
63685
63686
63687
63688# Check whether --with-dxsdk-include was given.
63689if test "${with_dxsdk_include+set}" = set; then :
63690  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63691$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63692fi
63693
63694
63695  fi
63696
63697  # Control if libzip can use mmap. Available for purposes of overriding.
63698  LIBZIP_CAN_USE_MMAP=true
63699
63700
63701
63702
63703
63704
63705
63706
63707
63708
63709
63710
63711
63712
63713###############################################################################
63714#
63715# We need to do some final tweaking, when everything else is done.
63716#
63717###############################################################################
63718
63719
63720  # Check whether --enable-new-hotspot-build was given.
63721if test "${enable_new_hotspot_build+set}" = set; then :
63722  enableval=$enable_new_hotspot_build;
63723fi
63724
63725
63726   if test "x$enable_new_hotspot_build" = "x" || test "x$enable_new_hotspot_build" = "xyes"; then
63727     USE_NEW_HOTSPOT_BUILD=true
63728   else
63729     USE_NEW_HOTSPOT_BUILD=false
63730   fi
63731
63732
63733  case $HOTSPOT_DEBUG_LEVEL in
63734    product )
63735      VARIANT="OPT"
63736      FASTDEBUG="false"
63737      DEBUG_CLASSFILES="false"
63738      ;;
63739    fastdebug )
63740      VARIANT="DBG"
63741      FASTDEBUG="true"
63742      DEBUG_CLASSFILES="true"
63743      ;;
63744    debug )
63745      VARIANT="DBG"
63746      FASTDEBUG="false"
63747      DEBUG_CLASSFILES="true"
63748      ;;
63749    optimized )
63750      VARIANT="OPT"
63751      FASTDEBUG="false"
63752      DEBUG_CLASSFILES="false"
63753      ;;
63754  esac
63755
63756
63757
63758
63759  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
63760    MACOSX_UNIVERSAL="true"
63761  fi
63762
63763
63764
63765  # Make sure JVM_VARIANTS_COMMA use minimal1 for backwards compatibility
63766  JVM_VARIANTS_COMMA=`$ECHO ,$JVM_VARIANTS_OPT, | $SED -e 's/,minimal,/,minimal1,/'`
63767
63768  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
63769  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
63770  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,minimal1\?,/!s/.*/false/g' -e '/,minimal1\?,/s/.*/true/g'`
63771  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
63772  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
63773  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
63774  JVM_VARIANT_CUSTOM=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,custom,/!s/.*/false/g' -e '/,custom,/s/.*/true/g'`
63775
63776  #####
63777  # Generate the legacy makefile targets for hotspot.
63778  HOTSPOT_TARGET=""
63779
63780  if test "x$JVM_VARIANT_SERVER" = xtrue; then
63781    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
63782  fi
63783
63784  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
63785    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
63786  fi
63787
63788  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
63789    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
63790  fi
63791
63792  if test "x$JVM_VARIANT_ZERO" = xtrue; then
63793    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
63794  fi
63795
63796  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
63797    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
63798  fi
63799
63800  if test "x$JVM_VARIANT_CORE" = xtrue; then
63801    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
63802  fi
63803
63804  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_DEBUG_LEVEL"
63805
63806  # On Macosx universal binaries are produced, but they only contain
63807  # 64 bit intel. This invalidates control of which jvms are built
63808  # from configure, but only server is valid anyway. Fix this
63809  # when hotspot makefiles are rewritten.
63810  if test "x$MACOSX_UNIVERSAL" = xtrue; then
63811    HOTSPOT_TARGET=universal_${HOTSPOT_DEBUG_LEVEL}
63812  fi
63813
63814  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
63815
63816
63817  # Control wether Hotspot runs Queens test after build.
63818  # Check whether --enable-hotspot-test-in-build was given.
63819if test "${enable_hotspot_test_in_build+set}" = set; then :
63820  enableval=$enable_hotspot_test_in_build;
63821else
63822  enable_hotspot_test_in_build=no
63823fi
63824
63825  if test "x$enable_hotspot_test_in_build" = "xyes"; then
63826    TEST_IN_BUILD=true
63827  else
63828    TEST_IN_BUILD=false
63829  fi
63830
63831
63832  if test "x$USE_NEW_HOTSPOT_BUILD" = xfalse; then
63833    if test "x$JVM_VARIANT_CLIENT" = xtrue; then
63834      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
63835        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
63836      fi
63837    fi
63838    if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
63839      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
63840        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
63841      fi
63842    fi
63843    if test "x$JVM_VARIANT_CUSTOM" = xtrue; then
63844        as_fn_error $? "You cannot build a custom JVM using the old hotspot build system." "$LINENO" 5
63845    fi
63846  fi
63847
63848
63849
63850
63851
63852
63853
63854
63855
63856
63857
63858  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63859$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63860
63861  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63862    ENABLE_INTREE_EC=yes
63863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63864$as_echo "yes" >&6; }
63865  else
63866    ENABLE_INTREE_EC=no
63867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63868$as_echo "no" >&6; }
63869  fi
63870
63871
63872
63873
63874###############################################################################
63875#
63876# Configure parts of the build that only affect the build performance,
63877# not the result.
63878#
63879###############################################################################
63880
63881
63882  # How many cores do we have on this build system?
63883
63884# Check whether --with-num-cores was given.
63885if test "${with_num_cores+set}" = set; then :
63886  withval=$with_num_cores;
63887fi
63888
63889  if test "x$with_num_cores" = x; then
63890    # The number of cores were not specified, try to probe them.
63891
63892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63893$as_echo_n "checking for number of cores... " >&6; }
63894  NUM_CORES=1
63895  FOUND_CORES=no
63896
63897  if test -f /proc/cpuinfo; then
63898    # Looks like a Linux (or cygwin) system
63899    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63900    FOUND_CORES=yes
63901  elif test -x /usr/sbin/psrinfo; then
63902    # Looks like a Solaris system
63903    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63904    FOUND_CORES=yes
63905  elif test -x /usr/sbin/sysctl; then
63906    # Looks like a MacOSX system
63907    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63908    FOUND_CORES=yes
63909  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63910    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63911    FOUND_CORES=yes
63912  elif test -n "$NUMBER_OF_PROCESSORS"; then
63913    # On windows, look in the env
63914    NUM_CORES=$NUMBER_OF_PROCESSORS
63915    FOUND_CORES=yes
63916  fi
63917
63918  if test "x$FOUND_CORES" = xyes; then
63919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63920$as_echo "$NUM_CORES" >&6; }
63921  else
63922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63923$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63924    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63925$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63926  fi
63927
63928  else
63929    NUM_CORES=$with_num_cores
63930  fi
63931
63932
63933
63934  # How much memory do we have on this build system?
63935
63936# Check whether --with-memory-size was given.
63937if test "${with_memory_size+set}" = set; then :
63938  withval=$with_memory_size;
63939fi
63940
63941  if test "x$with_memory_size" = x; then
63942    # The memory size was not specified, try to probe it.
63943
63944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
63945$as_echo_n "checking for memory size... " >&6; }
63946  # Default to 1024 MB
63947  MEMORY_SIZE=1024
63948  FOUND_MEM=no
63949
63950  if test -f /proc/meminfo; then
63951    # Looks like a Linux (or cygwin) system
63952    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
63953    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
63954    FOUND_MEM=yes
63955  elif test -x /usr/sbin/prtconf; then
63956    # Looks like a Solaris or AIX system
63957    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
63958    FOUND_MEM=yes
63959  elif test -x /usr/sbin/sysctl; then
63960    # Looks like a MacOSX system
63961    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
63962    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63963    FOUND_MEM=yes
63964  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
63965    # Windows, but without cygwin
63966    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
63967    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63968    FOUND_MEM=yes
63969  fi
63970
63971  if test "x$FOUND_MEM" = xyes; then
63972    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
63973$as_echo "$MEMORY_SIZE MB" >&6; }
63974  else
63975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
63976$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
63977    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
63978$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
63979  fi
63980
63981  else
63982    MEMORY_SIZE=$with_memory_size
63983  fi
63984
63985
63986
63987  # Provide a decent default number of parallel jobs for make depending on
63988  # number of cores, amount of memory and machine architecture.
63989
63990# Check whether --with-jobs was given.
63991if test "${with_jobs+set}" = set; then :
63992  withval=$with_jobs;
63993fi
63994
63995  if test "x$with_jobs" = x; then
63996    # Number of jobs was not specified, calculate.
63997    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
63998$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
63999    # Approximate memory in GB.
64000    memory_gb=`expr $MEMORY_SIZE / 1024`
64001    # Pick the lowest of memory in gb and number of cores.
64002    if test "$memory_gb" -lt "$NUM_CORES"; then
64003      JOBS="$memory_gb"
64004    else
64005      JOBS="$NUM_CORES"
64006    fi
64007    if test "$JOBS" -eq "0"; then
64008      JOBS=1
64009    fi
64010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64011$as_echo "$JOBS" >&6; }
64012  else
64013    JOBS=$with_jobs
64014  fi
64015
64016
64017
64018  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64019
64020# Check whether --with-test-jobs was given.
64021if test "${with_test_jobs+set}" = set; then :
64022  withval=$with_test_jobs;
64023fi
64024
64025  if test "x$with_test_jobs" = x; then
64026      TEST_JOBS=0
64027  else
64028      TEST_JOBS=$with_test_jobs
64029  fi
64030
64031
64032
64033# Setup arguments for the boot jdk (after cores and memory have been setup)
64034
64035  ##############################################################################
64036  #
64037  # Specify jvm options for anything that is run with the Boot JDK.
64038  # Not all JVM:s accept the same arguments on the command line.
64039  #
64040
64041# Check whether --with-boot-jdk-jvmargs was given.
64042if test "${with_boot_jdk_jvmargs+set}" = set; then :
64043  withval=$with_boot_jdk_jvmargs;
64044fi
64045
64046
64047  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64048$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64049
64050  # Disable special log output when a debug build is used as Boot JDK...
64051
64052  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64053  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64054  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64055  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64056  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64057  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64058    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64059    JVM_ARG_OK=true
64060  else
64061    $ECHO "Arg failed:" >&5
64062    $ECHO "$OUTPUT" >&5
64063    JVM_ARG_OK=false
64064  fi
64065
64066
64067  # Apply user provided options.
64068
64069  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64070  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64071  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64072  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64073  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64074  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64075    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64076    JVM_ARG_OK=true
64077  else
64078    $ECHO "Arg failed:" >&5
64079    $ECHO "$OUTPUT" >&5
64080    JVM_ARG_OK=false
64081  fi
64082
64083
64084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64085$as_echo "$boot_jdk_jvmargs" >&6; }
64086
64087  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64088  JAVA_FLAGS=$boot_jdk_jvmargs
64089
64090
64091
64092  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64093$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64094
64095  # Starting amount of heap memory.
64096
64097  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64098  $ECHO "Command: $JAVA -Xms64M -version" >&5
64099  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64100  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64101  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64102  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64103    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64104    JVM_ARG_OK=true
64105  else
64106    $ECHO "Arg failed:" >&5
64107    $ECHO "$OUTPUT" >&5
64108    JVM_ARG_OK=false
64109  fi
64110
64111
64112  # Maximum amount of heap memory.
64113  # Maximum stack size.
64114  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
64115  if test "x$BOOT_JDK_BITS" = "x32"; then
64116    if test "$JVM_MAX_HEAP" -gt "1100"; then
64117      JVM_MAX_HEAP=1100
64118    elif test "$JVM_MAX_HEAP" -lt "512"; then
64119      JVM_MAX_HEAP=512
64120    fi
64121    STACK_SIZE=768
64122  else
64123    # Running a 64 bit JVM allows for and requires a bigger heap
64124    if test "$JVM_MAX_HEAP" -gt "1600"; then
64125      JVM_MAX_HEAP=1600
64126    elif test "$JVM_MAX_HEAP" -lt "512"; then
64127      JVM_MAX_HEAP=512
64128    fi
64129    STACK_SIZE=1536
64130  fi
64131
64132  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64133  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64134  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64135  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64136  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64137  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64138    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64139    JVM_ARG_OK=true
64140  else
64141    $ECHO "Arg failed:" >&5
64142    $ECHO "$OUTPUT" >&5
64143    JVM_ARG_OK=false
64144  fi
64145
64146
64147  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64148  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64149  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64150  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64151  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64152  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64153    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64154    JVM_ARG_OK=true
64155  else
64156    $ECHO "Arg failed:" >&5
64157    $ECHO "$OUTPUT" >&5
64158    JVM_ARG_OK=false
64159  fi
64160
64161
64162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64163$as_echo "$boot_jdk_jvmargs_big" >&6; }
64164
64165  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64166
64167
64168  # By default, the main javac compilations use big
64169  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64170
64171
64172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64173$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64174
64175  # Use serial gc for small short lived tools if possible
64176
64177  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64178  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64179  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64180  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64181  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64182  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64183    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64184    JVM_ARG_OK=true
64185  else
64186    $ECHO "Arg failed:" >&5
64187    $ECHO "$OUTPUT" >&5
64188    JVM_ARG_OK=false
64189  fi
64190
64191
64192  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64193  $ECHO "Command: $JAVA -Xms32M -version" >&5
64194  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64195  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64196  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64197  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64198    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64199    JVM_ARG_OK=true
64200  else
64201    $ECHO "Arg failed:" >&5
64202    $ECHO "$OUTPUT" >&5
64203    JVM_ARG_OK=false
64204  fi
64205
64206
64207  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64208  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64209  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64210  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64211  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64212  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64213    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64214    JVM_ARG_OK=true
64215  else
64216    $ECHO "Arg failed:" >&5
64217    $ECHO "$OUTPUT" >&5
64218    JVM_ARG_OK=false
64219  fi
64220
64221
64222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64223$as_echo "$boot_jdk_jvmargs_small" >&6; }
64224
64225  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64226
64227
64228  JAVA_TOOL_FLAGS_SMALL=""
64229  for f in $JAVA_FLAGS_SMALL; do
64230    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64231  done
64232
64233
64234
64235# Setup smart javac (after cores and memory have been setup)
64236
64237
64238# Check whether --with-sjavac-server-java was given.
64239if test "${with_sjavac_server_java+set}" = set; then :
64240  withval=$with_sjavac_server_java;
64241fi
64242
64243
64244  if test "x$with_sjavac_server_java" != x; then
64245    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64246    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64247    if test "x$FOUND_VERSION" = x; then
64248      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64249    fi
64250  else
64251    SJAVAC_SERVER_JAVA="$JAVA"
64252  fi
64253
64254
64255  if test "$MEMORY_SIZE" -gt "3000"; then
64256
64257  $ECHO "Check if jvm arg is ok: -d64" >&5
64258  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64259  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64260  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64261  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64262  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64263    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64264    JVM_ARG_OK=true
64265  else
64266    $ECHO "Arg failed:" >&5
64267    $ECHO "$OUTPUT" >&5
64268    JVM_ARG_OK=false
64269  fi
64270
64271    if test "$JVM_ARG_OK" = true; then
64272      JVM_64BIT=true
64273      JVM_ARG_OK=false
64274    fi
64275  fi
64276
64277  MX_VALUE=`expr $MEMORY_SIZE / 2`
64278  if test "$JVM_64BIT" = true; then
64279    # Set ms lower than mx since more than one instance of the server might
64280    # get launched at the same time before they figure out which instance won.
64281    MS_VALUE=512
64282    if test "$MX_VALUE" -gt "2048"; then
64283      MX_VALUE=2048
64284    fi
64285  else
64286    MS_VALUE=256
64287    if test "$MX_VALUE" -gt "1500"; then
64288      MX_VALUE=1500
64289    fi
64290  fi
64291  if test "$MX_VALUE" -lt "512"; then
64292    MX_VALUE=512
64293  fi
64294
64295  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64296  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64297  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64298  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64299  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64300  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64301    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64302    JVM_ARG_OK=true
64303  else
64304    $ECHO "Arg failed:" >&5
64305    $ECHO "$OUTPUT" >&5
64306    JVM_ARG_OK=false
64307  fi
64308
64309
64310
64311  # Check whether --enable-sjavac was given.
64312if test "${enable_sjavac+set}" = set; then :
64313  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64314else
64315  ENABLE_SJAVAC="no"
64316fi
64317
64318  if test "x$JVM_ARG_OK" = "xfalse"; then
64319    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64320$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64321    ENABLE_SJAVAC="no"
64322  fi
64323  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64324$as_echo_n "checking whether to use sjavac... " >&6; }
64325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64326$as_echo "$ENABLE_SJAVAC" >&6; }
64327
64328
64329  # Check whether --enable-javac-server was given.
64330if test "${enable_javac_server+set}" = set; then :
64331  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64332else
64333  ENABLE_JAVAC_SERVER="yes"
64334fi
64335
64336  if test "x$JVM_ARG_OK" = "xfalse"; then
64337    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64338$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64339    ENABLE_JAVAC_SERVER="no"
64340  fi
64341  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64342$as_echo_n "checking whether to use javac server... " >&6; }
64343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64344$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64345
64346
64347  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
64348    # When using a server javac, the small client instances do not need much
64349    # resources.
64350    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64351  fi
64352
64353
64354# Setup use of icecc if requested
64355
64356  # Check whether --enable-icecc was given.
64357if test "${enable_icecc+set}" = set; then :
64358  enableval=$enable_icecc;
64359fi
64360
64361
64362  if test "x${enable_icecc}" = "xyes"; then
64363
64364
64365
64366  # Publish this variable in the help.
64367
64368
64369  if [ -z "${ICECC_CMD+x}" ]; then
64370    # The variable is not set by user, try to locate tool using the code snippet
64371    for ac_prog in icecc
64372do
64373  # Extract the first word of "$ac_prog", so it can be a program name with args.
64374set dummy $ac_prog; ac_word=$2
64375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64376$as_echo_n "checking for $ac_word... " >&6; }
64377if ${ac_cv_path_ICECC_CMD+:} false; then :
64378  $as_echo_n "(cached) " >&6
64379else
64380  case $ICECC_CMD in
64381  [\\/]* | ?:[\\/]*)
64382  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64383  ;;
64384  *)
64385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64386for as_dir in $PATH
64387do
64388  IFS=$as_save_IFS
64389  test -z "$as_dir" && as_dir=.
64390    for ac_exec_ext in '' $ac_executable_extensions; do
64391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64392    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64394    break 2
64395  fi
64396done
64397  done
64398IFS=$as_save_IFS
64399
64400  ;;
64401esac
64402fi
64403ICECC_CMD=$ac_cv_path_ICECC_CMD
64404if test -n "$ICECC_CMD"; then
64405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64406$as_echo "$ICECC_CMD" >&6; }
64407else
64408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64409$as_echo "no" >&6; }
64410fi
64411
64412
64413  test -n "$ICECC_CMD" && break
64414done
64415
64416  else
64417    # The variable is set, but is it from the command line or the environment?
64418
64419    # Try to remove the string !ICECC_CMD! from our list.
64420    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64421    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64422      # If it failed, the variable was not from the command line. Ignore it,
64423      # but warn the user (except for BASH, which is always set by the calling BASH).
64424      if test "xICECC_CMD" != xBASH; then
64425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64426$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64427      fi
64428      # Try to locate tool using the code snippet
64429      for ac_prog in icecc
64430do
64431  # Extract the first word of "$ac_prog", so it can be a program name with args.
64432set dummy $ac_prog; ac_word=$2
64433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64434$as_echo_n "checking for $ac_word... " >&6; }
64435if ${ac_cv_path_ICECC_CMD+:} false; then :
64436  $as_echo_n "(cached) " >&6
64437else
64438  case $ICECC_CMD in
64439  [\\/]* | ?:[\\/]*)
64440  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64441  ;;
64442  *)
64443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64444for as_dir in $PATH
64445do
64446  IFS=$as_save_IFS
64447  test -z "$as_dir" && as_dir=.
64448    for ac_exec_ext in '' $ac_executable_extensions; do
64449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64450    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64452    break 2
64453  fi
64454done
64455  done
64456IFS=$as_save_IFS
64457
64458  ;;
64459esac
64460fi
64461ICECC_CMD=$ac_cv_path_ICECC_CMD
64462if test -n "$ICECC_CMD"; then
64463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64464$as_echo "$ICECC_CMD" >&6; }
64465else
64466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64467$as_echo "no" >&6; }
64468fi
64469
64470
64471  test -n "$ICECC_CMD" && break
64472done
64473
64474    else
64475      # If it succeeded, then it was overridden by the user. We will use it
64476      # for the tool.
64477
64478      # First remove it from the list of overridden variables, so we can test
64479      # for unknown variables in the end.
64480      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64481
64482      # Check if we try to supply an empty value
64483      if test "x$ICECC_CMD" = x; then
64484        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64485$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64486        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64487$as_echo_n "checking for ICECC_CMD... " >&6; }
64488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64489$as_echo "disabled" >&6; }
64490      else
64491        # Check if the provided tool contains a complete path.
64492        tool_specified="$ICECC_CMD"
64493        tool_basename="${tool_specified##*/}"
64494        if test "x$tool_basename" = "x$tool_specified"; then
64495          # A command without a complete path is provided, search $PATH.
64496          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64497$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64498          # Extract the first word of "$tool_basename", so it can be a program name with args.
64499set dummy $tool_basename; ac_word=$2
64500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64501$as_echo_n "checking for $ac_word... " >&6; }
64502if ${ac_cv_path_ICECC_CMD+:} false; then :
64503  $as_echo_n "(cached) " >&6
64504else
64505  case $ICECC_CMD in
64506  [\\/]* | ?:[\\/]*)
64507  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64508  ;;
64509  *)
64510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64511for as_dir in $PATH
64512do
64513  IFS=$as_save_IFS
64514  test -z "$as_dir" && as_dir=.
64515    for ac_exec_ext in '' $ac_executable_extensions; do
64516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64517    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64519    break 2
64520  fi
64521done
64522  done
64523IFS=$as_save_IFS
64524
64525  ;;
64526esac
64527fi
64528ICECC_CMD=$ac_cv_path_ICECC_CMD
64529if test -n "$ICECC_CMD"; then
64530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64531$as_echo "$ICECC_CMD" >&6; }
64532else
64533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64534$as_echo "no" >&6; }
64535fi
64536
64537
64538          if test "x$ICECC_CMD" = x; then
64539            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64540          fi
64541        else
64542          # Otherwise we believe it is a complete path. Use it as it is.
64543          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64544$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64545          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64546$as_echo_n "checking for ICECC_CMD... " >&6; }
64547          if test ! -x "$tool_specified"; then
64548            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64549$as_echo "not found" >&6; }
64550            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64551          fi
64552          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64553$as_echo "$tool_specified" >&6; }
64554        fi
64555      fi
64556    fi
64557
64558  fi
64559
64560
64561
64562  if test "x$ICECC_CMD" = x; then
64563    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64564  fi
64565
64566
64567    old_path="$PATH"
64568
64569    # Look for icecc-create-env in some known places
64570    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64571
64572
64573
64574  # Publish this variable in the help.
64575
64576
64577  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64578    # The variable is not set by user, try to locate tool using the code snippet
64579    for ac_prog in icecc-create-env
64580do
64581  # Extract the first word of "$ac_prog", so it can be a program name with args.
64582set dummy $ac_prog; ac_word=$2
64583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64584$as_echo_n "checking for $ac_word... " >&6; }
64585if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64586  $as_echo_n "(cached) " >&6
64587else
64588  case $ICECC_CREATE_ENV in
64589  [\\/]* | ?:[\\/]*)
64590  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64591  ;;
64592  *)
64593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64594for as_dir in $PATH
64595do
64596  IFS=$as_save_IFS
64597  test -z "$as_dir" && as_dir=.
64598    for ac_exec_ext in '' $ac_executable_extensions; do
64599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64600    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64602    break 2
64603  fi
64604done
64605  done
64606IFS=$as_save_IFS
64607
64608  ;;
64609esac
64610fi
64611ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64612if test -n "$ICECC_CREATE_ENV"; then
64613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64614$as_echo "$ICECC_CREATE_ENV" >&6; }
64615else
64616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64617$as_echo "no" >&6; }
64618fi
64619
64620
64621  test -n "$ICECC_CREATE_ENV" && break
64622done
64623
64624  else
64625    # The variable is set, but is it from the command line or the environment?
64626
64627    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64630      # If it failed, the variable was not from the command line. Ignore it,
64631      # but warn the user (except for BASH, which is always set by the calling BASH).
64632      if test "xICECC_CREATE_ENV" != xBASH; then
64633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64634$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64635      fi
64636      # Try to locate tool using the code snippet
64637      for ac_prog in icecc-create-env
64638do
64639  # Extract the first word of "$ac_prog", so it can be a program name with args.
64640set dummy $ac_prog; ac_word=$2
64641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64642$as_echo_n "checking for $ac_word... " >&6; }
64643if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64644  $as_echo_n "(cached) " >&6
64645else
64646  case $ICECC_CREATE_ENV in
64647  [\\/]* | ?:[\\/]*)
64648  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64649  ;;
64650  *)
64651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64652for as_dir in $PATH
64653do
64654  IFS=$as_save_IFS
64655  test -z "$as_dir" && as_dir=.
64656    for ac_exec_ext in '' $ac_executable_extensions; do
64657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64658    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64660    break 2
64661  fi
64662done
64663  done
64664IFS=$as_save_IFS
64665
64666  ;;
64667esac
64668fi
64669ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64670if test -n "$ICECC_CREATE_ENV"; then
64671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64672$as_echo "$ICECC_CREATE_ENV" >&6; }
64673else
64674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64675$as_echo "no" >&6; }
64676fi
64677
64678
64679  test -n "$ICECC_CREATE_ENV" && break
64680done
64681
64682    else
64683      # If it succeeded, then it was overridden by the user. We will use it
64684      # for the tool.
64685
64686      # First remove it from the list of overridden variables, so we can test
64687      # for unknown variables in the end.
64688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64689
64690      # Check if we try to supply an empty value
64691      if test "x$ICECC_CREATE_ENV" = x; then
64692        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64693$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64695$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64697$as_echo "disabled" >&6; }
64698      else
64699        # Check if the provided tool contains a complete path.
64700        tool_specified="$ICECC_CREATE_ENV"
64701        tool_basename="${tool_specified##*/}"
64702        if test "x$tool_basename" = "x$tool_specified"; then
64703          # A command without a complete path is provided, search $PATH.
64704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64705$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64706          # Extract the first word of "$tool_basename", so it can be a program name with args.
64707set dummy $tool_basename; ac_word=$2
64708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64709$as_echo_n "checking for $ac_word... " >&6; }
64710if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64711  $as_echo_n "(cached) " >&6
64712else
64713  case $ICECC_CREATE_ENV in
64714  [\\/]* | ?:[\\/]*)
64715  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64716  ;;
64717  *)
64718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64719for as_dir in $PATH
64720do
64721  IFS=$as_save_IFS
64722  test -z "$as_dir" && as_dir=.
64723    for ac_exec_ext in '' $ac_executable_extensions; do
64724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64725    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64727    break 2
64728  fi
64729done
64730  done
64731IFS=$as_save_IFS
64732
64733  ;;
64734esac
64735fi
64736ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64737if test -n "$ICECC_CREATE_ENV"; then
64738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64739$as_echo "$ICECC_CREATE_ENV" >&6; }
64740else
64741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64742$as_echo "no" >&6; }
64743fi
64744
64745
64746          if test "x$ICECC_CREATE_ENV" = x; then
64747            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64748          fi
64749        else
64750          # Otherwise we believe it is a complete path. Use it as it is.
64751          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64752$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64753          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64754$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64755          if test ! -x "$tool_specified"; then
64756            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64757$as_echo "not found" >&6; }
64758            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64759          fi
64760          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64761$as_echo "$tool_specified" >&6; }
64762        fi
64763      fi
64764    fi
64765
64766  fi
64767
64768
64769
64770  if test "x$ICECC_CREATE_ENV" = x; then
64771    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64772  fi
64773
64774
64775    # Use icecc-create-env to create a minimal compilation environment that can
64776    # be sent to the other hosts in the icecream cluster.
64777    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64778    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64779    # Older versions of icecc does not have the --gcc parameter
64780    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64781      icecc_gcc_arg="--gcc"
64782    fi
64783    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64784
64785  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64786      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64787          ${icecc_create_env_log} 2>&1 )
64788  if test "$?" != "0"; then
64789    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64790$as_echo "$as_me: icecc-create-env output:" >&6;}
64791    cat \
64792          ${icecc_create_env_log}
64793    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64794  fi
64795
64796    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64797      # For clang, the icecc compilerwrapper is needed. It usually resides next
64798      # to icecc-create-env.
64799
64800
64801
64802  # Publish this variable in the help.
64803
64804
64805  if [ -z "${ICECC_WRAPPER+x}" ]; then
64806    # The variable is not set by user, try to locate tool using the code snippet
64807    for ac_prog in compilerwrapper
64808do
64809  # Extract the first word of "$ac_prog", so it can be a program name with args.
64810set dummy $ac_prog; ac_word=$2
64811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64812$as_echo_n "checking for $ac_word... " >&6; }
64813if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64814  $as_echo_n "(cached) " >&6
64815else
64816  case $ICECC_WRAPPER in
64817  [\\/]* | ?:[\\/]*)
64818  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64819  ;;
64820  *)
64821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64822for as_dir in $PATH
64823do
64824  IFS=$as_save_IFS
64825  test -z "$as_dir" && as_dir=.
64826    for ac_exec_ext in '' $ac_executable_extensions; do
64827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64828    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64830    break 2
64831  fi
64832done
64833  done
64834IFS=$as_save_IFS
64835
64836  ;;
64837esac
64838fi
64839ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64840if test -n "$ICECC_WRAPPER"; then
64841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64842$as_echo "$ICECC_WRAPPER" >&6; }
64843else
64844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64845$as_echo "no" >&6; }
64846fi
64847
64848
64849  test -n "$ICECC_WRAPPER" && break
64850done
64851
64852  else
64853    # The variable is set, but is it from the command line or the environment?
64854
64855    # Try to remove the string !ICECC_WRAPPER! from our list.
64856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64858      # If it failed, the variable was not from the command line. Ignore it,
64859      # but warn the user (except for BASH, which is always set by the calling BASH).
64860      if test "xICECC_WRAPPER" != xBASH; then
64861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64862$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64863      fi
64864      # Try to locate tool using the code snippet
64865      for ac_prog in compilerwrapper
64866do
64867  # Extract the first word of "$ac_prog", so it can be a program name with args.
64868set dummy $ac_prog; ac_word=$2
64869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64870$as_echo_n "checking for $ac_word... " >&6; }
64871if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64872  $as_echo_n "(cached) " >&6
64873else
64874  case $ICECC_WRAPPER in
64875  [\\/]* | ?:[\\/]*)
64876  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64877  ;;
64878  *)
64879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64880for as_dir in $PATH
64881do
64882  IFS=$as_save_IFS
64883  test -z "$as_dir" && as_dir=.
64884    for ac_exec_ext in '' $ac_executable_extensions; do
64885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64886    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64888    break 2
64889  fi
64890done
64891  done
64892IFS=$as_save_IFS
64893
64894  ;;
64895esac
64896fi
64897ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64898if test -n "$ICECC_WRAPPER"; then
64899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64900$as_echo "$ICECC_WRAPPER" >&6; }
64901else
64902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64903$as_echo "no" >&6; }
64904fi
64905
64906
64907  test -n "$ICECC_WRAPPER" && break
64908done
64909
64910    else
64911      # If it succeeded, then it was overridden by the user. We will use it
64912      # for the tool.
64913
64914      # First remove it from the list of overridden variables, so we can test
64915      # for unknown variables in the end.
64916      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64917
64918      # Check if we try to supply an empty value
64919      if test "x$ICECC_WRAPPER" = x; then
64920        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
64921$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
64922        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
64923$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
64924        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64925$as_echo "disabled" >&6; }
64926      else
64927        # Check if the provided tool contains a complete path.
64928        tool_specified="$ICECC_WRAPPER"
64929        tool_basename="${tool_specified##*/}"
64930        if test "x$tool_basename" = "x$tool_specified"; then
64931          # A command without a complete path is provided, search $PATH.
64932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
64933$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
64934          # Extract the first word of "$tool_basename", so it can be a program name with args.
64935set dummy $tool_basename; ac_word=$2
64936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64937$as_echo_n "checking for $ac_word... " >&6; }
64938if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64939  $as_echo_n "(cached) " >&6
64940else
64941  case $ICECC_WRAPPER in
64942  [\\/]* | ?:[\\/]*)
64943  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64944  ;;
64945  *)
64946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64947for as_dir in $PATH
64948do
64949  IFS=$as_save_IFS
64950  test -z "$as_dir" && as_dir=.
64951    for ac_exec_ext in '' $ac_executable_extensions; do
64952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64953    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64955    break 2
64956  fi
64957done
64958  done
64959IFS=$as_save_IFS
64960
64961  ;;
64962esac
64963fi
64964ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64965if test -n "$ICECC_WRAPPER"; then
64966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64967$as_echo "$ICECC_WRAPPER" >&6; }
64968else
64969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64970$as_echo "no" >&6; }
64971fi
64972
64973
64974          if test "x$ICECC_WRAPPER" = x; then
64975            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64976          fi
64977        else
64978          # Otherwise we believe it is a complete path. Use it as it is.
64979          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
64980$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
64981          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
64982$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
64983          if test ! -x "$tool_specified"; then
64984            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64985$as_echo "not found" >&6; }
64986            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
64987          fi
64988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64989$as_echo "$tool_specified" >&6; }
64990        fi
64991      fi
64992    fi
64993
64994  fi
64995
64996
64997
64998  if test "x$ICECC_WRAPPER" = x; then
64999    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65000  fi
65001
65002
65003
65004  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65005      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65006  if test "$?" != "0"; then
65007    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65008$as_echo "$as_me: icecc-create-env output:" >&6;}
65009    cat ${icecc_create_env_log}
65010    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65011  fi
65012
65013    else
65014      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65015    fi
65016    PATH="$old_path"
65017    # The bundle with the compiler gets a name based on checksums. Parse log file
65018    # to find it.
65019    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65020    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65021    if test ! -f ${ICECC_ENV_BUNDLE}; then
65022      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65023    fi
65024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65025$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65027$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65028    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65029
65030    if test "x${COMPILE_TYPE}" = "xcross"; then
65031      # If cross compiling, create a separate env package for the build compiler
65032      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65033      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65034      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65035
65036  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65037      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65038            ${icecc_create_env_log_build} 2>&1 )
65039  if test "$?" != "0"; then
65040    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65041$as_echo "$as_me: icecc-create-env output:" >&6;}
65042    cat \
65043            ${icecc_create_env_log_build}
65044    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65045  fi
65046
65047      elif test "x${BUILD_CC##*/}" = "xclang"; then
65048
65049  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65050      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65051  if test "$?" != "0"; then
65052    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65053$as_echo "$as_me: icecc-create-env output:" >&6;}
65054    cat ${icecc_create_env_log_build}
65055    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65056  fi
65057
65058      else
65059        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65060      fi
65061      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65062      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65063      if test ! -f ${ICECC_ENV_BUNDLE}; then
65064        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65065      fi
65066      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65067$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65069$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65070      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65071          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65072    else
65073      BUILD_ICECC="${ICECC}"
65074    fi
65075
65076
65077  fi
65078
65079
65080# Can the C/C++ compiler use precompiled headers?
65081
65082
65083  ###############################################################################
65084  #
65085  # Can the C/C++ compiler use precompiled headers?
65086  #
65087  # Check whether --enable-precompiled-headers was given.
65088if test "${enable_precompiled_headers+set}" = set; then :
65089  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65090else
65091  ENABLE_PRECOMPH=yes
65092fi
65093
65094
65095  USE_PRECOMPILED_HEADER=1
65096  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65097$as_echo_n "checking If precompiled header is enabled... " >&6; }
65098  if test "x$ENABLE_PRECOMPH" = xno; then
65099    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65100$as_echo "no, forced" >&6; }
65101    USE_PRECOMPILED_HEADER=0
65102  elif test "x$ICECC" != "x"; then
65103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65104$as_echo "no, does not work effectively with icecc" >&6; }
65105    USE_PRECOMPILED_HEADER=0
65106  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65107    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65108$as_echo "no, does not work with Solaris Studio" >&6; }
65109    USE_PRECOMPILED_HEADER=0
65110  else
65111    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65112$as_echo "yes" >&6; }
65113  fi
65114
65115  if test "x$ENABLE_PRECOMPH" = xyes; then
65116    # Check that the compiler actually supports precomp headers.
65117    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65118      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65119$as_echo_n "checking that precompiled headers work... " >&6; }
65120      echo "int alfa();" > conftest.h
65121      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65122      if test ! -f conftest.hpp.gch; then
65123        USE_PRECOMPILED_HEADER=0
65124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65125$as_echo "no" >&6; }
65126      else
65127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65128$as_echo "yes" >&6; }
65129      fi
65130      rm -f conftest.h conftest.hpp.gch
65131    fi
65132  fi
65133
65134
65135
65136
65137# Setup use of ccache, if available
65138
65139  # Check whether --enable-ccache was given.
65140if test "${enable_ccache+set}" = set; then :
65141  enableval=$enable_ccache;
65142fi
65143
65144
65145  CCACHE=
65146  CCACHE_STATUS=
65147  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65148$as_echo_n "checking is ccache enabled... " >&6; }
65149  if test "x$enable_ccache" = xyes; then
65150    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65151      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65152$as_echo "yes" >&6; }
65153      OLD_PATH="$PATH"
65154      if test "x$TOOLCHAIN_PATH" != x; then
65155        PATH=$TOOLCHAIN_PATH:$PATH
65156      fi
65157
65158
65159
65160  # Publish this variable in the help.
65161
65162
65163  if [ -z "${CCACHE+x}" ]; then
65164    # The variable is not set by user, try to locate tool using the code snippet
65165    for ac_prog in ccache
65166do
65167  # Extract the first word of "$ac_prog", so it can be a program name with args.
65168set dummy $ac_prog; ac_word=$2
65169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65170$as_echo_n "checking for $ac_word... " >&6; }
65171if ${ac_cv_path_CCACHE+:} false; then :
65172  $as_echo_n "(cached) " >&6
65173else
65174  case $CCACHE in
65175  [\\/]* | ?:[\\/]*)
65176  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65177  ;;
65178  *)
65179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65180for as_dir in $PATH
65181do
65182  IFS=$as_save_IFS
65183  test -z "$as_dir" && as_dir=.
65184    for ac_exec_ext in '' $ac_executable_extensions; do
65185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65186    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65188    break 2
65189  fi
65190done
65191  done
65192IFS=$as_save_IFS
65193
65194  ;;
65195esac
65196fi
65197CCACHE=$ac_cv_path_CCACHE
65198if test -n "$CCACHE"; then
65199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65200$as_echo "$CCACHE" >&6; }
65201else
65202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65203$as_echo "no" >&6; }
65204fi
65205
65206
65207  test -n "$CCACHE" && break
65208done
65209
65210  else
65211    # The variable is set, but is it from the command line or the environment?
65212
65213    # Try to remove the string !CCACHE! from our list.
65214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65216      # If it failed, the variable was not from the command line. Ignore it,
65217      # but warn the user (except for BASH, which is always set by the calling BASH).
65218      if test "xCCACHE" != xBASH; then
65219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65220$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65221      fi
65222      # Try to locate tool using the code snippet
65223      for ac_prog in ccache
65224do
65225  # Extract the first word of "$ac_prog", so it can be a program name with args.
65226set dummy $ac_prog; ac_word=$2
65227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65228$as_echo_n "checking for $ac_word... " >&6; }
65229if ${ac_cv_path_CCACHE+:} false; then :
65230  $as_echo_n "(cached) " >&6
65231else
65232  case $CCACHE in
65233  [\\/]* | ?:[\\/]*)
65234  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65235  ;;
65236  *)
65237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65238for as_dir in $PATH
65239do
65240  IFS=$as_save_IFS
65241  test -z "$as_dir" && as_dir=.
65242    for ac_exec_ext in '' $ac_executable_extensions; do
65243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65244    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65246    break 2
65247  fi
65248done
65249  done
65250IFS=$as_save_IFS
65251
65252  ;;
65253esac
65254fi
65255CCACHE=$ac_cv_path_CCACHE
65256if test -n "$CCACHE"; then
65257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65258$as_echo "$CCACHE" >&6; }
65259else
65260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65261$as_echo "no" >&6; }
65262fi
65263
65264
65265  test -n "$CCACHE" && break
65266done
65267
65268    else
65269      # If it succeeded, then it was overridden by the user. We will use it
65270      # for the tool.
65271
65272      # First remove it from the list of overridden variables, so we can test
65273      # for unknown variables in the end.
65274      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65275
65276      # Check if we try to supply an empty value
65277      if test "x$CCACHE" = x; then
65278        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65279$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65281$as_echo_n "checking for CCACHE... " >&6; }
65282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65283$as_echo "disabled" >&6; }
65284      else
65285        # Check if the provided tool contains a complete path.
65286        tool_specified="$CCACHE"
65287        tool_basename="${tool_specified##*/}"
65288        if test "x$tool_basename" = "x$tool_specified"; then
65289          # A command without a complete path is provided, search $PATH.
65290          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65291$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65292          # Extract the first word of "$tool_basename", so it can be a program name with args.
65293set dummy $tool_basename; ac_word=$2
65294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65295$as_echo_n "checking for $ac_word... " >&6; }
65296if ${ac_cv_path_CCACHE+:} false; then :
65297  $as_echo_n "(cached) " >&6
65298else
65299  case $CCACHE in
65300  [\\/]* | ?:[\\/]*)
65301  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65302  ;;
65303  *)
65304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65305for as_dir in $PATH
65306do
65307  IFS=$as_save_IFS
65308  test -z "$as_dir" && as_dir=.
65309    for ac_exec_ext in '' $ac_executable_extensions; do
65310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65311    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65313    break 2
65314  fi
65315done
65316  done
65317IFS=$as_save_IFS
65318
65319  ;;
65320esac
65321fi
65322CCACHE=$ac_cv_path_CCACHE
65323if test -n "$CCACHE"; then
65324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65325$as_echo "$CCACHE" >&6; }
65326else
65327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65328$as_echo "no" >&6; }
65329fi
65330
65331
65332          if test "x$CCACHE" = x; then
65333            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65334          fi
65335        else
65336          # Otherwise we believe it is a complete path. Use it as it is.
65337          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65338$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65339          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65340$as_echo_n "checking for CCACHE... " >&6; }
65341          if test ! -x "$tool_specified"; then
65342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65343$as_echo "not found" >&6; }
65344            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65345          fi
65346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65347$as_echo "$tool_specified" >&6; }
65348        fi
65349      fi
65350    fi
65351
65352  fi
65353
65354
65355
65356  if test "x$CCACHE" = x; then
65357    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65358  fi
65359
65360
65361      PATH="$OLD_PATH"
65362      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65363      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65364    else
65365      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65366$as_echo "no" >&6; }
65367      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65368$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65369    fi
65370  elif test "x$enable_ccache" = xno; then
65371    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65372$as_echo "no, explicitly disabled" >&6; }
65373    CCACHE_STATUS="Disabled"
65374  elif test "x$enable_ccache" = x; then
65375    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65376$as_echo "no" >&6; }
65377  else
65378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65379$as_echo "unknown" >&6; }
65380    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65381  fi
65382
65383
65384
65385# Check whether --with-ccache-dir was given.
65386if test "${with_ccache_dir+set}" = set; then :
65387  withval=$with_ccache_dir;
65388fi
65389
65390
65391  if test "x$with_ccache_dir" != x; then
65392    # When using a non home ccache directory, assume the use is to share ccache files
65393    # with other users. Thus change the umask.
65394    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65395    if test "x$CCACHE" = x; then
65396      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65397$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65398    fi
65399  fi
65400
65401  if test "x$CCACHE" != x; then
65402
65403  if test "x$CCACHE" != x; then
65404    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65405      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65406          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65407      if test "x$HAS_BAD_CCACHE" != "x"; then
65408        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65409      fi
65410      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65411$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65412      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65413      PUSHED_FLAGS="$CXXFLAGS"
65414      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65415      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65416/* end confdefs.h.  */
65417
65418int
65419main ()
65420{
65421
65422  ;
65423  return 0;
65424}
65425_ACEOF
65426if ac_fn_cxx_try_compile "$LINENO"; then :
65427  CC_KNOWS_CCACHE_TRICK=yes
65428else
65429  CC_KNOWS_CCACHE_TRICK=no
65430fi
65431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65432      CXXFLAGS="$PUSHED_FLAGS"
65433      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65435$as_echo "yes" >&6; }
65436        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65437
65438        CCACHE_SLOPPINESS=pch_defines,time_macros
65439      else
65440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65441$as_echo "no" >&6; }
65442        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65443      fi
65444    fi
65445
65446    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65447        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65448
65449    if test "x$SET_CCACHE_DIR" != x; then
65450      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65451      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65452    fi
65453  fi
65454
65455  fi
65456
65457
65458###############################################################################
65459#
65460# And now the finish...
65461#
65462###############################################################################
65463
65464# Check for some common pitfalls
65465
65466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65467    file_to_test="$SRC_ROOT/LICENSE"
65468    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65469      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
65470    fi
65471  fi
65472
65473
65474  # Did user specify any unknown variables?
65475
65476  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65477    # Replace the separating ! with spaces before presenting for end user.
65478    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65479    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65480$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65481  fi
65482
65483
65484  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65485$as_echo_n "checking if build directory is on local disk... " >&6; }
65486
65487  # df -l lists only local disks; if the given directory is not found then
65488  # a non-zero exit code is given
65489  if test "x$DF" = x; then
65490    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65491      # msys does not have df; use Windows "net use" instead.
65492      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65493      if test "x$IS_NETWORK_DISK" = x; then
65494        OUTPUT_DIR_IS_LOCAL="yes"
65495      else
65496        OUTPUT_DIR_IS_LOCAL="no"
65497      fi
65498    else
65499      # No df here, say it's local
65500      OUTPUT_DIR_IS_LOCAL="yes"
65501    fi
65502  else
65503    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65504      OUTPUT_DIR_IS_LOCAL="yes"
65505    else
65506      OUTPUT_DIR_IS_LOCAL="no"
65507    fi
65508  fi
65509
65510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65511$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65512
65513
65514
65515  # Check if the user has any old-style ALT_ variables set.
65516  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65517
65518  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65519  # Since we can't properly handle the dependencies for this, warn the user about the situation
65520  if test -e $OUTPUT_ROOT/spec.gmk; then
65521    IS_RECONFIGURE=yes
65522  else
65523    IS_RECONFIGURE=no
65524  fi
65525
65526
65527# At the end, call the custom hook. (Dummy macro if no custom sources available)
65528
65529
65530# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65531
65532  # Keep feature lists sorted and free of duplicates
65533  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65534  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65535  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65536  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65537  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65538  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65539  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65540
65541  # Validate features
65542  for variant in $JVM_VARIANTS; do
65543    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65544$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65545    features_var_name=JVM_FEATURES_$variant
65546    JVM_FEATURES_TO_TEST=${!features_var_name}
65547    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65548$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65549    INVALID_FEATURES=`$GREP -Fvx "${VALID_JVM_FEATURES// /$'\n'}" <<< "${JVM_FEATURES_TO_TEST// /$'\n'}"`
65550    if test "x$INVALID_FEATURES" != x; then
65551      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65552    fi
65553  done
65554
65555
65556# We're messing a bit with internal autoconf variables to put the config.status
65557# in the output directory instead of the current directory.
65558CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65559
65560# Create the actual output files. Now the main work of configure is done.
65561cat >confcache <<\_ACEOF
65562# This file is a shell script that caches the results of configure
65563# tests run on this system so they can be shared between configure
65564# scripts and configure runs, see configure's option --config-cache.
65565# It is not useful on other systems.  If it contains results you don't
65566# want to keep, you may remove or edit it.
65567#
65568# config.status only pays attention to the cache file if you give it
65569# the --recheck option to rerun configure.
65570#
65571# `ac_cv_env_foo' variables (set or unset) will be overridden when
65572# loading this file, other *unset* `ac_cv_foo' will be assigned the
65573# following values.
65574
65575_ACEOF
65576
65577# The following way of writing the cache mishandles newlines in values,
65578# but we know of no workaround that is simple, portable, and efficient.
65579# So, we kill variables containing newlines.
65580# Ultrix sh set writes to stderr and can't be redirected directly,
65581# and sets the high bit in the cache file unless we assign to the vars.
65582(
65583  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65584    eval ac_val=\$$ac_var
65585    case $ac_val in #(
65586    *${as_nl}*)
65587      case $ac_var in #(
65588      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65589$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65590      esac
65591      case $ac_var in #(
65592      _ | IFS | as_nl) ;; #(
65593      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65594      *) { eval $ac_var=; unset $ac_var;} ;;
65595      esac ;;
65596    esac
65597  done
65598
65599  (set) 2>&1 |
65600    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65601    *${as_nl}ac_space=\ *)
65602      # `set' does not quote correctly, so add quotes: double-quote
65603      # substitution turns \\\\ into \\, and sed turns \\ into \.
65604      sed -n \
65605	"s/'/'\\\\''/g;
65606	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65607      ;; #(
65608    *)
65609      # `set' quotes correctly as required by POSIX, so do not add quotes.
65610      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65611      ;;
65612    esac |
65613    sort
65614) |
65615  sed '
65616     /^ac_cv_env_/b end
65617     t clear
65618     :clear
65619     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65620     t end
65621     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65622     :end' >>confcache
65623if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65624  if test -w "$cache_file"; then
65625    if test "x$cache_file" != "x/dev/null"; then
65626      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65627$as_echo "$as_me: updating cache $cache_file" >&6;}
65628      if test ! -f "$cache_file" || test -h "$cache_file"; then
65629	cat confcache >"$cache_file"
65630      else
65631        case $cache_file in #(
65632        */* | ?:*)
65633	  mv -f confcache "$cache_file"$$ &&
65634	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65635        *)
65636	  mv -f confcache "$cache_file" ;;
65637	esac
65638      fi
65639    fi
65640  else
65641    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65642$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65643  fi
65644fi
65645rm -f confcache
65646
65647test "x$prefix" = xNONE && prefix=$ac_default_prefix
65648# Let make expand exec_prefix.
65649test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65650
65651# Transform confdefs.h into DEFS.
65652# Protect against shell expansion while executing Makefile rules.
65653# Protect against Makefile macro expansion.
65654#
65655# If the first sed substitution is executed (which looks for macros that
65656# take arguments), then branch to the quote section.  Otherwise,
65657# look for a macro that doesn't take arguments.
65658ac_script='
65659:mline
65660/\\$/{
65661 N
65662 s,\\\n,,
65663 b mline
65664}
65665t clear
65666:clear
65667s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65668t quote
65669s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65670t quote
65671b any
65672:quote
65673s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65674s/\[/\\&/g
65675s/\]/\\&/g
65676s/\$/$$/g
65677H
65678:any
65679${
65680	g
65681	s/^\n//
65682	s/\n/ /g
65683	p
65684}
65685'
65686DEFS=`sed -n "$ac_script" confdefs.h`
65687
65688
65689ac_libobjs=
65690ac_ltlibobjs=
65691U=
65692for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65693  # 1. Remove the extension, and $U if already installed.
65694  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65695  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65696  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65697  #    will be set to the directory where LIBOBJS objects are built.
65698  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65699  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65700done
65701LIBOBJS=$ac_libobjs
65702
65703LTLIBOBJS=$ac_ltlibobjs
65704
65705
65706
65707: "${CONFIG_STATUS=./config.status}"
65708ac_write_fail=0
65709ac_clean_files_save=$ac_clean_files
65710ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65711{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65712$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65713as_write_fail=0
65714cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65715#! $SHELL
65716# Generated by $as_me.
65717# Run this file to recreate the current configuration.
65718# Compiler output produced by configure, useful for debugging
65719# configure, is in config.log if it exists.
65720
65721debug=false
65722ac_cs_recheck=false
65723ac_cs_silent=false
65724
65725SHELL=\${CONFIG_SHELL-$SHELL}
65726export SHELL
65727_ASEOF
65728cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65729## -------------------- ##
65730## M4sh Initialization. ##
65731## -------------------- ##
65732
65733# Be more Bourne compatible
65734DUALCASE=1; export DUALCASE # for MKS sh
65735if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65736  emulate sh
65737  NULLCMD=:
65738  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65739  # is contrary to our usage.  Disable this feature.
65740  alias -g '${1+"$@"}'='"$@"'
65741  setopt NO_GLOB_SUBST
65742else
65743  case `(set -o) 2>/dev/null` in #(
65744  *posix*) :
65745    set -o posix ;; #(
65746  *) :
65747     ;;
65748esac
65749fi
65750
65751
65752as_nl='
65753'
65754export as_nl
65755# Printing a long string crashes Solaris 7 /usr/bin/printf.
65756as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65757as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65758as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65759# Prefer a ksh shell builtin over an external printf program on Solaris,
65760# but without wasting forks for bash or zsh.
65761if test -z "$BASH_VERSION$ZSH_VERSION" \
65762    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65763  as_echo='print -r --'
65764  as_echo_n='print -rn --'
65765elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65766  as_echo='printf %s\n'
65767  as_echo_n='printf %s'
65768else
65769  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65770    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65771    as_echo_n='/usr/ucb/echo -n'
65772  else
65773    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65774    as_echo_n_body='eval
65775      arg=$1;
65776      case $arg in #(
65777      *"$as_nl"*)
65778	expr "X$arg" : "X\\(.*\\)$as_nl";
65779	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65780      esac;
65781      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65782    '
65783    export as_echo_n_body
65784    as_echo_n='sh -c $as_echo_n_body as_echo'
65785  fi
65786  export as_echo_body
65787  as_echo='sh -c $as_echo_body as_echo'
65788fi
65789
65790# The user is always right.
65791if test "${PATH_SEPARATOR+set}" != set; then
65792  PATH_SEPARATOR=:
65793  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65794    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65795      PATH_SEPARATOR=';'
65796  }
65797fi
65798
65799
65800# IFS
65801# We need space, tab and new line, in precisely that order.  Quoting is
65802# there to prevent editors from complaining about space-tab.
65803# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65804# splitting by setting IFS to empty value.)
65805IFS=" ""	$as_nl"
65806
65807# Find who we are.  Look in the path if we contain no directory separator.
65808as_myself=
65809case $0 in #((
65810  *[\\/]* ) as_myself=$0 ;;
65811  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65812for as_dir in $PATH
65813do
65814  IFS=$as_save_IFS
65815  test -z "$as_dir" && as_dir=.
65816    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65817  done
65818IFS=$as_save_IFS
65819
65820     ;;
65821esac
65822# We did not find ourselves, most probably we were run as `sh COMMAND'
65823# in which case we are not to be found in the path.
65824if test "x$as_myself" = x; then
65825  as_myself=$0
65826fi
65827if test ! -f "$as_myself"; then
65828  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65829  exit 1
65830fi
65831
65832# Unset variables that we do not need and which cause bugs (e.g. in
65833# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65834# suppresses any "Segmentation fault" message there.  '((' could
65835# trigger a bug in pdksh 5.2.14.
65836for as_var in BASH_ENV ENV MAIL MAILPATH
65837do eval test x\${$as_var+set} = xset \
65838  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65839done
65840PS1='$ '
65841PS2='> '
65842PS4='+ '
65843
65844# NLS nuisances.
65845LC_ALL=C
65846export LC_ALL
65847LANGUAGE=C
65848export LANGUAGE
65849
65850# CDPATH.
65851(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65852
65853
65854# as_fn_error STATUS ERROR [LINENO LOG_FD]
65855# ----------------------------------------
65856# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65857# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65858# script with STATUS, using 1 if that was 0.
65859as_fn_error ()
65860{
65861  as_status=$1; test $as_status -eq 0 && as_status=1
65862  if test "$4"; then
65863    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65864    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65865  fi
65866  $as_echo "$as_me: error: $2" >&2
65867  as_fn_exit $as_status
65868} # as_fn_error
65869
65870
65871# as_fn_set_status STATUS
65872# -----------------------
65873# Set $? to STATUS, without forking.
65874as_fn_set_status ()
65875{
65876  return $1
65877} # as_fn_set_status
65878
65879# as_fn_exit STATUS
65880# -----------------
65881# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65882as_fn_exit ()
65883{
65884  set +e
65885  as_fn_set_status $1
65886  exit $1
65887} # as_fn_exit
65888
65889# as_fn_unset VAR
65890# ---------------
65891# Portably unset VAR.
65892as_fn_unset ()
65893{
65894  { eval $1=; unset $1;}
65895}
65896as_unset=as_fn_unset
65897# as_fn_append VAR VALUE
65898# ----------------------
65899# Append the text in VALUE to the end of the definition contained in VAR. Take
65900# advantage of any shell optimizations that allow amortized linear growth over
65901# repeated appends, instead of the typical quadratic growth present in naive
65902# implementations.
65903if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
65904  eval 'as_fn_append ()
65905  {
65906    eval $1+=\$2
65907  }'
65908else
65909  as_fn_append ()
65910  {
65911    eval $1=\$$1\$2
65912  }
65913fi # as_fn_append
65914
65915# as_fn_arith ARG...
65916# ------------------
65917# Perform arithmetic evaluation on the ARGs, and store the result in the
65918# global $as_val. Take advantage of shells that can avoid forks. The arguments
65919# must be portable across $(()) and expr.
65920if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
65921  eval 'as_fn_arith ()
65922  {
65923    as_val=$(( $* ))
65924  }'
65925else
65926  as_fn_arith ()
65927  {
65928    as_val=`expr "$@" || test $? -eq 1`
65929  }
65930fi # as_fn_arith
65931
65932
65933if expr a : '\(a\)' >/dev/null 2>&1 &&
65934   test "X`expr 00001 : '.*\(...\)'`" = X001; then
65935  as_expr=expr
65936else
65937  as_expr=false
65938fi
65939
65940if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
65941  as_basename=basename
65942else
65943  as_basename=false
65944fi
65945
65946if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
65947  as_dirname=dirname
65948else
65949  as_dirname=false
65950fi
65951
65952as_me=`$as_basename -- "$0" ||
65953$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
65954	 X"$0" : 'X\(//\)$' \| \
65955	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
65956$as_echo X/"$0" |
65957    sed '/^.*\/\([^/][^/]*\)\/*$/{
65958	    s//\1/
65959	    q
65960	  }
65961	  /^X\/\(\/\/\)$/{
65962	    s//\1/
65963	    q
65964	  }
65965	  /^X\/\(\/\).*/{
65966	    s//\1/
65967	    q
65968	  }
65969	  s/.*/./; q'`
65970
65971# Avoid depending upon Character Ranges.
65972as_cr_letters='abcdefghijklmnopqrstuvwxyz'
65973as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
65974as_cr_Letters=$as_cr_letters$as_cr_LETTERS
65975as_cr_digits='0123456789'
65976as_cr_alnum=$as_cr_Letters$as_cr_digits
65977
65978ECHO_C= ECHO_N= ECHO_T=
65979case `echo -n x` in #(((((
65980-n*)
65981  case `echo 'xy\c'` in
65982  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
65983  xy)  ECHO_C='\c';;
65984  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
65985       ECHO_T='	';;
65986  esac;;
65987*)
65988  ECHO_N='-n';;
65989esac
65990
65991rm -f conf$$ conf$$.exe conf$$.file
65992if test -d conf$$.dir; then
65993  rm -f conf$$.dir/conf$$.file
65994else
65995  rm -f conf$$.dir
65996  mkdir conf$$.dir 2>/dev/null
65997fi
65998if (echo >conf$$.file) 2>/dev/null; then
65999  if ln -s conf$$.file conf$$ 2>/dev/null; then
66000    as_ln_s='ln -s'
66001    # ... but there are two gotchas:
66002    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66003    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66004    # In both cases, we have to default to `cp -pR'.
66005    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66006      as_ln_s='cp -pR'
66007  elif ln conf$$.file conf$$ 2>/dev/null; then
66008    as_ln_s=ln
66009  else
66010    as_ln_s='cp -pR'
66011  fi
66012else
66013  as_ln_s='cp -pR'
66014fi
66015rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66016rmdir conf$$.dir 2>/dev/null
66017
66018
66019# as_fn_mkdir_p
66020# -------------
66021# Create "$as_dir" as a directory, including parents if necessary.
66022as_fn_mkdir_p ()
66023{
66024
66025  case $as_dir in #(
66026  -*) as_dir=./$as_dir;;
66027  esac
66028  test -d "$as_dir" || eval $as_mkdir_p || {
66029    as_dirs=
66030    while :; do
66031      case $as_dir in #(
66032      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66033      *) as_qdir=$as_dir;;
66034      esac
66035      as_dirs="'$as_qdir' $as_dirs"
66036      as_dir=`$as_dirname -- "$as_dir" ||
66037$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66038	 X"$as_dir" : 'X\(//\)[^/]' \| \
66039	 X"$as_dir" : 'X\(//\)$' \| \
66040	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66041$as_echo X"$as_dir" |
66042    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66043	    s//\1/
66044	    q
66045	  }
66046	  /^X\(\/\/\)[^/].*/{
66047	    s//\1/
66048	    q
66049	  }
66050	  /^X\(\/\/\)$/{
66051	    s//\1/
66052	    q
66053	  }
66054	  /^X\(\/\).*/{
66055	    s//\1/
66056	    q
66057	  }
66058	  s/.*/./; q'`
66059      test -d "$as_dir" && break
66060    done
66061    test -z "$as_dirs" || eval "mkdir $as_dirs"
66062  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66063
66064
66065} # as_fn_mkdir_p
66066if mkdir -p . 2>/dev/null; then
66067  as_mkdir_p='mkdir -p "$as_dir"'
66068else
66069  test -d ./-p && rmdir ./-p
66070  as_mkdir_p=false
66071fi
66072
66073
66074# as_fn_executable_p FILE
66075# -----------------------
66076# Test if FILE is an executable regular file.
66077as_fn_executable_p ()
66078{
66079  test -f "$1" && test -x "$1"
66080} # as_fn_executable_p
66081as_test_x='test -x'
66082as_executable_p=as_fn_executable_p
66083
66084# Sed expression to map a string onto a valid CPP name.
66085as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66086
66087# Sed expression to map a string onto a valid variable name.
66088as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66089
66090
66091exec 6>&1
66092## ----------------------------------- ##
66093## Main body of $CONFIG_STATUS script. ##
66094## ----------------------------------- ##
66095_ASEOF
66096test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66097
66098cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66099# Save the log message, to keep $0 and so on meaningful, and to
66100# report actual input values of CONFIG_FILES etc. instead of their
66101# values after options handling.
66102ac_log="
66103This file was extended by OpenJDK $as_me jdk9, which was
66104generated by GNU Autoconf 2.69.  Invocation command line was
66105
66106  CONFIG_FILES    = $CONFIG_FILES
66107  CONFIG_HEADERS  = $CONFIG_HEADERS
66108  CONFIG_LINKS    = $CONFIG_LINKS
66109  CONFIG_COMMANDS = $CONFIG_COMMANDS
66110  $ $0 $@
66111
66112on `(hostname || uname -n) 2>/dev/null | sed 1q`
66113"
66114
66115_ACEOF
66116
66117case $ac_config_files in *"
66118"*) set x $ac_config_files; shift; ac_config_files=$*;;
66119esac
66120
66121
66122
66123cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66124# Files that config.status was made for.
66125config_files="$ac_config_files"
66126
66127_ACEOF
66128
66129cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66130ac_cs_usage="\
66131\`$as_me' instantiates files and other configuration actions
66132from templates according to the current configuration.  Unless the files
66133and actions are specified as TAGs, all are instantiated by default.
66134
66135Usage: $0 [OPTION]... [TAG]...
66136
66137  -h, --help       print this help, then exit
66138  -V, --version    print version number and configuration settings, then exit
66139      --config     print configuration, then exit
66140  -q, --quiet, --silent
66141                   do not print progress messages
66142  -d, --debug      don't remove temporary files
66143      --recheck    update $as_me by reconfiguring in the same conditions
66144      --file=FILE[:TEMPLATE]
66145                   instantiate the configuration file FILE
66146
66147Configuration files:
66148$config_files
66149
66150Report bugs to <build-dev@openjdk.java.net>.
66151OpenJDK home page: <http://openjdk.java.net>."
66152
66153_ACEOF
66154cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66155ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66156ac_cs_version="\\
66157OpenJDK config.status jdk9
66158configured by $0, generated by GNU Autoconf 2.69,
66159  with options \\"\$ac_cs_config\\"
66160
66161Copyright (C) 2012 Free Software Foundation, Inc.
66162This config.status script is free software; the Free Software Foundation
66163gives unlimited permission to copy, distribute and modify it."
66164
66165ac_pwd='$ac_pwd'
66166srcdir='$srcdir'
66167AWK='$AWK'
66168test -n "\$AWK" || AWK=awk
66169_ACEOF
66170
66171cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66172# The default lists apply if the user does not specify any file.
66173ac_need_defaults=:
66174while test $# != 0
66175do
66176  case $1 in
66177  --*=?*)
66178    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66179    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66180    ac_shift=:
66181    ;;
66182  --*=)
66183    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66184    ac_optarg=
66185    ac_shift=:
66186    ;;
66187  *)
66188    ac_option=$1
66189    ac_optarg=$2
66190    ac_shift=shift
66191    ;;
66192  esac
66193
66194  case $ac_option in
66195  # Handling of the options.
66196  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66197    ac_cs_recheck=: ;;
66198  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66199    $as_echo "$ac_cs_version"; exit ;;
66200  --config | --confi | --conf | --con | --co | --c )
66201    $as_echo "$ac_cs_config"; exit ;;
66202  --debug | --debu | --deb | --de | --d | -d )
66203    debug=: ;;
66204  --file | --fil | --fi | --f )
66205    $ac_shift
66206    case $ac_optarg in
66207    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66208    '') as_fn_error $? "missing file argument" ;;
66209    esac
66210    as_fn_append CONFIG_FILES " '$ac_optarg'"
66211    ac_need_defaults=false;;
66212  --he | --h |  --help | --hel | -h )
66213    $as_echo "$ac_cs_usage"; exit ;;
66214  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66215  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66216    ac_cs_silent=: ;;
66217
66218  # This is an error.
66219  -*) as_fn_error $? "unrecognized option: \`$1'
66220Try \`$0 --help' for more information." ;;
66221
66222  *) as_fn_append ac_config_targets " $1"
66223     ac_need_defaults=false ;;
66224
66225  esac
66226  shift
66227done
66228
66229ac_configure_extra_args=
66230
66231if $ac_cs_silent; then
66232  exec 6>/dev/null
66233  ac_configure_extra_args="$ac_configure_extra_args --silent"
66234fi
66235
66236_ACEOF
66237cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66238if \$ac_cs_recheck; then
66239  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66240  shift
66241  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66242  CONFIG_SHELL='$SHELL'
66243  export CONFIG_SHELL
66244  exec "\$@"
66245fi
66246
66247_ACEOF
66248cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66249exec 5>>config.log
66250{
66251  echo
66252  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66253## Running $as_me. ##
66254_ASBOX
66255  $as_echo "$ac_log"
66256} >&5
66257
66258_ACEOF
66259cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66260_ACEOF
66261
66262cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66263
66264# Handling of arguments.
66265for ac_config_target in $ac_config_targets
66266do
66267  case $ac_config_target in
66268    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66269    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
66270    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66271    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66272    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66273    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66274
66275  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66276  esac
66277done
66278
66279
66280# If the user did not use the arguments to specify the items to instantiate,
66281# then the envvar interface is used.  Set only those that are not.
66282# We use the long form for the default assignment because of an extremely
66283# bizarre bug on SunOS 4.1.3.
66284if $ac_need_defaults; then
66285  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66286fi
66287
66288# Have a temporary directory for convenience.  Make it in the build tree
66289# simply because there is no reason against having it here, and in addition,
66290# creating and moving files from /tmp can sometimes cause problems.
66291# Hook for its removal unless debugging.
66292# Note that there is a small window in which the directory will not be cleaned:
66293# after its creation but before its name has been assigned to `$tmp'.
66294$debug ||
66295{
66296  tmp= ac_tmp=
66297  trap 'exit_status=$?
66298  : "${ac_tmp:=$tmp}"
66299  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66300' 0
66301  trap 'as_fn_exit 1' 1 2 13 15
66302}
66303# Create a (secure) tmp directory for tmp files.
66304
66305{
66306  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66307  test -d "$tmp"
66308}  ||
66309{
66310  tmp=./conf$$-$RANDOM
66311  (umask 077 && mkdir "$tmp")
66312} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66313ac_tmp=$tmp
66314
66315# Set up the scripts for CONFIG_FILES section.
66316# No need to generate them if there are no CONFIG_FILES.
66317# This happens for instance with `./config.status config.h'.
66318if test -n "$CONFIG_FILES"; then
66319
66320
66321ac_cr=`echo X | tr X '\015'`
66322# On cygwin, bash can eat \r inside `` if the user requested igncr.
66323# But we know of no other shell where ac_cr would be empty at this
66324# point, so we can use a bashism as a fallback.
66325if test "x$ac_cr" = x; then
66326  eval ac_cr=\$\'\\r\'
66327fi
66328ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66329if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66330  ac_cs_awk_cr='\\r'
66331else
66332  ac_cs_awk_cr=$ac_cr
66333fi
66334
66335echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66336_ACEOF
66337
66338
66339{
66340  echo "cat >conf$$subs.awk <<_ACEOF" &&
66341  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66342  echo "_ACEOF"
66343} >conf$$subs.sh ||
66344  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66345ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66346ac_delim='%!_!# '
66347for ac_last_try in false false false false false :; do
66348  . ./conf$$subs.sh ||
66349    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66350
66351  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66352  if test $ac_delim_n = $ac_delim_num; then
66353    break
66354  elif $ac_last_try; then
66355    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66356  else
66357    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66358  fi
66359done
66360rm -f conf$$subs.sh
66361
66362cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66363cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66364_ACEOF
66365sed -n '
66366h
66367s/^/S["/; s/!.*/"]=/
66368p
66369g
66370s/^[^!]*!//
66371:repl
66372t repl
66373s/'"$ac_delim"'$//
66374t delim
66375:nl
66376h
66377s/\(.\{148\}\)..*/\1/
66378t more1
66379s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66380p
66381n
66382b repl
66383:more1
66384s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66385p
66386g
66387s/.\{148\}//
66388t nl
66389:delim
66390h
66391s/\(.\{148\}\)..*/\1/
66392t more2
66393s/["\\]/\\&/g; s/^/"/; s/$/"/
66394p
66395b
66396:more2
66397s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66398p
66399g
66400s/.\{148\}//
66401t delim
66402' <conf$$subs.awk | sed '
66403/^[^""]/{
66404  N
66405  s/\n//
66406}
66407' >>$CONFIG_STATUS || ac_write_fail=1
66408rm -f conf$$subs.awk
66409cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66410_ACAWK
66411cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66412  for (key in S) S_is_set[key] = 1
66413  FS = ""
66414
66415}
66416{
66417  line = $ 0
66418  nfields = split(line, field, "@")
66419  substed = 0
66420  len = length(field[1])
66421  for (i = 2; i < nfields; i++) {
66422    key = field[i]
66423    keylen = length(key)
66424    if (S_is_set[key]) {
66425      value = S[key]
66426      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66427      len += length(value) + length(field[++i])
66428      substed = 1
66429    } else
66430      len += 1 + keylen
66431  }
66432
66433  print line
66434}
66435
66436_ACAWK
66437_ACEOF
66438cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66439if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66440  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66441else
66442  cat
66443fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66444  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66445_ACEOF
66446
66447# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66448# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66449# trailing colons and then remove the whole line if VPATH becomes empty
66450# (actually we leave an empty line to preserve line numbers).
66451if test "x$srcdir" = x.; then
66452  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66453h
66454s///
66455s/^/:/
66456s/[	 ]*$/:/
66457s/:\$(srcdir):/:/g
66458s/:\${srcdir}:/:/g
66459s/:@srcdir@:/:/g
66460s/^:*//
66461s/:*$//
66462x
66463s/\(=[	 ]*\).*/\1/
66464G
66465s/\n//
66466s/^[^=]*=[	 ]*$//
66467}'
66468fi
66469
66470cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66471fi # test -n "$CONFIG_FILES"
66472
66473
66474eval set X "  :F $CONFIG_FILES      "
66475shift
66476for ac_tag
66477do
66478  case $ac_tag in
66479  :[FHLC]) ac_mode=$ac_tag; continue;;
66480  esac
66481  case $ac_mode$ac_tag in
66482  :[FHL]*:*);;
66483  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66484  :[FH]-) ac_tag=-:-;;
66485  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66486  esac
66487  ac_save_IFS=$IFS
66488  IFS=:
66489  set x $ac_tag
66490  IFS=$ac_save_IFS
66491  shift
66492  ac_file=$1
66493  shift
66494
66495  case $ac_mode in
66496  :L) ac_source=$1;;
66497  :[FH])
66498    ac_file_inputs=
66499    for ac_f
66500    do
66501      case $ac_f in
66502      -) ac_f="$ac_tmp/stdin";;
66503      *) # Look for the file first in the build tree, then in the source tree
66504	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66505	 # because $ac_f cannot contain `:'.
66506	 test -f "$ac_f" ||
66507	   case $ac_f in
66508	   [\\/$]*) false;;
66509	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66510	   esac ||
66511	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66512      esac
66513      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66514      as_fn_append ac_file_inputs " '$ac_f'"
66515    done
66516
66517    # Let's still pretend it is `configure' which instantiates (i.e., don't
66518    # use $as_me), people would be surprised to read:
66519    #    /* config.h.  Generated by config.status.  */
66520    configure_input='Generated from '`
66521	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66522	`' by configure.'
66523    if test x"$ac_file" != x-; then
66524      configure_input="$ac_file.  $configure_input"
66525      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66526$as_echo "$as_me: creating $ac_file" >&6;}
66527    fi
66528    # Neutralize special characters interpreted by sed in replacement strings.
66529    case $configure_input in #(
66530    *\&* | *\|* | *\\* )
66531       ac_sed_conf_input=`$as_echo "$configure_input" |
66532       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66533    *) ac_sed_conf_input=$configure_input;;
66534    esac
66535
66536    case $ac_tag in
66537    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66538      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66539    esac
66540    ;;
66541  esac
66542
66543  ac_dir=`$as_dirname -- "$ac_file" ||
66544$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66545	 X"$ac_file" : 'X\(//\)[^/]' \| \
66546	 X"$ac_file" : 'X\(//\)$' \| \
66547	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66548$as_echo X"$ac_file" |
66549    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66550	    s//\1/
66551	    q
66552	  }
66553	  /^X\(\/\/\)[^/].*/{
66554	    s//\1/
66555	    q
66556	  }
66557	  /^X\(\/\/\)$/{
66558	    s//\1/
66559	    q
66560	  }
66561	  /^X\(\/\).*/{
66562	    s//\1/
66563	    q
66564	  }
66565	  s/.*/./; q'`
66566  as_dir="$ac_dir"; as_fn_mkdir_p
66567  ac_builddir=.
66568
66569case "$ac_dir" in
66570.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66571*)
66572  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66573  # A ".." for each directory in $ac_dir_suffix.
66574  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66575  case $ac_top_builddir_sub in
66576  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66577  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66578  esac ;;
66579esac
66580ac_abs_top_builddir=$ac_pwd
66581ac_abs_builddir=$ac_pwd$ac_dir_suffix
66582# for backward compatibility:
66583ac_top_builddir=$ac_top_build_prefix
66584
66585case $srcdir in
66586  .)  # We are building in place.
66587    ac_srcdir=.
66588    ac_top_srcdir=$ac_top_builddir_sub
66589    ac_abs_top_srcdir=$ac_pwd ;;
66590  [\\/]* | ?:[\\/]* )  # Absolute name.
66591    ac_srcdir=$srcdir$ac_dir_suffix;
66592    ac_top_srcdir=$srcdir
66593    ac_abs_top_srcdir=$srcdir ;;
66594  *) # Relative name.
66595    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66596    ac_top_srcdir=$ac_top_build_prefix$srcdir
66597    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66598esac
66599ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66600
66601
66602  case $ac_mode in
66603  :F)
66604  #
66605  # CONFIG_FILE
66606  #
66607
66608_ACEOF
66609
66610cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66611# If the template does not know about datarootdir, expand it.
66612# FIXME: This hack should be removed a few years after 2.60.
66613ac_datarootdir_hack=; ac_datarootdir_seen=
66614ac_sed_dataroot='
66615/datarootdir/ {
66616  p
66617  q
66618}
66619/@datadir@/p
66620/@docdir@/p
66621/@infodir@/p
66622/@localedir@/p
66623/@mandir@/p'
66624case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66625*datarootdir*) ac_datarootdir_seen=yes;;
66626*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66627  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66628$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66629_ACEOF
66630cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66631  ac_datarootdir_hack='
66632  s&@datadir@&$datadir&g
66633  s&@docdir@&$docdir&g
66634  s&@infodir@&$infodir&g
66635  s&@localedir@&$localedir&g
66636  s&@mandir@&$mandir&g
66637  s&\\\${datarootdir}&$datarootdir&g' ;;
66638esac
66639_ACEOF
66640
66641# Neutralize VPATH when `$srcdir' = `.'.
66642# Shell code in configure.ac might set extrasub.
66643# FIXME: do we really want to maintain this feature?
66644cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66645ac_sed_extra="$ac_vpsub
66646$extrasub
66647_ACEOF
66648cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66649:t
66650/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66651s|@configure_input@|$ac_sed_conf_input|;t t
66652s&@top_builddir@&$ac_top_builddir_sub&;t t
66653s&@top_build_prefix@&$ac_top_build_prefix&;t t
66654s&@srcdir@&$ac_srcdir&;t t
66655s&@abs_srcdir@&$ac_abs_srcdir&;t t
66656s&@top_srcdir@&$ac_top_srcdir&;t t
66657s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66658s&@builddir@&$ac_builddir&;t t
66659s&@abs_builddir@&$ac_abs_builddir&;t t
66660s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66661$ac_datarootdir_hack
66662"
66663eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66664  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66665
66666test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66667  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66668  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66669      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66670  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66671which seems to be undefined.  Please make sure it is defined" >&5
66672$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66673which seems to be undefined.  Please make sure it is defined" >&2;}
66674
66675  rm -f "$ac_tmp/stdin"
66676  case $ac_file in
66677  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66678  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66679  esac \
66680  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66681 ;;
66682
66683
66684
66685  esac
66686
66687done # for ac_tag
66688
66689
66690as_fn_exit 0
66691_ACEOF
66692ac_clean_files=$ac_clean_files_save
66693
66694test $ac_write_fail = 0 ||
66695  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66696
66697
66698# configure is writing to config.log, and then calls config.status.
66699# config.status does its own redirection, appending to config.log.
66700# Unfortunately, on DOS this fails, as config.log is still kept open
66701# by configure, so config.status won't be able to write to it; its
66702# output is simply discarded.  So we exec the FD to /dev/null,
66703# effectively closing config.log, so it can be properly (re)opened and
66704# appended to by config.status.  When coming back to configure, we
66705# need to make the FD available again.
66706if test "$no_create" != yes; then
66707  ac_cs_success=:
66708  ac_config_status_args=
66709  test "$silent" = yes &&
66710    ac_config_status_args="$ac_config_status_args --quiet"
66711  exec 5>/dev/null
66712  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66713  exec 5>>config.log
66714  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66715  # would make configure fail if this is the last instruction.
66716  $ac_cs_success || as_fn_exit 1
66717fi
66718if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66719  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66720$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66721fi
66722
66723
66724# After AC_OUTPUT, we need to do final work
66725
66726
66727  # Try to move config.log (generated by autoconf) to the configure-support directory.
66728  if test -e ./config.log; then
66729    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66730  fi
66731
66732  # Rotate our log file (configure.log)
66733  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66734    $RM -f "$OUTPUT_ROOT/configure.log.old"
66735  fi
66736  if test -e "$OUTPUT_ROOT/configure.log"; then
66737    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66738  fi
66739
66740  # Move configure.log from current directory to the build output root
66741  if test -e ./configure.log; then
66742    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66743  fi
66744
66745  # Make the compare script executable
66746  $CHMOD +x $OUTPUT_ROOT/compare.sh
66747
66748
66749# Finally output some useful information to the user
66750
66751  # Finally output some useful information to the user
66752
66753  printf "\n"
66754  printf "====================================================\n"
66755  if test "x$no_create" != "xyes"; then
66756    if test "x$IS_RECONFIGURE" != "xyes"; then
66757      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66758    else
66759      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66760    fi
66761  else
66762    if test "x$IS_RECONFIGURE" != "xyes"; then
66763      printf "A configuration has been successfully checked but not created\n"
66764    else
66765      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66766    fi
66767  fi
66768  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66769    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66770  else
66771    printf "using default settings.\n"
66772  fi
66773
66774  printf "\n"
66775  printf "Configuration summary:\n"
66776  printf "* Debug level:    $DEBUG_LEVEL\n"
66777  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66778  printf "* JDK variant:    $JDK_VARIANT\n"
66779  printf "* JVM variants:   $JVM_VARIANTS\n"
66780  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66781  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66782
66783  printf "\n"
66784  printf "Tools summary:\n"
66785  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66786    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66787  fi
66788  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66789  if test "x$TOOLCHAIN_VERSION" != "x"; then
66790    print_version=" $TOOLCHAIN_VERSION"
66791  fi
66792  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66793  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66794  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66795
66796  printf "\n"
66797  printf "Build performance summary:\n"
66798  printf "* Cores to use:   $JOBS\n"
66799  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66800  if test "x$CCACHE_STATUS" != "x"; then
66801    printf "* ccache status:  $CCACHE_STATUS\n"
66802  fi
66803  printf "\n"
66804
66805  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66806    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66807    printf "will result in longer build times.\n"
66808    printf "\n"
66809  fi
66810
66811  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66812    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66813    printf "These are not respected, and will be ignored. It is recommended\n"
66814    printf "that you clean your environment. The following variables are set:\n"
66815    printf "$FOUND_ALT_VARIABLES\n"
66816    printf "\n"
66817  fi
66818
66819  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66820    printf "WARNING: Your build output directory is not on a local disk.\n"
66821    printf "This will severely degrade build performance!\n"
66822    printf "It is recommended that you create an output directory on a local disk,\n"
66823    printf "and run the configure script again from that directory.\n"
66824    printf "\n"
66825  fi
66826
66827  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66828    printf "WARNING: The result of this configuration has overridden an older\n"
66829    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66830    printf "proper build. Failure to do so might result in strange build problems.\n"
66831    printf "\n"
66832  fi
66833
66834  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66835    printf "WARNING: The result of this configuration was not saved.\n"
66836    printf "You should run without '--no-create | -n' to create the configuration.\n"
66837    printf "\n"
66838  fi
66839
66840
66841
66842  # Locate config.log.
66843  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66844    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66845  elif test -e "./config.log"; then
66846    CONFIG_LOG_PATH="."
66847  fi
66848
66849  if test -e "$CONFIG_LOG_PATH/config.log"; then
66850    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66851    if test $? -eq 0; then
66852      printf "The following warnings were produced. Repeated here for convenience:\n"
66853      # We must quote sed expression (using []) to stop m4 from eating the [].
66854      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66855      printf "\n"
66856    fi
66857  fi
66858
66859