generated-configure.sh revision 2250:dfbf42c2f7f5
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
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657STLPORT_LIB
658LIBZIP_CAN_USE_MMAP
659LIBDL
660LIBM
661USE_EXTERNAL_LCMS
662LCMS_LIBS
663LCMS_CFLAGS
664USE_EXTERNAL_LIBZ
665USE_EXTERNAL_LIBPNG
666PNG_LIBS
667PNG_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670LLVM_LIBS
671LLVM_LDFLAGS
672LLVM_CFLAGS
673LLVM_CONFIG
674LIBFFI_LIBS
675LIBFFI_CFLAGS
676ALSA_LIBS
677ALSA_CFLAGS
678FREETYPE_BUNDLE_LIB_PATH
679FREETYPE_LIBS
680FREETYPE_CFLAGS
681CUPS_CFLAGS
682X_EXTRA_LIBS
683X_LIBS
684X_PRE_LIBS
685X_CFLAGS
686XMKMF
687MSVCP_DLL
688MSVCR_DLL
689LIBCXX
690STATIC_CXX_SETTING
691FIXPATH_DETACH_FLAG
692FIXPATH
693BUILD_GTEST
694VALID_JVM_FEATURES
695JVM_FEATURES_custom
696JVM_FEATURES_zeroshark
697JVM_FEATURES_zero
698JVM_FEATURES_minimal
699JVM_FEATURES_core
700JVM_FEATURES_client
701JVM_FEATURES_server
702INCLUDE_DTRACE
703GCOV_ENABLED
704STRIP_POLICY
705DEBUG_BINARIES
706ZIP_EXTERNAL_DEBUG_SYMBOLS
707COPY_DEBUG_SYMBOLS
708COMPILE_WITH_DEBUG_SYMBOLS
709CFLAGS_WARNINGS_ARE_ERRORS
710BUILD_CC_DISABLE_WARNING_PREFIX
711DISABLE_WARNING_PREFIX
712HOTSPOT_SET_WARNINGS_AS_ERRORS
713WARNINGS_AS_ERRORS
714COMPILER_SUPPORTS_TARGET_BITS_FLAG
715ZERO_ARCHFLAG
716LDFLAGS_TESTEXE
717LDFLAGS_TESTLIB
718CXXFLAGS_TESTEXE
719CXXFLAGS_TESTLIB
720CFLAGS_TESTEXE
721CFLAGS_TESTLIB
722OPENJDK_BUILD_JVM_LIBS
723OPENJDK_BUILD_JVM_ASFLAGS
724OPENJDK_BUILD_JVM_LDFLAGS
725OPENJDK_BUILD_JVM_CFLAGS
726OPENJDK_BUILD_LDFLAGS_HASH_STYLE
727OPENJDK_BUILD_LDFLAGS_CXX_JDK
728OPENJDK_BUILD_JDKEXE_LIBS
729OPENJDK_BUILD_JDKLIB_LIBS
730OPENJDK_BUILD_LDFLAGS_JDKEXE
731OPENJDK_BUILD_LDFLAGS_JDKLIB
732OPENJDK_BUILD_CXXFLAGS_JDKEXE
733OPENJDK_BUILD_CXXFLAGS_JDKLIB
734OPENJDK_BUILD_CFLAGS_JDKEXE
735OPENJDK_BUILD_CFLAGS_JDKLIB
736OPENJDK_BUILD_CXXSTD_CXXFLAG
737JVM_LIBS
738JVM_ASFLAGS
739JVM_LDFLAGS
740JVM_CFLAGS
741LDFLAGS_HASH_STYLE
742LDFLAGS_CXX_JDK
743JDKEXE_LIBS
744JDKLIB_LIBS
745LDFLAGS_JDKEXE
746LDFLAGS_JDKLIB
747CXXFLAGS_JDKEXE
748CXXFLAGS_JDKLIB
749CFLAGS_JDKEXE
750CFLAGS_JDKLIB
751MACOSX_VERSION_MIN
752CXXSTD_CXXFLAG
753CXX_O_FLAG_SIZE
754CXX_O_FLAG_NONE
755CXX_O_FLAG_DEBUG
756CXX_O_FLAG_NORM
757CXX_O_FLAG_HI
758CXX_O_FLAG_HIGHEST
759CXX_O_FLAG_HIGHEST_JVM
760C_O_FLAG_SIZE
761C_O_FLAG_NONE
762C_O_FLAG_DEBUG
763C_O_FLAG_NORM
764C_O_FLAG_HI
765C_O_FLAG_HIGHEST
766C_O_FLAG_HIGHEST_JVM
767JVM_CFLAGS_SYMBOLS
768CXXFLAGS_DEBUG_SYMBOLS
769CFLAGS_DEBUG_SYMBOLS
770CXX_FLAG_DEPS
771C_FLAG_DEPS
772SHARED_LIBRARY_FLAGS
773SET_SHARED_LIBRARY_MAPFILE
774SET_SHARED_LIBRARY_NAME
775SET_SHARED_LIBRARY_ORIGIN
776SET_EXECUTABLE_ORIGIN
777CXX_FLAG_REORDER
778C_FLAG_REORDER
779JVM_RCFLAGS
780RC_FLAGS
781AR_OUT_OPTION
782LD_OUT_OPTION
783EXE_OUT_OPTION
784CC_OUT_OPTION
785STRIPFLAGS
786ARFLAGS
787COMPILER_BINDCMD_FILE_FLAG
788COMPILER_COMMAND_FILE_FLAG
789COMPILER_TARGET_BITS_FLAG
790JT_HOME
791JTREGEXE
792HOTSPOT_TOOLCHAIN_TYPE
793USING_BROKEN_SUSE_LD
794PACKAGE_PATH
795USE_CLANG
796HOTSPOT_LD
797HOTSPOT_CXX
798HOTSPOT_RC
799HOTSPOT_MT
800BUILD_AS
801BUILD_LDCXX
802BUILD_LD
803BUILD_STRIP
804BUILD_OBJCOPY
805BUILD_AR
806BUILD_NM
807BUILD_CXX
808BUILD_CC
809BUILD_SYSROOT_LDFLAGS
810BUILD_SYSROOT_CFLAGS
811ac_ct_OBJDUMP
812OBJDUMP
813ac_ct_OBJCOPY
814OBJCOPY
815ac_ct_NM
816ac_ct_STRIP
817GNM
818NM
819STRIP
820MSBUILD
821DUMPBIN
822RC
823MT
824LIPO
825ac_ct_AR
826AR
827AS
828LDCXX
829LD
830CXXCPP
831CPP
832CXX_VERSION_NUMBER
833CC_VERSION_NUMBER
834ac_ct_CXX
835CXXFLAGS
836CXX
837TOOLCHAIN_PATH_CXX
838POTENTIAL_CXX
839OBJEXT
840EXEEXT
841ac_ct_CC
842CPPFLAGS
843LDFLAGS
844CFLAGS
845CC
846TOOLCHAIN_PATH_CC
847POTENTIAL_CC
848TOOLCHAIN_VERSION
849VS_LIB
850VS_INCLUDE
851VS_PATH
852CYGWIN_LINK
853SYSROOT_LDFLAGS
854SYSROOT_CFLAGS
855EXTRA_LDFLAGS
856EXTRA_CXXFLAGS
857EXTRA_CFLAGS
858LEGACY_EXTRA_LDFLAGS
859LEGACY_EXTRA_CXXFLAGS
860LEGACY_EXTRA_CFLAGS
861EXE_SUFFIX
862OBJ_SUFFIX
863STATIC_LIBRARY
864SHARED_LIBRARY
865STATIC_LIBRARY_SUFFIX
866SHARED_LIBRARY_SUFFIX
867LIBRARY_PREFIX
868TOOLCHAIN_TYPE
869STATIC_BUILD
870IMPORT_MODULES_MAKE
871IMPORT_MODULES_SRC
872IMPORT_MODULES_CONF
873IMPORT_MODULES_LIBS
874IMPORT_MODULES_CMDS
875IMPORT_MODULES_CLASSES
876BUILD_HOTSPOT
877HOTSPOT_DIST
878BUILD_OUTPUT
879JDK_TOPDIR
880NASHORN_TOPDIR
881HOTSPOT_TOPDIR
882JAXWS_TOPDIR
883JAXP_TOPDIR
884CORBA_TOPDIR
885LANGTOOLS_TOPDIR
886EXTERNAL_BUILDJDK
887BUILD_JDK
888CREATE_BUILDJDK
889JLINK
890JMOD
891BOOT_JDK_BITS
892JAVAC_FLAGS
893BOOT_JDK_MODULAR
894BOOT_JDK_SOURCETARGET
895JARSIGNER
896JAR
897JAVAH
898JAVAC
899JAVA
900BOOT_JDK
901JAVA_CHECK
902JAVAC_CHECK
903VERSION_IS_GA
904VERSION_SHORT
905VERSION_STRING
906VERSION_NUMBER_FOUR_POSITIONS
907VERSION_NUMBER
908VERSION_OPT
909VERSION_BUILD
910VERSION_PRE
911VERSION_PATCH
912VERSION_SECURITY
913VERSION_MINOR
914VERSION_MAJOR
915MACOSX_BUNDLE_ID_BASE
916MACOSX_BUNDLE_NAME_BASE
917HOTSPOT_VM_DISTRO
918COMPANY_NAME
919JDK_RC_PLATFORM_NAME
920PRODUCT_SUFFIX
921PRODUCT_NAME
922LAUNCHER_NAME
923JLINK_KEEP_PACKAGED_MODULES
924COPYRIGHT_YEAR
925COMPRESS_JARS
926INCLUDE_SA
927UNLIMITED_CRYPTO
928CACERTS_FILE
929BUILD_HEADLESS
930SUPPORT_HEADFUL
931SUPPORT_HEADLESS
932DEFAULT_MAKE_TARGET
933OS_VERSION_MICRO
934OS_VERSION_MINOR
935OS_VERSION_MAJOR
936PKG_CONFIG
937BASH_ARGS
938SETFILE
939CODESIGN
940XATTR
941DSYMUTIL
942IS_GNU_TIME
943PATCH
944DTRACE
945TIME
946STAT
947HG
948READELF
949OTOOL
950LDD
951ZIP
952UNZIP
953TAR_SUPPORTS_TRANSFORM
954TAR_INCLUDE_PARAM
955TAR_CREATE_EXTRA_PARAM
956TAR_TYPE
957FIND_DELETE
958OUTPUT_SYNC
959OUTPUT_SYNC_SUPPORTED
960CHECK_TOOLSDIR_MAKE
961CHECK_TOOLSDIR_GMAKE
962CHECK_MAKE
963CHECK_GMAKE
964MAKE
965PKGHANDLER
966CONFIGURESUPPORT_OUTPUTDIR
967OUTPUT_ROOT
968CONF_NAME
969SPEC
970SDKROOT
971XCODEBUILD
972VALID_JVM_VARIANTS
973JVM_VARIANTS
974DEBUG_LEVEL
975HOTSPOT_DEBUG_LEVEL
976JDK_VARIANT
977USERNAME
978CANONICAL_TOPDIR
979ORIGINAL_TOPDIR
980TOPDIR
981PATH_SEP
982ZERO_ARCHDEF
983HOTSPOT_BUILD_CPU_DEFINE
984HOTSPOT_BUILD_CPU_ARCH
985HOTSPOT_BUILD_CPU
986HOTSPOT_BUILD_OS_TYPE
987HOTSPOT_BUILD_OS
988OPENJDK_BUILD_BUNDLE_PLATFORM
989OPENJDK_BUILD_CPU_BUNDLE
990OPENJDK_BUILD_OS_BUNDLE
991OPENJDK_BUILD_OS_EXPORT_DIR
992OPENJDK_BUILD_CPU_JLI_CFLAGS
993OPENJDK_BUILD_CPU_OSARCH
994OPENJDK_BUILD_CPU_ISADIR
995OPENJDK_BUILD_CPU_LIBDIR
996OPENJDK_BUILD_CPU_LEGACY_LIB
997OPENJDK_BUILD_CPU_LEGACY
998HOTSPOT_TARGET_CPU_DEFINE
999HOTSPOT_TARGET_CPU_ARCH
1000HOTSPOT_TARGET_CPU
1001HOTSPOT_TARGET_OS_TYPE
1002HOTSPOT_TARGET_OS
1003DEFINE_CROSS_COMPILE_ARCH
1004LP64
1005OPENJDK_TARGET_BUNDLE_PLATFORM
1006OPENJDK_TARGET_CPU_BUNDLE
1007OPENJDK_TARGET_OS_BUNDLE
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
1077GZIP
1078GUNZIP
1079HEAD
1080FIND
1081FILE
1082EXPR
1083ECHO
1084DIRNAME
1085DIFF
1086DATE
1087CUT
1088CP
1089COMM
1090CMP
1091CHMOD
1092CAT
1093BASH
1094BASENAME
1095DATE_WHEN_CONFIGURED
1096ORIGINAL_PATH
1097CONFIGURE_COMMAND_LINE
1098target_alias
1099host_alias
1100build_alias
1101LIBS
1102ECHO_T
1103ECHO_N
1104ECHO_C
1105DEFS
1106mandir
1107localedir
1108libdir
1109psdir
1110pdfdir
1111dvidir
1112htmldir
1113infodir
1114docdir
1115oldincludedir
1116includedir
1117localstatedir
1118sharedstatedir
1119sysconfdir
1120datadir
1121datarootdir
1122libexecdir
1123sbindir
1124bindir
1125program_transform_name
1126prefix
1127exec_prefix
1128PACKAGE_URL
1129PACKAGE_BUGREPORT
1130PACKAGE_STRING
1131PACKAGE_VERSION
1132PACKAGE_TARNAME
1133PACKAGE_NAME
1134PATH_SEPARATOR
1135SHELL'
1136ac_subst_files=''
1137ac_user_opts='
1138enable_option_checking
1139with_target_bits
1140enable_openjdk_only
1141with_custom_make_dir
1142with_jdk_variant
1143enable_debug
1144with_debug_level
1145with_jvm_variants
1146with_devkit
1147with_sys_root
1148with_sysroot
1149with_tools_dir
1150with_toolchain_path
1151with_extra_path
1152with_sdk_name
1153with_conf_name
1154with_output_sync
1155with_default_make_target
1156enable_headful
1157with_cacerts_file
1158enable_unlimited_crypto
1159with_copyright_year
1160enable_keep_packaged_modules
1161with_milestone
1162with_update_version
1163with_user_release_suffix
1164with_build_number
1165with_version_string
1166with_version_pre
1167with_version_opt
1168with_version_build
1169with_version_major
1170with_version_minor
1171with_version_security
1172with_version_patch
1173with_boot_jdk
1174with_build_jdk
1175with_add_source_root
1176with_override_source_root
1177with_adds_and_overrides
1178with_override_langtools
1179with_override_corba
1180with_override_jaxp
1181with_override_jaxws
1182with_override_hotspot
1183with_override_nashorn
1184with_override_jdk
1185with_import_hotspot
1186with_import_modules
1187enable_static_build
1188with_toolchain_type
1189with_extra_cflags
1190with_extra_cxxflags
1191with_extra_ldflags
1192with_toolchain_version
1193with_build_devkit
1194with_jtreg
1195enable_warnings_as_errors
1196with_native_debug_symbols
1197enable_debug_symbols
1198enable_zip_debug_info
1199enable_native_coverage
1200enable_dtrace
1201with_jvm_features
1202with_jvm_interpreter
1203enable_hotspot_gtest
1204with_stdc__lib
1205with_msvcr_dll
1206with_msvcp_dll
1207with_x
1208with_cups
1209with_cups_include
1210with_freetype
1211with_freetype_include
1212with_freetype_lib
1213with_freetype_src
1214enable_freetype_bundling
1215with_alsa
1216with_alsa_include
1217with_alsa_lib
1218with_libffi
1219with_libffi_include
1220with_libffi_lib
1221with_libjpeg
1222with_giflib
1223with_libpng
1224with_zlib
1225with_lcms
1226with_dxsdk
1227with_dxsdk_lib
1228with_dxsdk_include
1229enable_jtreg_failure_handler
1230enable_generate_classlist
1231with_num_cores
1232with_memory_size
1233with_jobs
1234with_test_jobs
1235with_boot_jdk_jvmargs
1236with_sjavac_server_java
1237enable_sjavac
1238enable_javac_server
1239enable_icecc
1240enable_precompiled_headers
1241enable_ccache
1242with_ccache_dir
1243'
1244      ac_precious_vars='build_alias
1245host_alias
1246target_alias
1247BASENAME
1248BASH
1249CAT
1250CHMOD
1251CMP
1252COMM
1253CP
1254CUT
1255DATE
1256DIFF
1257DIRNAME
1258ECHO
1259EXPR
1260FILE
1261FIND
1262HEAD
1263GUNZIP
1264GZIP
1265LN
1266LS
1267MKDIR
1268MKTEMP
1269MV
1270NAWK
1271PRINTF
1272RM
1273RMDIR
1274SH
1275SORT
1276TAIL
1277TAR
1278TEE
1279TOUCH
1280TR
1281UNAME
1282UNIQ
1283WC
1284WHICH
1285XARGS
1286AWK
1287GREP
1288EGREP
1289FGREP
1290SED
1291CYGPATH
1292READLINK
1293DF
1294CPIO
1295NICE
1296MAKE
1297UNZIP
1298ZIP
1299LDD
1300OTOOL
1301READELF
1302HG
1303STAT
1304TIME
1305DTRACE
1306PATCH
1307DSYMUTIL
1308XATTR
1309CODESIGN
1310SETFILE
1311PKG_CONFIG
1312JAVA
1313JAVAC
1314JAVAH
1315JAR
1316JARSIGNER
1317CC
1318CFLAGS
1319LDFLAGS
1320LIBS
1321CPPFLAGS
1322CXX
1323CXXFLAGS
1324CCC
1325CPP
1326CXXCPP
1327AS
1328AR
1329LIPO
1330STRIP
1331NM
1332GNM
1333OBJCOPY
1334OBJDUMP
1335BUILD_CC
1336BUILD_CXX
1337BUILD_NM
1338BUILD_AR
1339BUILD_OBJCOPY
1340BUILD_STRIP
1341JTREGEXE
1342XMKMF
1343FREETYPE_CFLAGS
1344FREETYPE_LIBS
1345ALSA_CFLAGS
1346ALSA_LIBS
1347LIBFFI_CFLAGS
1348LIBFFI_LIBS
1349PNG_CFLAGS
1350PNG_LIBS
1351LCMS_CFLAGS
1352LCMS_LIBS
1353ICECC_CMD
1354ICECC_CREATE_ENV
1355ICECC_WRAPPER
1356CCACHE'
1357
1358
1359# Initialize some variables set by options.
1360ac_init_help=
1361ac_init_version=false
1362ac_unrecognized_opts=
1363ac_unrecognized_sep=
1364# The variables have the same names as the options, with
1365# dashes changed to underlines.
1366cache_file=/dev/null
1367exec_prefix=NONE
1368no_create=
1369no_recursion=
1370prefix=NONE
1371program_prefix=NONE
1372program_suffix=NONE
1373program_transform_name=s,x,x,
1374silent=
1375site=
1376srcdir=
1377verbose=
1378x_includes=NONE
1379x_libraries=NONE
1380
1381# Installation directory options.
1382# These are left unexpanded so users can "make install exec_prefix=/foo"
1383# and all the variables that are supposed to be based on exec_prefix
1384# by default will actually change.
1385# Use braces instead of parens because sh, perl, etc. also accept them.
1386# (The list follows the same order as the GNU Coding Standards.)
1387bindir='${exec_prefix}/bin'
1388sbindir='${exec_prefix}/sbin'
1389libexecdir='${exec_prefix}/libexec'
1390datarootdir='${prefix}/share'
1391datadir='${datarootdir}'
1392sysconfdir='${prefix}/etc'
1393sharedstatedir='${prefix}/com'
1394localstatedir='${prefix}/var'
1395includedir='${prefix}/include'
1396oldincludedir='/usr/include'
1397docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1398infodir='${datarootdir}/info'
1399htmldir='${docdir}'
1400dvidir='${docdir}'
1401pdfdir='${docdir}'
1402psdir='${docdir}'
1403libdir='${exec_prefix}/lib'
1404localedir='${datarootdir}/locale'
1405mandir='${datarootdir}/man'
1406
1407ac_prev=
1408ac_dashdash=
1409for ac_option
1410do
1411  # If the previous option needs an argument, assign it.
1412  if test -n "$ac_prev"; then
1413    eval $ac_prev=\$ac_option
1414    ac_prev=
1415    continue
1416  fi
1417
1418  case $ac_option in
1419  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1420  *=)   ac_optarg= ;;
1421  *)    ac_optarg=yes ;;
1422  esac
1423
1424  # Accept the important Cygnus configure options, so we can diagnose typos.
1425
1426  case $ac_dashdash$ac_option in
1427  --)
1428    ac_dashdash=yes ;;
1429
1430  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1431    ac_prev=bindir ;;
1432  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1433    bindir=$ac_optarg ;;
1434
1435  -build | --build | --buil | --bui | --bu)
1436    ac_prev=build_alias ;;
1437  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1438    build_alias=$ac_optarg ;;
1439
1440  -cache-file | --cache-file | --cache-fil | --cache-fi \
1441  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1442    ac_prev=cache_file ;;
1443  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1444  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1445    cache_file=$ac_optarg ;;
1446
1447  --config-cache | -C)
1448    cache_file=config.cache ;;
1449
1450  -datadir | --datadir | --datadi | --datad)
1451    ac_prev=datadir ;;
1452  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1453    datadir=$ac_optarg ;;
1454
1455  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1456  | --dataroo | --dataro | --datar)
1457    ac_prev=datarootdir ;;
1458  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1459  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1460    datarootdir=$ac_optarg ;;
1461
1462  -disable-* | --disable-*)
1463    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1464    # Reject names that are not valid shell variable names.
1465    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1466      as_fn_error $? "invalid feature name: $ac_useropt"
1467    ac_useropt_orig=$ac_useropt
1468    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1469    case $ac_user_opts in
1470      *"
1471"enable_$ac_useropt"
1472"*) ;;
1473      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1474	 ac_unrecognized_sep=', ';;
1475    esac
1476    eval enable_$ac_useropt=no ;;
1477
1478  -docdir | --docdir | --docdi | --doc | --do)
1479    ac_prev=docdir ;;
1480  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1481    docdir=$ac_optarg ;;
1482
1483  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1484    ac_prev=dvidir ;;
1485  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1486    dvidir=$ac_optarg ;;
1487
1488  -enable-* | --enable-*)
1489    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1490    # Reject names that are not valid shell variable names.
1491    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1492      as_fn_error $? "invalid feature name: $ac_useropt"
1493    ac_useropt_orig=$ac_useropt
1494    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1495    case $ac_user_opts in
1496      *"
1497"enable_$ac_useropt"
1498"*) ;;
1499      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1500	 ac_unrecognized_sep=', ';;
1501    esac
1502    eval enable_$ac_useropt=\$ac_optarg ;;
1503
1504  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1505  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1506  | --exec | --exe | --ex)
1507    ac_prev=exec_prefix ;;
1508  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1509  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1510  | --exec=* | --exe=* | --ex=*)
1511    exec_prefix=$ac_optarg ;;
1512
1513  -gas | --gas | --ga | --g)
1514    # Obsolete; use --with-gas.
1515    with_gas=yes ;;
1516
1517  -help | --help | --hel | --he | -h)
1518    ac_init_help=long ;;
1519  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1520    ac_init_help=recursive ;;
1521  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1522    ac_init_help=short ;;
1523
1524  -host | --host | --hos | --ho)
1525    ac_prev=host_alias ;;
1526  -host=* | --host=* | --hos=* | --ho=*)
1527    host_alias=$ac_optarg ;;
1528
1529  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1530    ac_prev=htmldir ;;
1531  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1532  | --ht=*)
1533    htmldir=$ac_optarg ;;
1534
1535  -includedir | --includedir | --includedi | --included | --include \
1536  | --includ | --inclu | --incl | --inc)
1537    ac_prev=includedir ;;
1538  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1539  | --includ=* | --inclu=* | --incl=* | --inc=*)
1540    includedir=$ac_optarg ;;
1541
1542  -infodir | --infodir | --infodi | --infod | --info | --inf)
1543    ac_prev=infodir ;;
1544  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1545    infodir=$ac_optarg ;;
1546
1547  -libdir | --libdir | --libdi | --libd)
1548    ac_prev=libdir ;;
1549  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1550    libdir=$ac_optarg ;;
1551
1552  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1553  | --libexe | --libex | --libe)
1554    ac_prev=libexecdir ;;
1555  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1556  | --libexe=* | --libex=* | --libe=*)
1557    libexecdir=$ac_optarg ;;
1558
1559  -localedir | --localedir | --localedi | --localed | --locale)
1560    ac_prev=localedir ;;
1561  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1562    localedir=$ac_optarg ;;
1563
1564  -localstatedir | --localstatedir | --localstatedi | --localstated \
1565  | --localstate | --localstat | --localsta | --localst | --locals)
1566    ac_prev=localstatedir ;;
1567  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1568  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1569    localstatedir=$ac_optarg ;;
1570
1571  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1572    ac_prev=mandir ;;
1573  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1574    mandir=$ac_optarg ;;
1575
1576  -nfp | --nfp | --nf)
1577    # Obsolete; use --without-fp.
1578    with_fp=no ;;
1579
1580  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1581  | --no-cr | --no-c | -n)
1582    no_create=yes ;;
1583
1584  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1585  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1586    no_recursion=yes ;;
1587
1588  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1589  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1590  | --oldin | --oldi | --old | --ol | --o)
1591    ac_prev=oldincludedir ;;
1592  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1593  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1594  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1595    oldincludedir=$ac_optarg ;;
1596
1597  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1598    ac_prev=prefix ;;
1599  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1600    prefix=$ac_optarg ;;
1601
1602  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1603  | --program-pre | --program-pr | --program-p)
1604    ac_prev=program_prefix ;;
1605  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1606  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1607    program_prefix=$ac_optarg ;;
1608
1609  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1610  | --program-suf | --program-su | --program-s)
1611    ac_prev=program_suffix ;;
1612  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1613  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1614    program_suffix=$ac_optarg ;;
1615
1616  -program-transform-name | --program-transform-name \
1617  | --program-transform-nam | --program-transform-na \
1618  | --program-transform-n | --program-transform- \
1619  | --program-transform | --program-transfor \
1620  | --program-transfo | --program-transf \
1621  | --program-trans | --program-tran \
1622  | --progr-tra | --program-tr | --program-t)
1623    ac_prev=program_transform_name ;;
1624  -program-transform-name=* | --program-transform-name=* \
1625  | --program-transform-nam=* | --program-transform-na=* \
1626  | --program-transform-n=* | --program-transform-=* \
1627  | --program-transform=* | --program-transfor=* \
1628  | --program-transfo=* | --program-transf=* \
1629  | --program-trans=* | --program-tran=* \
1630  | --progr-tra=* | --program-tr=* | --program-t=*)
1631    program_transform_name=$ac_optarg ;;
1632
1633  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1634    ac_prev=pdfdir ;;
1635  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1636    pdfdir=$ac_optarg ;;
1637
1638  -psdir | --psdir | --psdi | --psd | --ps)
1639    ac_prev=psdir ;;
1640  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1641    psdir=$ac_optarg ;;
1642
1643  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1644  | -silent | --silent | --silen | --sile | --sil)
1645    silent=yes ;;
1646
1647  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1648    ac_prev=sbindir ;;
1649  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1650  | --sbi=* | --sb=*)
1651    sbindir=$ac_optarg ;;
1652
1653  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1654  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1655  | --sharedst | --shareds | --shared | --share | --shar \
1656  | --sha | --sh)
1657    ac_prev=sharedstatedir ;;
1658  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1659  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1660  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1661  | --sha=* | --sh=*)
1662    sharedstatedir=$ac_optarg ;;
1663
1664  -site | --site | --sit)
1665    ac_prev=site ;;
1666  -site=* | --site=* | --sit=*)
1667    site=$ac_optarg ;;
1668
1669  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1670    ac_prev=srcdir ;;
1671  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1672    srcdir=$ac_optarg ;;
1673
1674  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1675  | --syscon | --sysco | --sysc | --sys | --sy)
1676    ac_prev=sysconfdir ;;
1677  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1678  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1679    sysconfdir=$ac_optarg ;;
1680
1681  -target | --target | --targe | --targ | --tar | --ta | --t)
1682    ac_prev=target_alias ;;
1683  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1684    target_alias=$ac_optarg ;;
1685
1686  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1687    verbose=yes ;;
1688
1689  -version | --version | --versio | --versi | --vers | -V)
1690    ac_init_version=: ;;
1691
1692  -with-* | --with-*)
1693    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1694    # Reject names that are not valid shell variable names.
1695    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1696      as_fn_error $? "invalid package name: $ac_useropt"
1697    ac_useropt_orig=$ac_useropt
1698    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1699    case $ac_user_opts in
1700      *"
1701"with_$ac_useropt"
1702"*) ;;
1703      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1704	 ac_unrecognized_sep=', ';;
1705    esac
1706    eval with_$ac_useropt=\$ac_optarg ;;
1707
1708  -without-* | --without-*)
1709    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1710    # Reject names that are not valid shell variable names.
1711    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1712      as_fn_error $? "invalid package name: $ac_useropt"
1713    ac_useropt_orig=$ac_useropt
1714    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1715    case $ac_user_opts in
1716      *"
1717"with_$ac_useropt"
1718"*) ;;
1719      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1720	 ac_unrecognized_sep=', ';;
1721    esac
1722    eval with_$ac_useropt=no ;;
1723
1724  --x)
1725    # Obsolete; use --with-x.
1726    with_x=yes ;;
1727
1728  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1729  | --x-incl | --x-inc | --x-in | --x-i)
1730    ac_prev=x_includes ;;
1731  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1732  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1733    x_includes=$ac_optarg ;;
1734
1735  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1736  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1737    ac_prev=x_libraries ;;
1738  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1739  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1740    x_libraries=$ac_optarg ;;
1741
1742  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1743Try \`$0 --help' for more information"
1744    ;;
1745
1746  *=*)
1747    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1748    # Reject names that are not valid shell variable names.
1749    case $ac_envvar in #(
1750      '' | [0-9]* | *[!_$as_cr_alnum]* )
1751      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1752    esac
1753    eval $ac_envvar=\$ac_optarg
1754    export $ac_envvar ;;
1755
1756  *)
1757    # FIXME: should be removed in autoconf 3.0.
1758    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1759    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1760      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1761    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1762    ;;
1763
1764  esac
1765done
1766
1767if test -n "$ac_prev"; then
1768  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1769  as_fn_error $? "missing argument to $ac_option"
1770fi
1771
1772if test -n "$ac_unrecognized_opts"; then
1773  case $enable_option_checking in
1774    no) ;;
1775    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1776    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1777  esac
1778fi
1779
1780# Check all directory arguments for consistency.
1781for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1782		datadir sysconfdir sharedstatedir localstatedir includedir \
1783		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1784		libdir localedir mandir
1785do
1786  eval ac_val=\$$ac_var
1787  # Remove trailing slashes.
1788  case $ac_val in
1789    */ )
1790      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1791      eval $ac_var=\$ac_val;;
1792  esac
1793  # Be sure to have absolute directory names.
1794  case $ac_val in
1795    [\\/$]* | ?:[\\/]* )  continue;;
1796    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1797  esac
1798  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1799done
1800
1801# There might be people who depend on the old broken behavior: `$host'
1802# used to hold the argument of --host etc.
1803# FIXME: To remove some day.
1804build=$build_alias
1805host=$host_alias
1806target=$target_alias
1807
1808# FIXME: To remove some day.
1809if test "x$host_alias" != x; then
1810  if test "x$build_alias" = x; then
1811    cross_compiling=maybe
1812  elif test "x$build_alias" != "x$host_alias"; then
1813    cross_compiling=yes
1814  fi
1815fi
1816
1817ac_tool_prefix=
1818test -n "$host_alias" && ac_tool_prefix=$host_alias-
1819
1820test "$silent" = yes && exec 6>/dev/null
1821
1822
1823ac_pwd=`pwd` && test -n "$ac_pwd" &&
1824ac_ls_di=`ls -di .` &&
1825ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1826  as_fn_error $? "working directory cannot be determined"
1827test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1828  as_fn_error $? "pwd does not report name of working directory"
1829
1830
1831# Find the source files, if location was not specified.
1832if test -z "$srcdir"; then
1833  ac_srcdir_defaulted=yes
1834  # Try the directory containing this script, then the parent directory.
1835  ac_confdir=`$as_dirname -- "$as_myself" ||
1836$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1837	 X"$as_myself" : 'X\(//\)[^/]' \| \
1838	 X"$as_myself" : 'X\(//\)$' \| \
1839	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1840$as_echo X"$as_myself" |
1841    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\/\)[^/].*/{
1846	    s//\1/
1847	    q
1848	  }
1849	  /^X\(\/\/\)$/{
1850	    s//\1/
1851	    q
1852	  }
1853	  /^X\(\/\).*/{
1854	    s//\1/
1855	    q
1856	  }
1857	  s/.*/./; q'`
1858  srcdir=$ac_confdir
1859  if test ! -r "$srcdir/$ac_unique_file"; then
1860    srcdir=..
1861  fi
1862else
1863  ac_srcdir_defaulted=no
1864fi
1865if test ! -r "$srcdir/$ac_unique_file"; then
1866  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1867  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1868fi
1869ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1870ac_abs_confdir=`(
1871	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1872	pwd)`
1873# When building in place, set srcdir=.
1874if test "$ac_abs_confdir" = "$ac_pwd"; then
1875  srcdir=.
1876fi
1877# Remove unnecessary trailing slashes from srcdir.
1878# Double slashes in file names in object file debugging info
1879# mess up M-x gdb in Emacs.
1880case $srcdir in
1881*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1882esac
1883for ac_var in $ac_precious_vars; do
1884  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1885  eval ac_env_${ac_var}_value=\$${ac_var}
1886  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1887  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1888done
1889
1890#
1891# Report the --help message.
1892#
1893if test "$ac_init_help" = "long"; then
1894  # Omit some internal or obsolete options to make the list less imposing.
1895  # This message is too long to be a string in the A/UX 3.1 sh.
1896  cat <<_ACEOF
1897\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1898
1899Usage: $0 [OPTION]... [VAR=VALUE]...
1900
1901To assign environment variables (e.g., CC, CFLAGS...), specify them as
1902VAR=VALUE.  See below for descriptions of some of the useful variables.
1903
1904Defaults for the options are specified in brackets.
1905
1906Configuration:
1907  -h, --help              display this help and exit
1908      --help=short        display options specific to this package
1909      --help=recursive    display the short help of all the included packages
1910  -V, --version           display version information and exit
1911  -q, --quiet, --silent   do not print \`checking ...' messages
1912      --cache-file=FILE   cache test results in FILE [disabled]
1913  -C, --config-cache      alias for \`--cache-file=config.cache'
1914  -n, --no-create         do not create output files
1915      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1916
1917Installation directories:
1918  --prefix=PREFIX         install architecture-independent files in PREFIX
1919                          [$ac_default_prefix]
1920  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1921                          [PREFIX]
1922
1923By default, \`make install' will install all the files in
1924\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1925an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1926for instance \`--prefix=\$HOME'.
1927
1928For better control, use the options below.
1929
1930Fine tuning of the installation directories:
1931  --bindir=DIR            user executables [EPREFIX/bin]
1932  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1933  --libexecdir=DIR        program executables [EPREFIX/libexec]
1934  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1935  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1936  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1937  --libdir=DIR            object code libraries [EPREFIX/lib]
1938  --includedir=DIR        C header files [PREFIX/include]
1939  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1940  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1941  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1942  --infodir=DIR           info documentation [DATAROOTDIR/info]
1943  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1944  --mandir=DIR            man documentation [DATAROOTDIR/man]
1945  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1946  --htmldir=DIR           html documentation [DOCDIR]
1947  --dvidir=DIR            dvi documentation [DOCDIR]
1948  --pdfdir=DIR            pdf documentation [DOCDIR]
1949  --psdir=DIR             ps documentation [DOCDIR]
1950_ACEOF
1951
1952  cat <<\_ACEOF
1953
1954X features:
1955  --x-includes=DIR    X include files are in DIR
1956  --x-libraries=DIR   X library files are in DIR
1957
1958System types:
1959  --build=BUILD     configure for building on BUILD [guessed]
1960  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1961  --target=TARGET   configure for building compilers for TARGET [HOST]
1962_ACEOF
1963fi
1964
1965if test -n "$ac_init_help"; then
1966  case $ac_init_help in
1967     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1968   esac
1969  cat <<\_ACEOF
1970
1971Optional Features:
1972  --disable-option-checking  ignore unrecognized --enable/--with options
1973  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1974  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1975  --enable-openjdk-only   suppress building custom source even if present
1976                          [disabled]
1977  --enable-debug          set the debug level to fastdebug (shorthand for
1978                          --with-debug-level=fastdebug) [disabled]
1979  --disable-headful       disable building headful support (graphical UI
1980                          support) [enabled]
1981  --enable-unlimited-crypto
1982                          Enable unlimited crypto policy [disabled]
1983  --disable-keep-packaged-modules
1984                          Do not keep packaged modules in jdk image [enable]
1985  --enable-static-build   enable static library build [disabled]
1986  --disable-warnings-as-errors
1987                          do not consider native warnings to be an error
1988                          [enabled]
1989  --enable-debug-symbols  Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --enable-zip-debug-info Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --enable-native-coverage
1994                          enable native compilation with code coverage
1995                          data[disabled]
1996  --enable-dtrace[=yes/no/auto]
1997                          enable dtrace. Default is auto, where dtrace is
1998                          enabled if all dependencies are present.
1999  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2000  --disable-freetype-bundling
2001                          disable bundling of the freetype library with the
2002                          build result [enabled on Windows or when using
2003                          --with-freetype, disabled otherwise]
2004  --enable-jtreg-failure-handler
2005                          forces build of the jtreg failure handler to be
2006                          enabled, missing dependencies become fatal errors.
2007                          Default is auto, where the failure handler is built
2008                          if all dependencies are present and otherwise just
2009                          disabled.
2010  --disable-generate-classlist
2011                          forces enabling or disabling of the generation of a
2012                          CDS classlist at build time. Default is to generate
2013                          it when either the server or client JVMs are built.
2014  --enable-sjavac         use sjavac to do fast incremental compiles
2015                          [disabled]
2016  --disable-javac-server  disable javac server [enabled]
2017  --enable-icecc          enable distribted compilation of native code using
2018                          icecc/icecream [disabled]
2019  --disable-precompiled-headers
2020                          disable using precompiled headers when compiling C++
2021                          [enabled]
2022  --enable-ccache         enable using ccache to speed up recompilations
2023                          [disabled]
2024
2025Optional Packages:
2026  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2027  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2028  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2029                          support it), e.g. --with-target-bits=32 [guessed]
2030  --with-custom-make-dir  Deprecated. Option is kept for backwards
2031                          compatibility and is ignored
2032  --with-jdk-variant      JDK variant to build (normal) [normal]
2033  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2034                          optimized) [release]
2035  --with-jvm-variants     JVM variants (separated by commas) to build
2036                          (server,client,minimal,core,zero,zeroshark,custom)
2037                          [server]
2038  --with-devkit           use this devkit for compilers, tools and resources
2039  --with-sys-root         alias for --with-sysroot for backwards compatability
2040  --with-sysroot          use this directory as sysroot
2041  --with-tools-dir        alias for --with-toolchain-path for backwards
2042                          compatibility
2043  --with-toolchain-path   prepend these directories when searching for
2044                          toolchain binaries (compilers etc)
2045  --with-extra-path       prepend these directories to the default path
2046  --with-sdk-name         use the platform SDK of the given name. [macosx]
2047  --with-conf-name        use this as the name of the configuration [generated
2048                          from important configuration options]
2049  --with-output-sync      set make output sync type if supported by make.
2050                          [recurse]
2051  --with-default-make-target
2052                          set the default make target [exploded-image]
2053  --with-cacerts-file     specify alternative cacerts file
2054  --with-copyright-year   Set copyright year value for build [current year]
2055  --with-milestone        Deprecated. Option is kept for backwards
2056                          compatibility and is ignored
2057  --with-update-version   Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-user-release-suffix
2060                          Deprecated. Option is kept for backwards
2061                          compatibility and is ignored
2062  --with-build-number     Deprecated. Option is kept for backwards
2063                          compatibility and is ignored
2064  --with-version-string   Set version string [calculated]
2065  --with-version-pre      Set the base part of the version 'PRE' field
2066                          (pre-release identifier) ['internal']
2067  --with-version-opt      Set version 'OPT' field (build metadata)
2068                          [<timestamp>.<user>.<dirname>]
2069  --with-version-build    Set version 'BUILD' field (build number) [not
2070                          specified]
2071  --with-version-major    Set version 'MAJOR' field (first number) [current
2072                          source value]
2073  --with-version-minor    Set version 'MINOR' field (second number) [current
2074                          source value]
2075  --with-version-security Set version 'SECURITY' field (third number) [current
2076                          source value]
2077  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2078                          specified]
2079  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2080  --with-build-jdk        path to JDK of same version as is being built[the
2081                          newly built JDK]
2082  --with-add-source-root  Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-override-source-root
2085                          Deprecated. Option is kept for backwards
2086                          compatibility and is ignored
2087  --with-adds-and-overrides
2088                          Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-langtools
2091                          Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-corba   Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-jaxp    Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-jaxws   Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-hotspot Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-nashorn Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-jdk     Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-import-hotspot   import hotspot binaries from this jdk image or
2106                          hotspot build dist dir instead of building from
2107                          source
2108  --with-import-modules   import a set of prebuilt modules either as a zip
2109                          file or an exploded directory
2110  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2111                          to show possible values [platform dependent]
2112  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2113  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2114  --with-extra-ldflags    extra flags to be used when linking jdk
2115  --with-toolchain-version
2116                          the version of the toolchain to look for, use
2117                          '--help' to show possible values [platform
2118                          dependent]
2119  --with-build-devkit     Devkit to use for the build platform toolchain
2120  --with-jtreg            Regression Test Harness [probed]
2121  --with-native-debug-symbols
2122                          set the native debug symbol configuration (none,
2123                          internal, external, zipped) [varying]
2124  --with-jvm-features     additional JVM features to enable (separated by
2125                          comma), use '--help' to show possible values [none]
2126  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2127                          compatibility and is ignored
2128  --with-stdc++lib=<static>,<dynamic>,<default>
2129                          force linking of the C++ runtime on Linux to either
2130                          static or dynamic, default is static with dynamic as
2131                          fallback
2132  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2133                          (Windows only) [probed]
2134  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2135                          (Windows only) [probed]
2136  --with-x                use the X Window System
2137  --with-cups             specify prefix directory for the cups package
2138                          (expecting the headers under PATH/include)
2139  --with-cups-include     specify directory for the cups include files
2140  --with-freetype         specify prefix directory for the freetype package
2141                          (expecting the libraries under PATH/lib and the
2142                          headers under PATH/include)
2143  --with-freetype-include specify directory for the freetype include files
2144  --with-freetype-lib     specify directory for the freetype library
2145  --with-freetype-src     specify directory with freetype sources to
2146                          automatically build the library (experimental,
2147                          Windows-only)
2148  --with-alsa             specify prefix directory for the alsa package
2149                          (expecting the libraries under PATH/lib and the
2150                          headers under PATH/include)
2151  --with-alsa-include     specify directory for the alsa include files
2152  --with-alsa-lib         specify directory for the alsa library
2153  --with-libffi           specify prefix directory for the libffi package
2154                          (expecting the libraries under PATH/lib and the
2155                          headers under PATH/include)
2156  --with-libffi-include   specify directory for the libffi include files
2157  --with-libffi-lib       specify directory for the libffi library
2158  --with-libjpeg          use libjpeg from build system or OpenJDK source
2159                          (system, bundled) [bundled]
2160  --with-giflib           use giflib from build system or OpenJDK source
2161                          (system, bundled) [bundled]
2162  --with-libpng           use libpng from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-zlib             use zlib from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-lcms             use lcms2 from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-dxsdk            Deprecated. Option is kept for backwards
2169                          compatibility and is ignored
2170  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2171                          compatibility and is ignored
2172  --with-dxsdk-include    Deprecated. Option is kept for backwards
2173                          compatibility and is ignored
2174  --with-num-cores        number of cores in the build system, e.g.
2175                          --with-num-cores=8 [probed]
2176  --with-memory-size      memory (in MB) available in the build system, e.g.
2177                          --with-memory-size=1024 [probed]
2178  --with-jobs             number of parallel jobs to let make run [calculated
2179                          based on cores and memory]
2180  --with-test-jobs        number of parallel tests jobs to run [based on build
2181                          jobs]
2182  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2183                          invocations of boot JDK, overriding the default
2184                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2185                          -enableassertions"
2186  --with-sjavac-server-java
2187                          use this java binary for running the sjavac
2188                          background server [Boot JDK java]
2189  --with-ccache-dir       where to store ccache files [~/.ccache]
2190
2191Some influential environment variables:
2192  BASENAME    Override default value for BASENAME
2193  BASH        Override default value for BASH
2194  CAT         Override default value for CAT
2195  CHMOD       Override default value for CHMOD
2196  CMP         Override default value for CMP
2197  COMM        Override default value for COMM
2198  CP          Override default value for CP
2199  CUT         Override default value for CUT
2200  DATE        Override default value for DATE
2201  DIFF        Override default value for DIFF
2202  DIRNAME     Override default value for DIRNAME
2203  ECHO        Override default value for ECHO
2204  EXPR        Override default value for EXPR
2205  FILE        Override default value for FILE
2206  FIND        Override default value for FIND
2207  HEAD        Override default value for HEAD
2208  GUNZIP      Override default value for GUNZIP
2209  GZIP        Override default value for GZIP
2210  LN          Override default value for LN
2211  LS          Override default value for LS
2212  MKDIR       Override default value for MKDIR
2213  MKTEMP      Override default value for MKTEMP
2214  MV          Override default value for MV
2215  NAWK        Override default value for NAWK
2216  PRINTF      Override default value for PRINTF
2217  RM          Override default value for RM
2218  RMDIR       Override default value for RMDIR
2219  SH          Override default value for SH
2220  SORT        Override default value for SORT
2221  TAIL        Override default value for TAIL
2222  TAR         Override default value for TAR
2223  TEE         Override default value for TEE
2224  TOUCH       Override default value for TOUCH
2225  TR          Override default value for TR
2226  UNAME       Override default value for UNAME
2227  UNIQ        Override default value for UNIQ
2228  WC          Override default value for WC
2229  WHICH       Override default value for WHICH
2230  XARGS       Override default value for XARGS
2231  AWK         Override default value for AWK
2232  GREP        Override default value for GREP
2233  EGREP       Override default value for EGREP
2234  FGREP       Override default value for FGREP
2235  SED         Override default value for SED
2236  CYGPATH     Override default value for CYGPATH
2237  READLINK    Override default value for READLINK
2238  DF          Override default value for DF
2239  CPIO        Override default value for CPIO
2240  NICE        Override default value for NICE
2241  MAKE        Override default value for MAKE
2242  UNZIP       Override default value for UNZIP
2243  ZIP         Override default value for ZIP
2244  LDD         Override default value for LDD
2245  OTOOL       Override default value for OTOOL
2246  READELF     Override default value for READELF
2247  HG          Override default value for HG
2248  STAT        Override default value for STAT
2249  TIME        Override default value for TIME
2250  DTRACE      Override default value for DTRACE
2251  PATCH       Override default value for PATCH
2252  DSYMUTIL    Override default value for DSYMUTIL
2253  XATTR       Override default value for XATTR
2254  CODESIGN    Override default value for CODESIGN
2255  SETFILE     Override default value for SETFILE
2256  PKG_CONFIG  path to pkg-config utility
2257  JAVA        Override default value for JAVA
2258  JAVAC       Override default value for JAVAC
2259  JAVAH       Override default value for JAVAH
2260  JAR         Override default value for JAR
2261  JARSIGNER   Override default value for JARSIGNER
2262  CC          C compiler command
2263  CFLAGS      C compiler flags
2264  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2265              nonstandard directory <lib dir>
2266  LIBS        libraries to pass to the linker, e.g. -l<library>
2267  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2268              you have headers in a nonstandard directory <include dir>
2269  CXX         C++ compiler command
2270  CXXFLAGS    C++ compiler flags
2271  CPP         C preprocessor
2272  CXXCPP      C++ preprocessor
2273  AS          Override default value for AS
2274  AR          Override default value for AR
2275  LIPO        Override default value for LIPO
2276  STRIP       Override default value for STRIP
2277  NM          Override default value for NM
2278  GNM         Override default value for GNM
2279  OBJCOPY     Override default value for OBJCOPY
2280  OBJDUMP     Override default value for OBJDUMP
2281  BUILD_CC    Override default value for BUILD_CC
2282  BUILD_CXX   Override default value for BUILD_CXX
2283  BUILD_NM    Override default value for BUILD_NM
2284  BUILD_AR    Override default value for BUILD_AR
2285  BUILD_OBJCOPY
2286              Override default value for BUILD_OBJCOPY
2287  BUILD_STRIP Override default value for BUILD_STRIP
2288  JTREGEXE    Override default value for JTREGEXE
2289  XMKMF       Path to xmkmf, Makefile generator for X Window System
2290  FREETYPE_CFLAGS
2291              C compiler flags for FREETYPE, overriding pkg-config
2292  FREETYPE_LIBS
2293              linker flags for FREETYPE, overriding pkg-config
2294  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2295  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2296  LIBFFI_CFLAGS
2297              C compiler flags for LIBFFI, overriding pkg-config
2298  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2299  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2300  PNG_LIBS    linker flags for PNG, overriding pkg-config
2301  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2302  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2303  ICECC_CMD   Override default value for ICECC_CMD
2304  ICECC_CREATE_ENV
2305              Override default value for ICECC_CREATE_ENV
2306  ICECC_WRAPPER
2307              Override default value for ICECC_WRAPPER
2308  CCACHE      Override default value for CCACHE
2309
2310Use these variables to override the choices made by `configure' or to help
2311it to find libraries and programs with nonstandard names/locations.
2312
2313Report bugs to <build-dev@openjdk.java.net>.
2314OpenJDK home page: <http://openjdk.java.net>.
2315_ACEOF
2316ac_status=$?
2317fi
2318
2319if test "$ac_init_help" = "recursive"; then
2320  # If there are subdirs, report their specific --help.
2321  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2322    test -d "$ac_dir" ||
2323      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2324      continue
2325    ac_builddir=.
2326
2327case "$ac_dir" in
2328.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2329*)
2330  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2331  # A ".." for each directory in $ac_dir_suffix.
2332  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2333  case $ac_top_builddir_sub in
2334  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2335  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2336  esac ;;
2337esac
2338ac_abs_top_builddir=$ac_pwd
2339ac_abs_builddir=$ac_pwd$ac_dir_suffix
2340# for backward compatibility:
2341ac_top_builddir=$ac_top_build_prefix
2342
2343case $srcdir in
2344  .)  # We are building in place.
2345    ac_srcdir=.
2346    ac_top_srcdir=$ac_top_builddir_sub
2347    ac_abs_top_srcdir=$ac_pwd ;;
2348  [\\/]* | ?:[\\/]* )  # Absolute name.
2349    ac_srcdir=$srcdir$ac_dir_suffix;
2350    ac_top_srcdir=$srcdir
2351    ac_abs_top_srcdir=$srcdir ;;
2352  *) # Relative name.
2353    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2354    ac_top_srcdir=$ac_top_build_prefix$srcdir
2355    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2356esac
2357ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2358
2359    cd "$ac_dir" || { ac_status=$?; continue; }
2360    # Check for guested configure.
2361    if test -f "$ac_srcdir/configure.gnu"; then
2362      echo &&
2363      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2364    elif test -f "$ac_srcdir/configure"; then
2365      echo &&
2366      $SHELL "$ac_srcdir/configure" --help=recursive
2367    else
2368      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2369    fi || ac_status=$?
2370    cd "$ac_pwd" || { ac_status=$?; break; }
2371  done
2372fi
2373
2374test -n "$ac_init_help" && exit $ac_status
2375if $ac_init_version; then
2376  cat <<\_ACEOF
2377OpenJDK configure jdk9
2378generated by GNU Autoconf 2.69
2379
2380Copyright (C) 2012 Free Software Foundation, Inc.
2381This configure script is free software; the Free Software Foundation
2382gives unlimited permission to copy, distribute and modify it.
2383_ACEOF
2384  exit
2385fi
2386
2387## ------------------------ ##
2388## Autoconf initialization. ##
2389## ------------------------ ##
2390
2391# ac_fn_c_try_compile LINENO
2392# --------------------------
2393# Try to compile conftest.$ac_ext, and return whether this succeeded.
2394ac_fn_c_try_compile ()
2395{
2396  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2397  rm -f conftest.$ac_objext
2398  if { { ac_try="$ac_compile"
2399case "(($ac_try" in
2400  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2401  *) ac_try_echo=$ac_try;;
2402esac
2403eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2404$as_echo "$ac_try_echo"; } >&5
2405  (eval "$ac_compile") 2>conftest.err
2406  ac_status=$?
2407  if test -s conftest.err; then
2408    grep -v '^ *+' conftest.err >conftest.er1
2409    cat conftest.er1 >&5
2410    mv -f conftest.er1 conftest.err
2411  fi
2412  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2413  test $ac_status = 0; } && {
2414	 test -z "$ac_c_werror_flag" ||
2415	 test ! -s conftest.err
2416       } && test -s conftest.$ac_objext; then :
2417  ac_retval=0
2418else
2419  $as_echo "$as_me: failed program was:" >&5
2420sed 's/^/| /' conftest.$ac_ext >&5
2421
2422	ac_retval=1
2423fi
2424  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2425  as_fn_set_status $ac_retval
2426
2427} # ac_fn_c_try_compile
2428
2429# ac_fn_cxx_try_compile LINENO
2430# ----------------------------
2431# Try to compile conftest.$ac_ext, and return whether this succeeded.
2432ac_fn_cxx_try_compile ()
2433{
2434  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2435  rm -f conftest.$ac_objext
2436  if { { ac_try="$ac_compile"
2437case "(($ac_try" in
2438  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2439  *) ac_try_echo=$ac_try;;
2440esac
2441eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2442$as_echo "$ac_try_echo"; } >&5
2443  (eval "$ac_compile") 2>conftest.err
2444  ac_status=$?
2445  if test -s conftest.err; then
2446    grep -v '^ *+' conftest.err >conftest.er1
2447    cat conftest.er1 >&5
2448    mv -f conftest.er1 conftest.err
2449  fi
2450  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2451  test $ac_status = 0; } && {
2452	 test -z "$ac_cxx_werror_flag" ||
2453	 test ! -s conftest.err
2454       } && test -s conftest.$ac_objext; then :
2455  ac_retval=0
2456else
2457  $as_echo "$as_me: failed program was:" >&5
2458sed 's/^/| /' conftest.$ac_ext >&5
2459
2460	ac_retval=1
2461fi
2462  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2463  as_fn_set_status $ac_retval
2464
2465} # ac_fn_cxx_try_compile
2466
2467# ac_fn_c_try_cpp LINENO
2468# ----------------------
2469# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2470ac_fn_c_try_cpp ()
2471{
2472  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2473  if { { ac_try="$ac_cpp conftest.$ac_ext"
2474case "(($ac_try" in
2475  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2476  *) ac_try_echo=$ac_try;;
2477esac
2478eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2479$as_echo "$ac_try_echo"; } >&5
2480  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2481  ac_status=$?
2482  if test -s conftest.err; then
2483    grep -v '^ *+' conftest.err >conftest.er1
2484    cat conftest.er1 >&5
2485    mv -f conftest.er1 conftest.err
2486  fi
2487  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2488  test $ac_status = 0; } > conftest.i && {
2489	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2490	 test ! -s conftest.err
2491       }; then :
2492  ac_retval=0
2493else
2494  $as_echo "$as_me: failed program was:" >&5
2495sed 's/^/| /' conftest.$ac_ext >&5
2496
2497    ac_retval=1
2498fi
2499  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2500  as_fn_set_status $ac_retval
2501
2502} # ac_fn_c_try_cpp
2503
2504# ac_fn_cxx_try_cpp LINENO
2505# ------------------------
2506# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2507ac_fn_cxx_try_cpp ()
2508{
2509  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2510  if { { ac_try="$ac_cpp conftest.$ac_ext"
2511case "(($ac_try" in
2512  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2513  *) ac_try_echo=$ac_try;;
2514esac
2515eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2516$as_echo "$ac_try_echo"; } >&5
2517  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2518  ac_status=$?
2519  if test -s conftest.err; then
2520    grep -v '^ *+' conftest.err >conftest.er1
2521    cat conftest.er1 >&5
2522    mv -f conftest.er1 conftest.err
2523  fi
2524  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2525  test $ac_status = 0; } > conftest.i && {
2526	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2527	 test ! -s conftest.err
2528       }; then :
2529  ac_retval=0
2530else
2531  $as_echo "$as_me: failed program was:" >&5
2532sed 's/^/| /' conftest.$ac_ext >&5
2533
2534    ac_retval=1
2535fi
2536  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2537  as_fn_set_status $ac_retval
2538
2539} # ac_fn_cxx_try_cpp
2540
2541# ac_fn_c_try_link LINENO
2542# -----------------------
2543# Try to link conftest.$ac_ext, and return whether this succeeded.
2544ac_fn_c_try_link ()
2545{
2546  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2547  rm -f conftest.$ac_objext conftest$ac_exeext
2548  if { { ac_try="$ac_link"
2549case "(($ac_try" in
2550  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2551  *) ac_try_echo=$ac_try;;
2552esac
2553eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2554$as_echo "$ac_try_echo"; } >&5
2555  (eval "$ac_link") 2>conftest.err
2556  ac_status=$?
2557  if test -s conftest.err; then
2558    grep -v '^ *+' conftest.err >conftest.er1
2559    cat conftest.er1 >&5
2560    mv -f conftest.er1 conftest.err
2561  fi
2562  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2563  test $ac_status = 0; } && {
2564	 test -z "$ac_c_werror_flag" ||
2565	 test ! -s conftest.err
2566       } && test -s conftest$ac_exeext && {
2567	 test "$cross_compiling" = yes ||
2568	 test -x conftest$ac_exeext
2569       }; then :
2570  ac_retval=0
2571else
2572  $as_echo "$as_me: failed program was:" >&5
2573sed 's/^/| /' conftest.$ac_ext >&5
2574
2575	ac_retval=1
2576fi
2577  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2578  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2579  # interfere with the next link command; also delete a directory that is
2580  # left behind by Apple's compiler.  We do this before executing the actions.
2581  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2582  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2583  as_fn_set_status $ac_retval
2584
2585} # ac_fn_c_try_link
2586
2587# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2588# ---------------------------------------------------------
2589# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2590# the include files in INCLUDES and setting the cache variable VAR
2591# accordingly.
2592ac_fn_cxx_check_header_mongrel ()
2593{
2594  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2595  if eval \${$3+:} false; then :
2596  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2597$as_echo_n "checking for $2... " >&6; }
2598if eval \${$3+:} false; then :
2599  $as_echo_n "(cached) " >&6
2600fi
2601eval ac_res=\$$3
2602	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2603$as_echo "$ac_res" >&6; }
2604else
2605  # Is the header compilable?
2606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2607$as_echo_n "checking $2 usability... " >&6; }
2608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2609/* end confdefs.h.  */
2610$4
2611#include <$2>
2612_ACEOF
2613if ac_fn_cxx_try_compile "$LINENO"; then :
2614  ac_header_compiler=yes
2615else
2616  ac_header_compiler=no
2617fi
2618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2620$as_echo "$ac_header_compiler" >&6; }
2621
2622# Is the header present?
2623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2624$as_echo_n "checking $2 presence... " >&6; }
2625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2626/* end confdefs.h.  */
2627#include <$2>
2628_ACEOF
2629if ac_fn_cxx_try_cpp "$LINENO"; then :
2630  ac_header_preproc=yes
2631else
2632  ac_header_preproc=no
2633fi
2634rm -f conftest.err conftest.i conftest.$ac_ext
2635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2636$as_echo "$ac_header_preproc" >&6; }
2637
2638# So?  What about this header?
2639case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2640  yes:no: )
2641    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2642$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2643    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2644$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2645    ;;
2646  no:yes:* )
2647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2648$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2650$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2652$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2653    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2654$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2655    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2656$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2657( $as_echo "## ----------------------------------------- ##
2658## Report this to build-dev@openjdk.java.net ##
2659## ----------------------------------------- ##"
2660     ) | sed "s/^/$as_me: WARNING:     /" >&2
2661    ;;
2662esac
2663  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2664$as_echo_n "checking for $2... " >&6; }
2665if eval \${$3+:} false; then :
2666  $as_echo_n "(cached) " >&6
2667else
2668  eval "$3=\$ac_header_compiler"
2669fi
2670eval ac_res=\$$3
2671	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2672$as_echo "$ac_res" >&6; }
2673fi
2674  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2675
2676} # ac_fn_cxx_check_header_mongrel
2677
2678# ac_fn_cxx_try_run LINENO
2679# ------------------------
2680# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2681# that executables *can* be run.
2682ac_fn_cxx_try_run ()
2683{
2684  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2685  if { { ac_try="$ac_link"
2686case "(($ac_try" in
2687  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2688  *) ac_try_echo=$ac_try;;
2689esac
2690eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2691$as_echo "$ac_try_echo"; } >&5
2692  (eval "$ac_link") 2>&5
2693  ac_status=$?
2694  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2695  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2696  { { case "(($ac_try" in
2697  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2698  *) ac_try_echo=$ac_try;;
2699esac
2700eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2701$as_echo "$ac_try_echo"; } >&5
2702  (eval "$ac_try") 2>&5
2703  ac_status=$?
2704  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2705  test $ac_status = 0; }; }; then :
2706  ac_retval=0
2707else
2708  $as_echo "$as_me: program exited with status $ac_status" >&5
2709       $as_echo "$as_me: failed program was:" >&5
2710sed 's/^/| /' conftest.$ac_ext >&5
2711
2712       ac_retval=$ac_status
2713fi
2714  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2715  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2716  as_fn_set_status $ac_retval
2717
2718} # ac_fn_cxx_try_run
2719
2720# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2721# ---------------------------------------------------------
2722# Tests whether HEADER exists and can be compiled using the include files in
2723# INCLUDES, setting the cache variable VAR accordingly.
2724ac_fn_cxx_check_header_compile ()
2725{
2726  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2728$as_echo_n "checking for $2... " >&6; }
2729if eval \${$3+:} false; then :
2730  $as_echo_n "(cached) " >&6
2731else
2732  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2733/* end confdefs.h.  */
2734$4
2735#include <$2>
2736_ACEOF
2737if ac_fn_cxx_try_compile "$LINENO"; then :
2738  eval "$3=yes"
2739else
2740  eval "$3=no"
2741fi
2742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2743fi
2744eval ac_res=\$$3
2745	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2746$as_echo "$ac_res" >&6; }
2747  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2748
2749} # ac_fn_cxx_check_header_compile
2750
2751# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2752# ----------------------------------------------
2753# Tries to find the compile-time value of EXPR in a program that includes
2754# INCLUDES, setting VAR accordingly. Returns whether the value could be
2755# computed
2756ac_fn_cxx_compute_int ()
2757{
2758  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2759  if test "$cross_compiling" = yes; then
2760    # Depending upon the size, compute the lo and hi bounds.
2761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2762/* end confdefs.h.  */
2763$4
2764int
2765main ()
2766{
2767static int test_array [1 - 2 * !(($2) >= 0)];
2768test_array [0] = 0;
2769return test_array [0];
2770
2771  ;
2772  return 0;
2773}
2774_ACEOF
2775if ac_fn_cxx_try_compile "$LINENO"; then :
2776  ac_lo=0 ac_mid=0
2777  while :; do
2778    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2779/* end confdefs.h.  */
2780$4
2781int
2782main ()
2783{
2784static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2785test_array [0] = 0;
2786return test_array [0];
2787
2788  ;
2789  return 0;
2790}
2791_ACEOF
2792if ac_fn_cxx_try_compile "$LINENO"; then :
2793  ac_hi=$ac_mid; break
2794else
2795  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2796			if test $ac_lo -le $ac_mid; then
2797			  ac_lo= ac_hi=
2798			  break
2799			fi
2800			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2801fi
2802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2803  done
2804else
2805  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2806/* end confdefs.h.  */
2807$4
2808int
2809main ()
2810{
2811static int test_array [1 - 2 * !(($2) < 0)];
2812test_array [0] = 0;
2813return test_array [0];
2814
2815  ;
2816  return 0;
2817}
2818_ACEOF
2819if ac_fn_cxx_try_compile "$LINENO"; then :
2820  ac_hi=-1 ac_mid=-1
2821  while :; do
2822    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2823/* end confdefs.h.  */
2824$4
2825int
2826main ()
2827{
2828static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2829test_array [0] = 0;
2830return test_array [0];
2831
2832  ;
2833  return 0;
2834}
2835_ACEOF
2836if ac_fn_cxx_try_compile "$LINENO"; then :
2837  ac_lo=$ac_mid; break
2838else
2839  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2840			if test $ac_mid -le $ac_hi; then
2841			  ac_lo= ac_hi=
2842			  break
2843			fi
2844			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2845fi
2846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2847  done
2848else
2849  ac_lo= ac_hi=
2850fi
2851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2852fi
2853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2854# Binary search between lo and hi bounds.
2855while test "x$ac_lo" != "x$ac_hi"; do
2856  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2857  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2858/* end confdefs.h.  */
2859$4
2860int
2861main ()
2862{
2863static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2864test_array [0] = 0;
2865return test_array [0];
2866
2867  ;
2868  return 0;
2869}
2870_ACEOF
2871if ac_fn_cxx_try_compile "$LINENO"; then :
2872  ac_hi=$ac_mid
2873else
2874  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2875fi
2876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2877done
2878case $ac_lo in #((
2879?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2880'') ac_retval=1 ;;
2881esac
2882  else
2883    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2884/* end confdefs.h.  */
2885$4
2886static long int longval () { return $2; }
2887static unsigned long int ulongval () { return $2; }
2888#include <stdio.h>
2889#include <stdlib.h>
2890int
2891main ()
2892{
2893
2894  FILE *f = fopen ("conftest.val", "w");
2895  if (! f)
2896    return 1;
2897  if (($2) < 0)
2898    {
2899      long int i = longval ();
2900      if (i != ($2))
2901	return 1;
2902      fprintf (f, "%ld", i);
2903    }
2904  else
2905    {
2906      unsigned long int i = ulongval ();
2907      if (i != ($2))
2908	return 1;
2909      fprintf (f, "%lu", i);
2910    }
2911  /* Do not output a trailing newline, as this causes \r\n confusion
2912     on some platforms.  */
2913  return ferror (f) || fclose (f) != 0;
2914
2915  ;
2916  return 0;
2917}
2918_ACEOF
2919if ac_fn_cxx_try_run "$LINENO"; then :
2920  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2921else
2922  ac_retval=1
2923fi
2924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2925  conftest.$ac_objext conftest.beam conftest.$ac_ext
2926rm -f conftest.val
2927
2928  fi
2929  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2930  as_fn_set_status $ac_retval
2931
2932} # ac_fn_cxx_compute_int
2933
2934# ac_fn_cxx_try_link LINENO
2935# -------------------------
2936# Try to link conftest.$ac_ext, and return whether this succeeded.
2937ac_fn_cxx_try_link ()
2938{
2939  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2940  rm -f conftest.$ac_objext conftest$ac_exeext
2941  if { { ac_try="$ac_link"
2942case "(($ac_try" in
2943  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2944  *) ac_try_echo=$ac_try;;
2945esac
2946eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2947$as_echo "$ac_try_echo"; } >&5
2948  (eval "$ac_link") 2>conftest.err
2949  ac_status=$?
2950  if test -s conftest.err; then
2951    grep -v '^ *+' conftest.err >conftest.er1
2952    cat conftest.er1 >&5
2953    mv -f conftest.er1 conftest.err
2954  fi
2955  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2956  test $ac_status = 0; } && {
2957	 test -z "$ac_cxx_werror_flag" ||
2958	 test ! -s conftest.err
2959       } && test -s conftest$ac_exeext && {
2960	 test "$cross_compiling" = yes ||
2961	 test -x conftest$ac_exeext
2962       }; then :
2963  ac_retval=0
2964else
2965  $as_echo "$as_me: failed program was:" >&5
2966sed 's/^/| /' conftest.$ac_ext >&5
2967
2968	ac_retval=1
2969fi
2970  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2971  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2972  # interfere with the next link command; also delete a directory that is
2973  # left behind by Apple's compiler.  We do this before executing the actions.
2974  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2975  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2976  as_fn_set_status $ac_retval
2977
2978} # ac_fn_cxx_try_link
2979
2980# ac_fn_cxx_check_func LINENO FUNC VAR
2981# ------------------------------------
2982# Tests whether FUNC exists, setting the cache variable VAR accordingly
2983ac_fn_cxx_check_func ()
2984{
2985  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2986  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2987$as_echo_n "checking for $2... " >&6; }
2988if eval \${$3+:} false; then :
2989  $as_echo_n "(cached) " >&6
2990else
2991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2992/* end confdefs.h.  */
2993/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2994   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2995#define $2 innocuous_$2
2996
2997/* System header to define __stub macros and hopefully few prototypes,
2998    which can conflict with char $2 (); below.
2999    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3000    <limits.h> exists even on freestanding compilers.  */
3001
3002#ifdef __STDC__
3003# include <limits.h>
3004#else
3005# include <assert.h>
3006#endif
3007
3008#undef $2
3009
3010/* Override any GCC internal prototype to avoid an error.
3011   Use char because int might match the return type of a GCC
3012   builtin and then its argument prototype would still apply.  */
3013#ifdef __cplusplus
3014extern "C"
3015#endif
3016char $2 ();
3017/* The GNU C library defines this for functions which it implements
3018    to always fail with ENOSYS.  Some functions are actually named
3019    something starting with __ and the normal name is an alias.  */
3020#if defined __stub_$2 || defined __stub___$2
3021choke me
3022#endif
3023
3024int
3025main ()
3026{
3027return $2 ();
3028  ;
3029  return 0;
3030}
3031_ACEOF
3032if ac_fn_cxx_try_link "$LINENO"; then :
3033  eval "$3=yes"
3034else
3035  eval "$3=no"
3036fi
3037rm -f core conftest.err conftest.$ac_objext \
3038    conftest$ac_exeext conftest.$ac_ext
3039fi
3040eval ac_res=\$$3
3041	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3042$as_echo "$ac_res" >&6; }
3043  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3044
3045} # ac_fn_cxx_check_func
3046
3047# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3048# -------------------------------------------------------
3049# Tests whether HEADER exists and can be compiled using the include files in
3050# INCLUDES, setting the cache variable VAR accordingly.
3051ac_fn_c_check_header_compile ()
3052{
3053  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3055$as_echo_n "checking for $2... " >&6; }
3056if eval \${$3+:} false; then :
3057  $as_echo_n "(cached) " >&6
3058else
3059  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3060/* end confdefs.h.  */
3061$4
3062#include <$2>
3063_ACEOF
3064if ac_fn_c_try_compile "$LINENO"; then :
3065  eval "$3=yes"
3066else
3067  eval "$3=no"
3068fi
3069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3070fi
3071eval ac_res=\$$3
3072	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3073$as_echo "$ac_res" >&6; }
3074  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3075
3076} # ac_fn_c_check_header_compile
3077cat >config.log <<_ACEOF
3078This file contains any messages produced by compilers while
3079running configure, to aid debugging if configure makes a mistake.
3080
3081It was created by OpenJDK $as_me jdk9, which was
3082generated by GNU Autoconf 2.69.  Invocation command line was
3083
3084  $ $0 $@
3085
3086_ACEOF
3087exec 5>>config.log
3088{
3089cat <<_ASUNAME
3090## --------- ##
3091## Platform. ##
3092## --------- ##
3093
3094hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3095uname -m = `(uname -m) 2>/dev/null || echo unknown`
3096uname -r = `(uname -r) 2>/dev/null || echo unknown`
3097uname -s = `(uname -s) 2>/dev/null || echo unknown`
3098uname -v = `(uname -v) 2>/dev/null || echo unknown`
3099
3100/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3101/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3102
3103/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3104/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3105/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3106/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3107/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3108/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3109/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3110
3111_ASUNAME
3112
3113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3114for as_dir in $PATH
3115do
3116  IFS=$as_save_IFS
3117  test -z "$as_dir" && as_dir=.
3118    $as_echo "PATH: $as_dir"
3119  done
3120IFS=$as_save_IFS
3121
3122} >&5
3123
3124cat >&5 <<_ACEOF
3125
3126
3127## ----------- ##
3128## Core tests. ##
3129## ----------- ##
3130
3131_ACEOF
3132
3133
3134# Keep a trace of the command line.
3135# Strip out --no-create and --no-recursion so they do not pile up.
3136# Strip out --silent because we don't want to record it for future runs.
3137# Also quote any args containing shell meta-characters.
3138# Make two passes to allow for proper duplicate-argument suppression.
3139ac_configure_args=
3140ac_configure_args0=
3141ac_configure_args1=
3142ac_must_keep_next=false
3143for ac_pass in 1 2
3144do
3145  for ac_arg
3146  do
3147    case $ac_arg in
3148    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3149    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3150    | -silent | --silent | --silen | --sile | --sil)
3151      continue ;;
3152    *\'*)
3153      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3154    esac
3155    case $ac_pass in
3156    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3157    2)
3158      as_fn_append ac_configure_args1 " '$ac_arg'"
3159      if test $ac_must_keep_next = true; then
3160	ac_must_keep_next=false # Got value, back to normal.
3161      else
3162	case $ac_arg in
3163	  *=* | --config-cache | -C | -disable-* | --disable-* \
3164	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3165	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3166	  | -with-* | --with-* | -without-* | --without-* | --x)
3167	    case "$ac_configure_args0 " in
3168	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3169	    esac
3170	    ;;
3171	  -* ) ac_must_keep_next=true ;;
3172	esac
3173      fi
3174      as_fn_append ac_configure_args " '$ac_arg'"
3175      ;;
3176    esac
3177  done
3178done
3179{ ac_configure_args0=; unset ac_configure_args0;}
3180{ ac_configure_args1=; unset ac_configure_args1;}
3181
3182# When interrupted or exit'd, cleanup temporary files, and complete
3183# config.log.  We remove comments because anyway the quotes in there
3184# would cause problems or look ugly.
3185# WARNING: Use '\'' to represent an apostrophe within the trap.
3186# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3187trap 'exit_status=$?
3188  # Save into config.log some information that might help in debugging.
3189  {
3190    echo
3191
3192    $as_echo "## ---------------- ##
3193## Cache variables. ##
3194## ---------------- ##"
3195    echo
3196    # The following way of writing the cache mishandles newlines in values,
3197(
3198  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3199    eval ac_val=\$$ac_var
3200    case $ac_val in #(
3201    *${as_nl}*)
3202      case $ac_var in #(
3203      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3204$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3205      esac
3206      case $ac_var in #(
3207      _ | IFS | as_nl) ;; #(
3208      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3209      *) { eval $ac_var=; unset $ac_var;} ;;
3210      esac ;;
3211    esac
3212  done
3213  (set) 2>&1 |
3214    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3215    *${as_nl}ac_space=\ *)
3216      sed -n \
3217	"s/'\''/'\''\\\\'\'''\''/g;
3218	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3219      ;; #(
3220    *)
3221      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3222      ;;
3223    esac |
3224    sort
3225)
3226    echo
3227
3228    $as_echo "## ----------------- ##
3229## Output variables. ##
3230## ----------------- ##"
3231    echo
3232    for ac_var in $ac_subst_vars
3233    do
3234      eval ac_val=\$$ac_var
3235      case $ac_val in
3236      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3237      esac
3238      $as_echo "$ac_var='\''$ac_val'\''"
3239    done | sort
3240    echo
3241
3242    if test -n "$ac_subst_files"; then
3243      $as_echo "## ------------------- ##
3244## File substitutions. ##
3245## ------------------- ##"
3246      echo
3247      for ac_var in $ac_subst_files
3248      do
3249	eval ac_val=\$$ac_var
3250	case $ac_val in
3251	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3252	esac
3253	$as_echo "$ac_var='\''$ac_val'\''"
3254      done | sort
3255      echo
3256    fi
3257
3258    if test -s confdefs.h; then
3259      $as_echo "## ----------- ##
3260## confdefs.h. ##
3261## ----------- ##"
3262      echo
3263      cat confdefs.h
3264      echo
3265    fi
3266    test "$ac_signal" != 0 &&
3267      $as_echo "$as_me: caught signal $ac_signal"
3268    $as_echo "$as_me: exit $exit_status"
3269  } >&5
3270  rm -f core *.core core.conftest.* &&
3271    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3272    exit $exit_status
3273' 0
3274for ac_signal in 1 2 13 15; do
3275  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3276done
3277ac_signal=0
3278
3279# confdefs.h avoids OS command line length limits that DEFS can exceed.
3280rm -f -r conftest* confdefs.h
3281
3282$as_echo "/* confdefs.h */" > confdefs.h
3283
3284# Predefined preprocessor variables.
3285
3286cat >>confdefs.h <<_ACEOF
3287#define PACKAGE_NAME "$PACKAGE_NAME"
3288_ACEOF
3289
3290cat >>confdefs.h <<_ACEOF
3291#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3292_ACEOF
3293
3294cat >>confdefs.h <<_ACEOF
3295#define PACKAGE_VERSION "$PACKAGE_VERSION"
3296_ACEOF
3297
3298cat >>confdefs.h <<_ACEOF
3299#define PACKAGE_STRING "$PACKAGE_STRING"
3300_ACEOF
3301
3302cat >>confdefs.h <<_ACEOF
3303#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3304_ACEOF
3305
3306cat >>confdefs.h <<_ACEOF
3307#define PACKAGE_URL "$PACKAGE_URL"
3308_ACEOF
3309
3310
3311# Let the site file select an alternate cache file if it wants to.
3312# Prefer an explicitly selected file to automatically selected ones.
3313ac_site_file1=NONE
3314ac_site_file2=NONE
3315if test -n "$CONFIG_SITE"; then
3316  # We do not want a PATH search for config.site.
3317  case $CONFIG_SITE in #((
3318    -*)  ac_site_file1=./$CONFIG_SITE;;
3319    */*) ac_site_file1=$CONFIG_SITE;;
3320    *)   ac_site_file1=./$CONFIG_SITE;;
3321  esac
3322elif test "x$prefix" != xNONE; then
3323  ac_site_file1=$prefix/share/config.site
3324  ac_site_file2=$prefix/etc/config.site
3325else
3326  ac_site_file1=$ac_default_prefix/share/config.site
3327  ac_site_file2=$ac_default_prefix/etc/config.site
3328fi
3329for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3330do
3331  test "x$ac_site_file" = xNONE && continue
3332  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3333    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3334$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3335    sed 's/^/| /' "$ac_site_file" >&5
3336    . "$ac_site_file" \
3337      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3338$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3339as_fn_error $? "failed to load site script $ac_site_file
3340See \`config.log' for more details" "$LINENO" 5; }
3341  fi
3342done
3343
3344if test -r "$cache_file"; then
3345  # Some versions of bash will fail to source /dev/null (special files
3346  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3347  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3348    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3349$as_echo "$as_me: loading cache $cache_file" >&6;}
3350    case $cache_file in
3351      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3352      *)                      . "./$cache_file";;
3353    esac
3354  fi
3355else
3356  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3357$as_echo "$as_me: creating cache $cache_file" >&6;}
3358  >$cache_file
3359fi
3360
3361# Check that the precious variables saved in the cache have kept the same
3362# value.
3363ac_cache_corrupted=false
3364for ac_var in $ac_precious_vars; do
3365  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3366  eval ac_new_set=\$ac_env_${ac_var}_set
3367  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3368  eval ac_new_val=\$ac_env_${ac_var}_value
3369  case $ac_old_set,$ac_new_set in
3370    set,)
3371      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3372$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3373      ac_cache_corrupted=: ;;
3374    ,set)
3375      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3376$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3377      ac_cache_corrupted=: ;;
3378    ,);;
3379    *)
3380      if test "x$ac_old_val" != "x$ac_new_val"; then
3381	# differences in whitespace do not lead to failure.
3382	ac_old_val_w=`echo x $ac_old_val`
3383	ac_new_val_w=`echo x $ac_new_val`
3384	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3385	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3386$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3387	  ac_cache_corrupted=:
3388	else
3389	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3390$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3391	  eval $ac_var=\$ac_old_val
3392	fi
3393	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3394$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3395	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3396$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3397      fi;;
3398  esac
3399  # Pass precious variables to config.status.
3400  if test "$ac_new_set" = set; then
3401    case $ac_new_val in
3402    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3403    *) ac_arg=$ac_var=$ac_new_val ;;
3404    esac
3405    case " $ac_configure_args " in
3406      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3407      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3408    esac
3409  fi
3410done
3411if $ac_cache_corrupted; then
3412  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3413$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3414  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3415$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3416  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3417fi
3418## -------------------- ##
3419## Main body of script. ##
3420## -------------------- ##
3421
3422ac_ext=c
3423ac_cpp='$CPP $CPPFLAGS'
3424ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3425ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3426ac_compiler_gnu=$ac_cv_c_compiler_gnu
3427
3428
3429
3430ac_aux_dir=
3431for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3432  if test -f "$ac_dir/install-sh"; then
3433    ac_aux_dir=$ac_dir
3434    ac_install_sh="$ac_aux_dir/install-sh -c"
3435    break
3436  elif test -f "$ac_dir/install.sh"; then
3437    ac_aux_dir=$ac_dir
3438    ac_install_sh="$ac_aux_dir/install.sh -c"
3439    break
3440  elif test -f "$ac_dir/shtool"; then
3441    ac_aux_dir=$ac_dir
3442    ac_install_sh="$ac_aux_dir/shtool install -c"
3443    break
3444  fi
3445done
3446if test -z "$ac_aux_dir"; then
3447  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
3448fi
3449
3450# These three variables are undocumented and unsupported,
3451# and are intended to be withdrawn in a future Autoconf release.
3452# They can cause serious problems if a builder's source tree is in a directory
3453# whose full name contains unusual characters.
3454ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3455ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3456ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3457
3458
3459# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3460
3461#
3462# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3463# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3464#
3465# This code is free software; you can redistribute it and/or modify it
3466# under the terms of the GNU General Public License version 2 only, as
3467# published by the Free Software Foundation.  Oracle designates this
3468# particular file as subject to the "Classpath" exception as provided
3469# by Oracle in the LICENSE file that accompanied this code.
3470#
3471# This code is distributed in the hope that it will be useful, but WITHOUT
3472# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3473# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3474# version 2 for more details (a copy is included in the LICENSE file that
3475# accompanied this code).
3476#
3477# You should have received a copy of the GNU General Public License version
3478# 2 along with this work; if not, write to the Free Software Foundation,
3479# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3480#
3481# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3482# or visit www.oracle.com if you need additional information or have any
3483# questions.
3484#
3485
3486#
3487# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3488#
3489# This program is free software; you can redistribute it and/or modify
3490# it under the terms of the GNU General Public License as published by
3491# the Free Software Foundation; either version 2 of the License, or
3492# (at your option) any later version.
3493#
3494# This program is distributed in the hope that it will be useful, but
3495# WITHOUT ANY WARRANTY; without even the implied warranty of
3496# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3497# General Public License for more details.
3498#
3499# You should have received a copy of the GNU General Public License
3500# along with this program; if not, write to the Free Software
3501# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3502#
3503# As a special exception to the GNU General Public License, if you
3504# distribute this file as part of a program that contains a
3505# configuration script generated by Autoconf, you may include it under
3506# the same distribution terms that you use for the rest of that program.
3507
3508# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3509# ----------------------------------
3510# PKG_PROG_PKG_CONFIG
3511
3512# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3513#
3514# Check to see whether a particular set of modules exists.  Similar
3515# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3516#
3517#
3518# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3519# this or PKG_CHECK_MODULES is called, or make sure to call
3520# PKG_CHECK_EXISTS manually
3521# --------------------------------------------------------------
3522
3523
3524
3525# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3526# ---------------------------------------------
3527# _PKG_CONFIG
3528
3529# _PKG_SHORT_ERRORS_SUPPORTED
3530# -----------------------------
3531# _PKG_SHORT_ERRORS_SUPPORTED
3532
3533
3534# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3535# [ACTION-IF-NOT-FOUND])
3536#
3537#
3538# Note that if there is a possibility the first call to
3539# PKG_CHECK_MODULES might not happen, you should be sure to include an
3540# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3541#
3542#
3543# --------------------------------------------------------------
3544# PKG_CHECK_MODULES
3545
3546
3547# Include these first...
3548#
3549# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3550# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3551#
3552# This code is free software; you can redistribute it and/or modify it
3553# under the terms of the GNU General Public License version 2 only, as
3554# published by the Free Software Foundation.  Oracle designates this
3555# particular file as subject to the "Classpath" exception as provided
3556# by Oracle in the LICENSE file that accompanied this code.
3557#
3558# This code is distributed in the hope that it will be useful, but WITHOUT
3559# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3560# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3561# version 2 for more details (a copy is included in the LICENSE file that
3562# accompanied this code).
3563#
3564# You should have received a copy of the GNU General Public License version
3565# 2 along with this work; if not, write to the Free Software Foundation,
3566# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3567#
3568# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3569# or visit www.oracle.com if you need additional information or have any
3570# questions.
3571#
3572
3573# Create a function/macro that takes a series of named arguments. The call is
3574# similar to AC_DEFUN, but the setup of the function looks like this:
3575# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3576# ... do something
3577#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3578# ])
3579# A star (*) in front of a named argument means that it is required and it's
3580# presence will be verified. To pass e.g. the first value as a normal indexed
3581# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3582# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3583# "ARG_FOO".
3584#
3585# The generated function can be called like this:
3586# MYFUNC(FOO: [foo-val],
3587#     BAR: [
3588#         $ECHO hello world
3589#     ])
3590# Note that the argument value must start on the same line as the argument name.
3591#
3592# Argument 1: Name of the function to define
3593# Argument 2: List of legal named arguments, with a * prefix for required arguments
3594# Argument 3: Argument array to treat as named, typically $@
3595# Argument 4: The main function body
3596
3597
3598# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3599# If so, then append $1 to $2 \
3600# Also set JVM_ARG_OK to true/false depending on outcome.
3601
3602
3603# Appends a string to a path variable, only adding the : when needed.
3604
3605
3606# Prepends a string to a path variable, only adding the : when needed.
3607
3608
3609# This will make sure the given variable points to a full and proper
3610# path. This means:
3611# 1) There will be no spaces in the path. On unix platforms,
3612#    spaces in the path will result in an error. On Windows,
3613#    the path will be rewritten using short-style to be space-free.
3614# 2) The path will be absolute, and it will be in unix-style (on
3615#     cygwin).
3616# $1: The name of the variable to fix
3617
3618
3619# This will make sure the given variable points to a executable
3620# with a full and proper path. This means:
3621# 1) There will be no spaces in the path. On unix platforms,
3622#    spaces in the path will result in an error. On Windows,
3623#    the path will be rewritten using short-style to be space-free.
3624# 2) The path will be absolute, and it will be in unix-style (on
3625#     cygwin).
3626# Any arguments given to the executable is preserved.
3627# If the input variable does not have a directory specification, then
3628# it need to be in the PATH.
3629# $1: The name of the variable to fix
3630
3631
3632
3633
3634# Register a --with argument but mark it as deprecated
3635# $1: The name of the with argument to deprecate, not including --with-
3636
3637
3638# Register a --enable argument but mark it as deprecated
3639# $1: The name of the with argument to deprecate, not including --enable-
3640# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3641# $3: Messages to user.
3642
3643
3644
3645
3646# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3647# $1: variable to check
3648
3649
3650# Check that there are no unprocessed overridden variables left.
3651# If so, they are an incorrect argument and we will exit with an error.
3652
3653
3654# Setup a tool for the given variable. If correctly specified by the user,
3655# use that value, otherwise search for the tool using the supplied code snippet.
3656# $1: variable to set
3657# $2: code snippet to call to look for the tool
3658# $3: code snippet to call if variable was used to find tool
3659
3660
3661# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3662# $1: variable to set
3663# $2: executable name (or list of names) to look for
3664
3665
3666# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3667# $1: variable to set
3668# $2: executable name (or list of names) to look for
3669
3670
3671# Like BASIC_PATH_PROGS but fails if no tool was found.
3672# $1: variable to set
3673# $2: executable name (or list of names) to look for
3674
3675
3676# Like BASIC_SETUP_TOOL but fails if no tool was found.
3677# $1: variable to set
3678# $2: autoconf macro to call to look for the special tool
3679
3680
3681# Setup the most fundamental tools that relies on not much else to set up,
3682# but is used by much of the early bootstrap code.
3683
3684
3685# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3686
3687
3688# Evaluates platform specific overrides for devkit variables.
3689# $1: Name of variable
3690
3691
3692
3693
3694
3695
3696#%%% Simple tools %%%
3697
3698# Check if we have found a usable version of make
3699# $1: the path to a potential make binary (or empty)
3700# $2: the description on how we found this
3701
3702
3703
3704
3705# Goes looking for a usable version of GNU make.
3706
3707
3708
3709
3710
3711
3712
3713
3714# Check if build directory is on local disk. If not possible to determine,
3715# we prefer to claim it's local.
3716# Argument 1: directory to test
3717# Argument 2: what to do if it is on local disk
3718# Argument 3: what to do otherwise (remote disk or failure)
3719
3720
3721# Check that source files have basic read permissions set. This might
3722# not be the case in cygwin in certain conditions.
3723
3724
3725
3726
3727# Check for support for specific options in bash
3728
3729
3730################################################################################
3731#
3732# Default make target
3733#
3734
3735
3736# Code to run after AC_OUTPUT
3737
3738
3739#
3740# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3741# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3742#
3743# This code is free software; you can redistribute it and/or modify it
3744# under the terms of the GNU General Public License version 2 only, as
3745# published by the Free Software Foundation.  Oracle designates this
3746# particular file as subject to the "Classpath" exception as provided
3747# by Oracle in the LICENSE file that accompanied this code.
3748#
3749# This code is distributed in the hope that it will be useful, but WITHOUT
3750# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3751# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3752# version 2 for more details (a copy is included in the LICENSE file that
3753# accompanied this code).
3754#
3755# You should have received a copy of the GNU General Public License version
3756# 2 along with this work; if not, write to the Free Software Foundation,
3757# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3758#
3759# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3760# or visit www.oracle.com if you need additional information or have any
3761# questions.
3762#
3763
3764
3765
3766
3767
3768# Helper function which possibly converts a path using DOS-style short mode.
3769# If so, the updated path is stored in $new_path.
3770# $1: The path to check
3771
3772
3773# Helper function which possibly converts a path using DOS-style short mode.
3774# If so, the updated path is stored in $new_path.
3775# $1: The path to check
3776
3777
3778# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3779# and could probably be heavily simplified. However, all changes in this
3780# area tend to need lot of testing in different scenarios, and in lack of
3781# proper unit testing, cleaning this up has not been deemed worth the effort
3782# at the moment.
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3793
3794
3795
3796
3797# ... then the rest
3798#
3799# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3800# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3801#
3802# This code is free software; you can redistribute it and/or modify it
3803# under the terms of the GNU General Public License version 2 only, as
3804# published by the Free Software Foundation.  Oracle designates this
3805# particular file as subject to the "Classpath" exception as provided
3806# by Oracle in the LICENSE file that accompanied this code.
3807#
3808# This code is distributed in the hope that it will be useful, but WITHOUT
3809# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3810# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3811# version 2 for more details (a copy is included in the LICENSE file that
3812# accompanied this code).
3813#
3814# You should have received a copy of the GNU General Public License version
3815# 2 along with this work; if not, write to the Free Software Foundation,
3816# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3817#
3818# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3819# or visit www.oracle.com if you need additional information or have any
3820# questions.
3821#
3822
3823########################################################################
3824# This file handles detection of the Boot JDK. The Boot JDK detection
3825# process has been developed as a response to solve a complex real-world
3826# problem. Initially, it was simple, but it has grown as platform after
3827# platform, idiosyncracy after idiosyncracy has been supported.
3828#
3829# The basic idea is this:
3830# 1) You need an acceptable *) JDK to use as a Boot JDK
3831# 2) There are several ways to locate a JDK, that are mostly platform
3832#    dependent **)
3833# 3) You can have multiple JDKs installed
3834# 4) If possible, configure should try to dig out an acceptable JDK
3835#    automatically, without having to resort to command-line options
3836#
3837# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3838#     javac) and not a JRE, etc.
3839#
3840# **) On Windows we typically use a well-known path.
3841#     On MacOSX we typically use the tool java_home.
3842#     On Linux we typically find javac in the $PATH, and then follow a
3843#     chain of symlinks that often ends up in a real JDK.
3844#
3845# This leads to the code where we check in different ways to locate a
3846# JDK, and if one is found, check if it is acceptable. If not, we print
3847# our reasons for rejecting it (useful when debugging non-working
3848# configure situations) and continue checking the next one.
3849########################################################################
3850
3851# Execute the check given as argument, and verify the result
3852# If the Boot JDK was previously found, do nothing
3853# $1 A command line (typically autoconf macro) to execute
3854
3855
3856# Test: Is bootjdk explicitely set by command line arguments?
3857
3858
3859# Test: Is $JAVA_HOME set?
3860
3861
3862# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3863
3864
3865# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3866# $1: Argument to the java_home binary (optional)
3867
3868
3869# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3870
3871
3872# Look for a jdk in the given path. If there are multiple, try to select the newest.
3873# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3874# $1 = Path to directory containing jdk installations.
3875# $2 = String to append to the found JDK directory to get the proper JDK home
3876
3877
3878# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3879# environmental variable as base for where to look.
3880# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3881
3882
3883# Test: Is there a JDK installed in default, well-known locations?
3884
3885
3886# Check that a command-line tool in the Boot JDK is correct
3887# $1 = name of variable to assign
3888# $2 = name of binary
3889
3890
3891###############################################################################
3892#
3893# We need a Boot JDK to bootstrap the build.
3894#
3895
3896
3897
3898
3899
3900# BUILD_JDK: the location of the latest JDK that can run
3901#   on the host system and supports the target class file version
3902#   generated in this JDK build.  This variable should only be
3903#   used after the launchers are built.
3904#
3905
3906# Execute the check given as argument, and verify the result.
3907# If the JDK was previously found, do nothing.
3908# $1 A command line (typically autoconf macro) to execute
3909
3910
3911# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3912# is different than the host system doing the build (e.g. cross-compilation),
3913# a special BUILD_JDK is built as part of the build process.  An external
3914# prebuilt BUILD_JDK can also be supplied.
3915
3916
3917#
3918# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3919# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3920#
3921# This code is free software; you can redistribute it and/or modify it
3922# under the terms of the GNU General Public License version 2 only, as
3923# published by the Free Software Foundation.  Oracle designates this
3924# particular file as subject to the "Classpath" exception as provided
3925# by Oracle in the LICENSE file that accompanied this code.
3926#
3927# This code is distributed in the hope that it will be useful, but WITHOUT
3928# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3929# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3930# version 2 for more details (a copy is included in the LICENSE file that
3931# accompanied this code).
3932#
3933# You should have received a copy of the GNU General Public License version
3934# 2 along with this work; if not, write to the Free Software Foundation,
3935# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3936#
3937# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3938# or visit www.oracle.com if you need additional information or have any
3939# questions.
3940#
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958################################################################################
3959#
3960# Runs icecc-create-env once and prints the error if it fails
3961#
3962# $1: arguments to icecc-create-env
3963# $2: log file
3964#
3965
3966
3967################################################################################
3968#
3969# Optionally enable distributed compilation of native code using icecc/icecream
3970#
3971
3972
3973
3974
3975
3976
3977
3978#
3979# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3980# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3981#
3982# This code is free software; you can redistribute it and/or modify it
3983# under the terms of the GNU General Public License version 2 only, as
3984# published by the Free Software Foundation.  Oracle designates this
3985# particular file as subject to the "Classpath" exception as provided
3986# by Oracle in the LICENSE file that accompanied this code.
3987#
3988# This code is distributed in the hope that it will be useful, but WITHOUT
3989# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3990# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3991# version 2 for more details (a copy is included in the LICENSE file that
3992# accompanied this code).
3993#
3994# You should have received a copy of the GNU General Public License version
3995# 2 along with this work; if not, write to the Free Software Foundation,
3996# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3997#
3998# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3999# or visit www.oracle.com if you need additional information or have any
4000# questions.
4001#
4002
4003# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4004# corresponding configure arguments instead
4005
4006
4007# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4008# that configure can use them while detecting compilers.
4009# TOOLCHAIN_TYPE is available here.
4010# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4011
4012
4013
4014
4015
4016
4017# Documentation on common flags used for solstudio in HIGHEST.
4018#
4019# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4020#          done with care, there are some assumptions below that need to
4021#          be understood about the use of pointers, and IEEE behavior.
4022#
4023# -fns: Use non-standard floating point mode (not IEEE 754)
4024# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4025# -fsingle: Use single precision floating point with 'float'
4026# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4027#   (Source with excessing pointer casting and data access with mixed
4028#    pointer types are not recommended)
4029# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4030#   (If you expect perfect errno behavior, do not use this)
4031# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4032# -xrestrict: Pointer parameters to functions do not overlap
4033#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4034#    If you pass in multiple pointers to the same data, do not use this)
4035# -xlibmil: Inline some library routines
4036#   (If you expect perfect errno behavior, do not use this)
4037# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4038#   (If you expect perfect errno behavior, do not use this)
4039#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4040
4041    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4042    # Bug?
4043    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4044    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4045    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4046    #fi
4047
4048
4049
4050
4051
4052
4053################################################################################
4054# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4055#      conditionals against.
4056# $2 - Optional prefix for each variable defined.
4057
4058
4059# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4060#                                  IF_FALSE: [RUN-IF-FALSE])
4061# ------------------------------------------------------------
4062# Check that the C compiler supports an argument
4063
4064
4065
4066
4067# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4068#                                    IF_FALSE: [RUN-IF-FALSE])
4069# ------------------------------------------------------------
4070# Check that the C++ compiler supports an argument
4071
4072
4073
4074
4075# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4076#                                IF_FALSE: [RUN-IF-FALSE])
4077# ------------------------------------------------------------
4078# Check that the C and C++ compilers support an argument
4079
4080
4081
4082
4083# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4084#                                   IF_FALSE: [RUN-IF-FALSE])
4085# ------------------------------------------------------------
4086# Check that the linker support an argument
4087
4088
4089
4090
4091
4092
4093# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4094# Arguments:
4095# $1 - Optional prefix for each variable defined.
4096
4097
4098#
4099# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4100# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4101#
4102# This code is free software; you can redistribute it and/or modify it
4103# under the terms of the GNU General Public License version 2 only, as
4104# published by the Free Software Foundation.  Oracle designates this
4105# particular file as subject to the "Classpath" exception as provided
4106# by Oracle in the LICENSE file that accompanied this code.
4107#
4108# This code is distributed in the hope that it will be useful, but WITHOUT
4109# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4110# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4111# version 2 for more details (a copy is included in the LICENSE file that
4112# accompanied this code).
4113#
4114# You should have received a copy of the GNU General Public License version
4115# 2 along with this work; if not, write to the Free Software Foundation,
4116# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4117#
4118# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4119# or visit www.oracle.com if you need additional information or have any
4120# questions.
4121#
4122
4123
4124
4125
4126
4127cygwin_help() {
4128  case $1 in
4129    unzip)
4130      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4131      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4132      ;;
4133    zip)
4134      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4135      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4136      ;;
4137    make)
4138      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4139      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4140      ;;
4141    freetype)
4142      HELP_MSG="
4143The freetype library can now be build during the configure process.
4144Download the freetype sources and unpack them into an arbitrary directory:
4145
4146wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4147tar -xzf freetype-2.5.3.tar.gz
4148
4149Then run configure with '--with-freetype-src=<freetype_src>'. This will
4150automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4151builds or into '<freetype_src>/lib32' for 32-bit builds.
4152Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4153and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4154
4155Alternatively you can unpack the sources like this to use the default directory:
4156
4157tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4158      ;;
4159  esac
4160}
4161
4162msys_help() {
4163  PKGHANDLER_COMMAND=""
4164}
4165
4166apt_help() {
4167  case $1 in
4168    reduced)
4169      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4170    devkit)
4171      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4172    openjdk)
4173      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4174    alsa)
4175      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4176    cups)
4177      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4178    freetype)
4179      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4180    ffi)
4181      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4182    x11)
4183      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4184    ccache)
4185      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4186    dtrace)
4187      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4188  esac
4189}
4190
4191yum_help() {
4192  case $1 in
4193    devkit)
4194      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4195    openjdk)
4196      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4197    alsa)
4198      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4199    cups)
4200      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4201    freetype)
4202      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4203    x11)
4204      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4205    ccache)
4206      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4207  esac
4208}
4209
4210port_help() {
4211  PKGHANDLER_COMMAND=""
4212}
4213
4214pkgutil_help() {
4215  PKGHANDLER_COMMAND=""
4216}
4217
4218pkgadd_help() {
4219  PKGHANDLER_COMMAND=""
4220}
4221
4222# This function will check if we're called from the "configure" wrapper while
4223# printing --help. If so, we will print out additional information that can
4224# only be extracted within the autoconf script, and then exit. This must be
4225# called at the very beginning in configure.ac.
4226
4227
4228
4229
4230
4231
4232#
4233# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4234# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4235#
4236# This code is free software; you can redistribute it and/or modify it
4237# under the terms of the GNU General Public License version 2 only, as
4238# published by the Free Software Foundation.  Oracle designates this
4239# particular file as subject to the "Classpath" exception as provided
4240# by Oracle in the LICENSE file that accompanied this code.
4241#
4242# This code is distributed in the hope that it will be useful, but WITHOUT
4243# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4244# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4245# version 2 for more details (a copy is included in the LICENSE file that
4246# accompanied this code).
4247#
4248# You should have received a copy of the GNU General Public License version
4249# 2 along with this work; if not, write to the Free Software Foundation,
4250# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4251#
4252# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4253# or visit www.oracle.com if you need additional information or have any
4254# questions.
4255#
4256
4257# All valid JVM features, regardless of platform
4258VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4259    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4260
4261# All valid JVM variants
4262VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4263
4264###############################################################################
4265# Check if the specified JVM variant should be built. To be used in shell if
4266# constructs, like this:
4267# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4268#
4269# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4270
4271# Definition kept in one line to allow inlining in if statements.
4272# Additional [] needed to keep m4 from mangling shell constructs.
4273
4274
4275###############################################################################
4276# Check if the specified JVM features are explicitly enabled. To be used in
4277# shell if constructs, like this:
4278# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4279#
4280# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4281
4282# Definition kept in one line to allow inlining in if statements.
4283# Additional [] needed to keep m4 from mangling shell constructs.
4284
4285
4286###############################################################################
4287# Check which variants of the JVM that we want to build. Available variants are:
4288#   server: normal interpreter, and a tiered C1/C2 compiler
4289#   client: normal interpreter, and C1 (no C2 compiler)
4290#   minimal: reduced form of client with optional features stripped out
4291#   core: normal interpreter only, no compiler
4292#   zero: C++ based interpreter only, no compiler
4293#   zeroshark: C++ based interpreter, and a llvm-based compiler
4294#   custom: baseline JVM with no default features
4295#
4296
4297
4298###############################################################################
4299# Check if dtrace should be enabled and has all prerequisites present.
4300#
4301
4302
4303###############################################################################
4304# Set up all JVM features for each JVM variant.
4305#
4306
4307
4308###############################################################################
4309# Validate JVM features once all setup is complete, including custom setup.
4310#
4311
4312
4313################################################################################
4314# Check if gtest should be built
4315#
4316
4317
4318#
4319# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4320# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4321#
4322# This code is free software; you can redistribute it and/or modify it
4323# under the terms of the GNU General Public License version 2 only, as
4324# published by the Free Software Foundation.  Oracle designates this
4325# particular file as subject to the "Classpath" exception as provided
4326# by Oracle in the LICENSE file that accompanied this code.
4327#
4328# This code is distributed in the hope that it will be useful, but WITHOUT
4329# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4330# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4331# version 2 for more details (a copy is included in the LICENSE file that
4332# accompanied this code).
4333#
4334# You should have received a copy of the GNU General Public License version
4335# 2 along with this work; if not, write to the Free Software Foundation,
4336# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4337#
4338# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4339# or visit www.oracle.com if you need additional information or have any
4340# questions.
4341#
4342
4343###############################################################################
4344# Check which variant of the JDK that we want to build.
4345# Currently we have:
4346#    normal:   standard edition
4347# but the custom make system may add other variants
4348#
4349# Effectively the JDK variant gives a name to a specific set of
4350# modules to compile into the JDK.
4351
4352
4353###############################################################################
4354# Set the debug level
4355#    release: no debug information, all optimizations, no asserts.
4356#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4357#    fastdebug: debug information (-g), all optimizations, all asserts
4358#    slowdebug: debug information (-g), no optimizations, all asserts
4359
4360
4361###############################################################################
4362#
4363# Should we build only OpenJDK even if closed sources are present?
4364#
4365
4366
4367
4368
4369###############################################################################
4370#
4371# Enable or disable the elliptic curve crypto implementation
4372#
4373
4374
4375
4376
4377################################################################################
4378#
4379# Gcov coverage data for hotspot
4380#
4381
4382
4383################################################################################
4384#
4385# Static build support.  When enabled will generate static
4386# libraries instead of shared libraries for all JDK libs.
4387#
4388
4389
4390################################################################################
4391#
4392# jlink options.
4393# We always keep packaged modules in JDK image.
4394#
4395
4396
4397################################################################################
4398#
4399# Check if building of the jtreg failure handler should be enabled.
4400#
4401
4402
4403################################################################################
4404#
4405# Enable or disable generation of the classlist at build time
4406#
4407
4408
4409#
4410# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4411# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4412#
4413# This code is free software; you can redistribute it and/or modify it
4414# under the terms of the GNU General Public License version 2 only, as
4415# published by the Free Software Foundation.  Oracle designates this
4416# particular file as subject to the "Classpath" exception as provided
4417# by Oracle in the LICENSE file that accompanied this code.
4418#
4419# This code is distributed in the hope that it will be useful, but WITHOUT
4420# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4421# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4422# version 2 for more details (a copy is included in the LICENSE file that
4423# accompanied this code).
4424#
4425# You should have received a copy of the GNU General Public License version
4426# 2 along with this work; if not, write to the Free Software Foundation,
4427# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4428#
4429# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4430# or visit www.oracle.com if you need additional information or have any
4431# questions.
4432#
4433
4434###############################################################################
4435#
4436# Setup version numbers
4437#
4438
4439# Verify that a given string represents a valid version number, and assign it
4440# to a variable.
4441
4442# Argument 1: the variable to assign to
4443# Argument 2: the value given by the user
4444
4445
4446
4447
4448#
4449# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4450# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4451#
4452# This code is free software; you can redistribute it and/or modify it
4453# under the terms of the GNU General Public License version 2 only, as
4454# published by the Free Software Foundation.  Oracle designates this
4455# particular file as subject to the "Classpath" exception as provided
4456# by Oracle in the LICENSE file that accompanied this code.
4457#
4458# This code is distributed in the hope that it will be useful, but WITHOUT
4459# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4460# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4461# version 2 for more details (a copy is included in the LICENSE file that
4462# accompanied this code).
4463#
4464# You should have received a copy of the GNU General Public License version
4465# 2 along with this work; if not, write to the Free Software Foundation,
4466# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4467#
4468# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4469# or visit www.oracle.com if you need additional information or have any
4470# questions.
4471#
4472
4473# Major library component reside in separate files.
4474#
4475# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4476# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4477#
4478# This code is free software; you can redistribute it and/or modify it
4479# under the terms of the GNU General Public License version 2 only, as
4480# published by the Free Software Foundation.  Oracle designates this
4481# particular file as subject to the "Classpath" exception as provided
4482# by Oracle in the LICENSE file that accompanied this code.
4483#
4484# This code is distributed in the hope that it will be useful, but WITHOUT
4485# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4486# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4487# version 2 for more details (a copy is included in the LICENSE file that
4488# accompanied this code).
4489#
4490# You should have received a copy of the GNU General Public License version
4491# 2 along with this work; if not, write to the Free Software Foundation,
4492# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4493#
4494# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4495# or visit www.oracle.com if you need additional information or have any
4496# questions.
4497#
4498
4499################################################################################
4500# Setup alsa (Advanced Linux Sound Architecture)
4501################################################################################
4502
4503
4504#
4505# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4506# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4507#
4508# This code is free software; you can redistribute it and/or modify it
4509# under the terms of the GNU General Public License version 2 only, as
4510# published by the Free Software Foundation.  Oracle designates this
4511# particular file as subject to the "Classpath" exception as provided
4512# by Oracle in the LICENSE file that accompanied this code.
4513#
4514# This code is distributed in the hope that it will be useful, but WITHOUT
4515# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4516# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4517# version 2 for more details (a copy is included in the LICENSE file that
4518# accompanied this code).
4519#
4520# You should have received a copy of the GNU General Public License version
4521# 2 along with this work; if not, write to the Free Software Foundation,
4522# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4523#
4524# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4525# or visit www.oracle.com if you need additional information or have any
4526# questions.
4527#
4528
4529################################################################################
4530# Setup bundled libraries.
4531#
4532# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4533# OpenJDK repository. Default is to use these libraries as bundled, but they
4534# might be replaced by en external version by the user.
4535################################################################################
4536
4537
4538################################################################################
4539# Setup libjpeg
4540################################################################################
4541
4542
4543################################################################################
4544# Setup giflib
4545################################################################################
4546
4547
4548################################################################################
4549# Setup libpng
4550################################################################################
4551
4552
4553################################################################################
4554# Setup zlib
4555################################################################################
4556
4557
4558################################################################################
4559# Setup lcms (Little CMS)
4560################################################################################
4561
4562
4563#
4564# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4565# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4566#
4567# This code is free software; you can redistribute it and/or modify it
4568# under the terms of the GNU General Public License version 2 only, as
4569# published by the Free Software Foundation.  Oracle designates this
4570# particular file as subject to the "Classpath" exception as provided
4571# by Oracle in the LICENSE file that accompanied this code.
4572#
4573# This code is distributed in the hope that it will be useful, but WITHOUT
4574# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4575# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4576# version 2 for more details (a copy is included in the LICENSE file that
4577# accompanied this code).
4578#
4579# You should have received a copy of the GNU General Public License version
4580# 2 along with this work; if not, write to the Free Software Foundation,
4581# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4582#
4583# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4584# or visit www.oracle.com if you need additional information or have any
4585# questions.
4586#
4587
4588################################################################################
4589# Setup cups (Common Unix Printing System)
4590################################################################################
4591
4592
4593#
4594# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4595# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4596#
4597# This code is free software; you can redistribute it and/or modify it
4598# under the terms of the GNU General Public License version 2 only, as
4599# published by the Free Software Foundation.  Oracle designates this
4600# particular file as subject to the "Classpath" exception as provided
4601# by Oracle in the LICENSE file that accompanied this code.
4602#
4603# This code is distributed in the hope that it will be useful, but WITHOUT
4604# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4605# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4606# version 2 for more details (a copy is included in the LICENSE file that
4607# accompanied this code).
4608#
4609# You should have received a copy of the GNU General Public License version
4610# 2 along with this work; if not, write to the Free Software Foundation,
4611# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4612#
4613# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4614# or visit www.oracle.com if you need additional information or have any
4615# questions.
4616#
4617
4618################################################################################
4619# Setup libffi (Foreign Function Interface)
4620################################################################################
4621
4622
4623#
4624# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4625# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4626#
4627# This code is free software; you can redistribute it and/or modify it
4628# under the terms of the GNU General Public License version 2 only, as
4629# published by the Free Software Foundation.  Oracle designates this
4630# particular file as subject to the "Classpath" exception as provided
4631# by Oracle in the LICENSE file that accompanied this code.
4632#
4633# This code is distributed in the hope that it will be useful, but WITHOUT
4634# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4635# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4636# version 2 for more details (a copy is included in the LICENSE file that
4637# accompanied this code).
4638#
4639# You should have received a copy of the GNU General Public License version
4640# 2 along with this work; if not, write to the Free Software Foundation,
4641# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4642#
4643# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4644# or visit www.oracle.com if you need additional information or have any
4645# questions.
4646#
4647
4648################################################################################
4649# Build the freetype lib from source
4650################################################################################
4651
4652
4653################################################################################
4654# Check if a potential freeype library match is correct and usable
4655################################################################################
4656
4657
4658################################################################################
4659# Setup freetype (The FreeType2 font rendering library)
4660################################################################################
4661
4662
4663#
4664# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4665# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4666#
4667# This code is free software; you can redistribute it and/or modify it
4668# under the terms of the GNU General Public License version 2 only, as
4669# published by the Free Software Foundation.  Oracle designates this
4670# particular file as subject to the "Classpath" exception as provided
4671# by Oracle in the LICENSE file that accompanied this code.
4672#
4673# This code is distributed in the hope that it will be useful, but WITHOUT
4674# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4675# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4676# version 2 for more details (a copy is included in the LICENSE file that
4677# accompanied this code).
4678#
4679# You should have received a copy of the GNU General Public License version
4680# 2 along with this work; if not, write to the Free Software Foundation,
4681# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4682#
4683# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4684# or visit www.oracle.com if you need additional information or have any
4685# questions.
4686#
4687
4688################################################################################
4689# Setup the standard C/C++ runtime libraries.
4690#
4691# Most importantly, determine if stdc++ should be linked statically or
4692# dynamically.
4693################################################################################
4694
4695
4696#
4697# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4698# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4699#
4700# This code is free software; you can redistribute it and/or modify it
4701# under the terms of the GNU General Public License version 2 only, as
4702# published by the Free Software Foundation.  Oracle designates this
4703# particular file as subject to the "Classpath" exception as provided
4704# by Oracle in the LICENSE file that accompanied this code.
4705#
4706# This code is distributed in the hope that it will be useful, but WITHOUT
4707# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4708# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4709# version 2 for more details (a copy is included in the LICENSE file that
4710# accompanied this code).
4711#
4712# You should have received a copy of the GNU General Public License version
4713# 2 along with this work; if not, write to the Free Software Foundation,
4714# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4715#
4716# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4717# or visit www.oracle.com if you need additional information or have any
4718# questions.
4719#
4720
4721################################################################################
4722# Setup X11 Windows system
4723################################################################################
4724
4725
4726
4727################################################################################
4728# Determine which libraries are needed for this configuration
4729################################################################################
4730
4731
4732################################################################################
4733# Parse library options, and setup needed libraries
4734################################################################################
4735
4736
4737################################################################################
4738# Setup llvm (Low-Level VM)
4739################################################################################
4740
4741
4742################################################################################
4743# Setup various libraries, typically small system libraries
4744################################################################################
4745
4746
4747################################################################################
4748# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4749# redistribute it in the test image.
4750################################################################################
4751
4752
4753
4754#
4755# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4756# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4757#
4758# This code is free software; you can redistribute it and/or modify it
4759# under the terms of the GNU General Public License version 2 only, as
4760# published by the Free Software Foundation.  Oracle designates this
4761# particular file as subject to the "Classpath" exception as provided
4762# by Oracle in the LICENSE file that accompanied this code.
4763#
4764# This code is distributed in the hope that it will be useful, but WITHOUT
4765# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4766# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4767# version 2 for more details (a copy is included in the LICENSE file that
4768# accompanied this code).
4769#
4770# You should have received a copy of the GNU General Public License version
4771# 2 along with this work; if not, write to the Free Software Foundation,
4772# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4773#
4774# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4775# or visit www.oracle.com if you need additional information or have any
4776# questions.
4777#
4778
4779# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4780# Converts autoconf style CPU name to OpenJDK style, into
4781# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4782
4783
4784# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4785# Converts autoconf style OS name to OpenJDK style, into
4786# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4787
4788
4789# Expects $host_os $host_cpu $build_os and $build_cpu
4790# and $with_target_bits to have been setup!
4791#
4792# Translate the standard triplet(quadruplet) definition
4793# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4794# OPENJDK_BUILD_OS, etc.
4795
4796
4797# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4798# accordingly. Must be done after setting up build and target system, but before
4799# doing anything else with these values.
4800
4801
4802# Setup the legacy variables, for controlling the old makefiles.
4803#
4804
4805
4806# $1 - Either TARGET or BUILD to setup the variables for.
4807
4808
4809
4810
4811#%%% Build and target systems %%%
4812
4813
4814
4815
4816# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4817# Add -mX to various FLAGS variables.
4818
4819
4820
4821
4822
4823
4824#
4825# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4826# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4827#
4828# This code is free software; you can redistribute it and/or modify it
4829# under the terms of the GNU General Public License version 2 only, as
4830# published by the Free Software Foundation.  Oracle designates this
4831# particular file as subject to the "Classpath" exception as provided
4832# by Oracle in the LICENSE file that accompanied this code.
4833#
4834# This code is distributed in the hope that it will be useful, but WITHOUT
4835# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4836# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4837# version 2 for more details (a copy is included in the LICENSE file that
4838# accompanied this code).
4839#
4840# You should have received a copy of the GNU General Public License version
4841# 2 along with this work; if not, write to the Free Software Foundation,
4842# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4843#
4844# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4845# or visit www.oracle.com if you need additional information or have any
4846# questions.
4847#
4848
4849
4850
4851
4852
4853
4854
4855################################################################################
4856# Define a mechanism for importing extra prebuilt modules
4857#
4858
4859
4860
4861#
4862# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4863# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4864#
4865# This code is free software; you can redistribute it and/or modify it
4866# under the terms of the GNU General Public License version 2 only, as
4867# published by the Free Software Foundation.  Oracle designates this
4868# particular file as subject to the "Classpath" exception as provided
4869# by Oracle in the LICENSE file that accompanied this code.
4870#
4871# This code is distributed in the hope that it will be useful, but WITHOUT
4872# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4873# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4874# version 2 for more details (a copy is included in the LICENSE file that
4875# accompanied this code).
4876#
4877# You should have received a copy of the GNU General Public License version
4878# 2 along with this work; if not, write to the Free Software Foundation,
4879# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4880#
4881# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4882# or visit www.oracle.com if you need additional information or have any
4883# questions.
4884#
4885
4886########################################################################
4887# This file is responsible for detecting, verifying and setting up the
4888# toolchain, i.e. the compiler, linker and related utilities. It will setup
4889# proper paths to the binaries, but it will not setup any flags.
4890#
4891# The binaries used is determined by the toolchain type, which is the family of
4892# compilers and related tools that are used.
4893########################################################################
4894
4895
4896# All valid toolchains, regardless of platform (used by help.m4)
4897VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4898
4899# These toolchains are valid on different platforms
4900VALID_TOOLCHAINS_linux="gcc clang"
4901VALID_TOOLCHAINS_solaris="solstudio"
4902VALID_TOOLCHAINS_macosx="gcc clang"
4903VALID_TOOLCHAINS_aix="xlc"
4904VALID_TOOLCHAINS_windows="microsoft"
4905
4906# Toolchain descriptions
4907TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4908TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4909TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4910TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4911TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4912
4913# Minimum supported versions, empty means unspecified
4914TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4915TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4916TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4917TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4918TOOLCHAIN_MINIMUM_VERSION_xlc=""
4919
4920# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4921# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4922# $1 - optional variable prefix for compiler and version variables (BUILD_)
4923# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4924
4925
4926# Check if the configured compiler (C and C++) is of a specific version or
4927# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4928#
4929# Arguments:
4930#   VERSION:   The version string to check against the found version
4931#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4932#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4933#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4934
4935
4936
4937
4938# Setup a number of variables describing how native output files are
4939# named on this platform/toolchain.
4940
4941
4942# Determine which toolchain type to use, and make sure it is valid for this
4943# platform. Setup various information about the selected toolchain.
4944
4945
4946# Before we start detecting the toolchain executables, we might need some
4947# special setup, e.g. additional paths etc.
4948
4949
4950# Restore path, etc
4951
4952
4953# Check if a compiler is of the toolchain type we expect, and save the version
4954# information from it. If the compiler does not match the expected type,
4955# this function will abort using AC_MSG_ERROR. If it matches, the version will
4956# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4957# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4958#
4959# $1 = compiler to test (CC or CXX)
4960# $2 = human readable name of compiler (C or C++)
4961
4962
4963# Try to locate the given C or C++ compiler in the path, or otherwise.
4964#
4965# $1 = compiler to test (CC or CXX)
4966# $2 = human readable name of compiler (C or C++)
4967# $3 = list of compiler names to search for
4968
4969
4970# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4971# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4972# archiver (AR). Verify that the compilers are correct according to the
4973# toolchain type.
4974
4975
4976# Setup additional tools that is considered a part of the toolchain, but not the
4977# core part. Many of these are highly platform-specific and do not exist,
4978# and/or are not needed on all platforms.
4979
4980
4981# Setup the build tools (i.e, the compiler and linker used to build programs
4982# that should be run on the build platform, not the target platform, as a build
4983# helper). Since the non-cross-compile case uses the normal, target compilers
4984# for this, we can only do this after these have been setup.
4985
4986
4987# Setup legacy variables that are still needed as alternative ways to refer to
4988# parts of the toolchain.
4989
4990
4991# Do some additional checks on the detected tools.
4992
4993
4994# Setup the JTReg Regression Test Harness.
4995
4996
4997#
4998# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4999# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5000#
5001# This code is free software; you can redistribute it and/or modify it
5002# under the terms of the GNU General Public License version 2 only, as
5003# published by the Free Software Foundation.  Oracle designates this
5004# particular file as subject to the "Classpath" exception as provided
5005# by Oracle in the LICENSE file that accompanied this code.
5006#
5007# This code is distributed in the hope that it will be useful, but WITHOUT
5008# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5009# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5010# version 2 for more details (a copy is included in the LICENSE file that
5011# accompanied this code).
5012#
5013# You should have received a copy of the GNU General Public License version
5014# 2 along with this work; if not, write to the Free Software Foundation,
5015# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5016#
5017# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5018# or visit www.oracle.com if you need additional information or have any
5019# questions.
5020#
5021
5022################################################################################
5023# The order of these defines the priority by which we try to find them.
5024VALID_VS_VERSIONS="2013 2012 2010"
5025
5026VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5027VS_VERSION_INTERNAL_2010=100
5028VS_MSVCR_2010=msvcr100.dll
5029# We don't use msvcp on Visual Studio 2010
5030#VS_MSVCP_2010=msvcp100.dll
5031VS_ENVVAR_2010="VS100COMNTOOLS"
5032VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5033VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5034VS_VS_PLATFORM_NAME_2010="v100"
5035VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5036
5037VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5038VS_VERSION_INTERNAL_2012=110
5039VS_MSVCR_2012=msvcr110.dll
5040VS_MSVCP_2012=msvcp110.dll
5041VS_ENVVAR_2012="VS110COMNTOOLS"
5042VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5043VS_SDK_INSTALLDIR_2012=
5044VS_VS_PLATFORM_NAME_2012="v110"
5045VS_SDK_PLATFORM_NAME_2012=
5046
5047VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5048VS_VERSION_INTERNAL_2013=120
5049VS_MSVCR_2013=msvcr120.dll
5050VS_MSVCP_2013=msvcp120.dll
5051VS_ENVVAR_2013="VS120COMNTOOLS"
5052VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5053VS_SDK_INSTALLDIR_2013=
5054VS_VS_PLATFORM_NAME_2013="v120"
5055VS_SDK_PLATFORM_NAME_2013=
5056
5057################################################################################
5058
5059
5060
5061################################################################################
5062
5063
5064
5065################################################################################
5066# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5067# build environment and assigns it to VS_ENV_CMD
5068
5069
5070################################################################################
5071
5072
5073
5074################################################################################
5075# Check if the VS env variables were setup prior to running configure.
5076# If not, then find vcvarsall.bat and run it automatically, and integrate
5077# the set env variables into the spec file.
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092# This line needs to be here, verbatim, after all includes and the dummy hook
5093# definitions. It is replaced with custom functionality when building
5094# custom sources.
5095#CUSTOM_AUTOCONF_INCLUDE
5096
5097# Do not change or remove the following line, it is needed for consistency checks:
5098DATE_WHEN_GENERATED=1474459654
5099
5100###############################################################################
5101#
5102# Initialization / Boot-strapping
5103#
5104# The bootstrapping process needs to solve the "chicken or the egg" problem,
5105# thus it jumps back and forth, each time gaining something needed later on.
5106#
5107###############################################################################
5108
5109# If we are requested to print additional help, do that and then exit.
5110# This must be the very first call.
5111
5112  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5113
5114    # Print available toolchains
5115    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5116    $PRINTF "Which are valid to use depends on the build platform.\n"
5117    for toolchain in $VALID_TOOLCHAINS_all; do
5118      # Use indirect variable referencing
5119      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5120      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5121      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5122    done
5123    $PRINTF "\n"
5124
5125    # Print available jvm features
5126    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5127    $PRINTF "Which are valid to use depends on the target platform.\n  "
5128    $PRINTF "%s " $VALID_JVM_FEATURES
5129    $PRINTF "\n"
5130
5131    # And now exit directly
5132    exit 0
5133  fi
5134
5135
5136# Basic initialization that must happen first of all in the normal process.
5137
5138  # Save the original command line. This is passed to us by the wrapper configure script.
5139
5140  # Save the path variable before it gets changed
5141  ORIGINAL_PATH="$PATH"
5142
5143  DATE_WHEN_CONFIGURED=`LANG=C date`
5144
5145  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5146$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5147  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5148$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5149
5150
5151  # Start with tools that do not need have cross compilation support
5152  # and can be expected to be found in the default PATH. These tools are
5153  # used by configure.
5154
5155  # First are all the simple required tools.
5156
5157
5158
5159  # Publish this variable in the help.
5160
5161
5162  if [ -z "${BASENAME+x}" ]; then
5163    # The variable is not set by user, try to locate tool using the code snippet
5164    for ac_prog in basename
5165do
5166  # Extract the first word of "$ac_prog", so it can be a program name with args.
5167set dummy $ac_prog; ac_word=$2
5168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5169$as_echo_n "checking for $ac_word... " >&6; }
5170if ${ac_cv_path_BASENAME+:} false; then :
5171  $as_echo_n "(cached) " >&6
5172else
5173  case $BASENAME in
5174  [\\/]* | ?:[\\/]*)
5175  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5176  ;;
5177  *)
5178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5179for as_dir in $PATH
5180do
5181  IFS=$as_save_IFS
5182  test -z "$as_dir" && as_dir=.
5183    for ac_exec_ext in '' $ac_executable_extensions; do
5184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5185    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5187    break 2
5188  fi
5189done
5190  done
5191IFS=$as_save_IFS
5192
5193  ;;
5194esac
5195fi
5196BASENAME=$ac_cv_path_BASENAME
5197if test -n "$BASENAME"; then
5198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5199$as_echo "$BASENAME" >&6; }
5200else
5201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5202$as_echo "no" >&6; }
5203fi
5204
5205
5206  test -n "$BASENAME" && break
5207done
5208
5209  else
5210    # The variable is set, but is it from the command line or the environment?
5211
5212    # Try to remove the string !BASENAME! from our list.
5213    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5214    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5215      # If it failed, the variable was not from the command line. Ignore it,
5216      # but warn the user (except for BASH, which is always set by the calling BASH).
5217      if test "xBASENAME" != xBASH; then
5218        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5219$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5220      fi
5221      # Try to locate tool using the code snippet
5222      for ac_prog in basename
5223do
5224  # Extract the first word of "$ac_prog", so it can be a program name with args.
5225set dummy $ac_prog; ac_word=$2
5226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5227$as_echo_n "checking for $ac_word... " >&6; }
5228if ${ac_cv_path_BASENAME+:} false; then :
5229  $as_echo_n "(cached) " >&6
5230else
5231  case $BASENAME in
5232  [\\/]* | ?:[\\/]*)
5233  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5234  ;;
5235  *)
5236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5237for as_dir in $PATH
5238do
5239  IFS=$as_save_IFS
5240  test -z "$as_dir" && as_dir=.
5241    for ac_exec_ext in '' $ac_executable_extensions; do
5242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5243    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5245    break 2
5246  fi
5247done
5248  done
5249IFS=$as_save_IFS
5250
5251  ;;
5252esac
5253fi
5254BASENAME=$ac_cv_path_BASENAME
5255if test -n "$BASENAME"; then
5256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5257$as_echo "$BASENAME" >&6; }
5258else
5259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5260$as_echo "no" >&6; }
5261fi
5262
5263
5264  test -n "$BASENAME" && break
5265done
5266
5267    else
5268      # If it succeeded, then it was overridden by the user. We will use it
5269      # for the tool.
5270
5271      # First remove it from the list of overridden variables, so we can test
5272      # for unknown variables in the end.
5273      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5274
5275      # Check if we try to supply an empty value
5276      if test "x$BASENAME" = x; then
5277        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5278$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5279        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5280$as_echo_n "checking for BASENAME... " >&6; }
5281        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5282$as_echo "disabled" >&6; }
5283      else
5284        # Check if the provided tool contains a complete path.
5285        tool_specified="$BASENAME"
5286        tool_basename="${tool_specified##*/}"
5287        if test "x$tool_basename" = "x$tool_specified"; then
5288          # A command without a complete path is provided, search $PATH.
5289          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5290$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5291          # Extract the first word of "$tool_basename", so it can be a program name with args.
5292set dummy $tool_basename; ac_word=$2
5293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5294$as_echo_n "checking for $ac_word... " >&6; }
5295if ${ac_cv_path_BASENAME+:} false; then :
5296  $as_echo_n "(cached) " >&6
5297else
5298  case $BASENAME in
5299  [\\/]* | ?:[\\/]*)
5300  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5301  ;;
5302  *)
5303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5304for as_dir in $PATH
5305do
5306  IFS=$as_save_IFS
5307  test -z "$as_dir" && as_dir=.
5308    for ac_exec_ext in '' $ac_executable_extensions; do
5309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5310    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5312    break 2
5313  fi
5314done
5315  done
5316IFS=$as_save_IFS
5317
5318  ;;
5319esac
5320fi
5321BASENAME=$ac_cv_path_BASENAME
5322if test -n "$BASENAME"; then
5323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5324$as_echo "$BASENAME" >&6; }
5325else
5326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5327$as_echo "no" >&6; }
5328fi
5329
5330
5331          if test "x$BASENAME" = x; then
5332            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5333          fi
5334        else
5335          # Otherwise we believe it is a complete path. Use it as it is.
5336          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5337$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5338          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5339$as_echo_n "checking for BASENAME... " >&6; }
5340          if test ! -x "$tool_specified"; then
5341            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5342$as_echo "not found" >&6; }
5343            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5344          fi
5345          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5346$as_echo "$tool_specified" >&6; }
5347        fi
5348      fi
5349    fi
5350
5351  fi
5352
5353
5354
5355  if test "x$BASENAME" = x; then
5356    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5357  fi
5358
5359
5360
5361
5362
5363  # Publish this variable in the help.
5364
5365
5366  if [ -z "${BASH+x}" ]; then
5367    # The variable is not set by user, try to locate tool using the code snippet
5368    for ac_prog in bash
5369do
5370  # Extract the first word of "$ac_prog", so it can be a program name with args.
5371set dummy $ac_prog; ac_word=$2
5372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5373$as_echo_n "checking for $ac_word... " >&6; }
5374if ${ac_cv_path_BASH+:} false; then :
5375  $as_echo_n "(cached) " >&6
5376else
5377  case $BASH in
5378  [\\/]* | ?:[\\/]*)
5379  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5380  ;;
5381  *)
5382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5383for as_dir in $PATH
5384do
5385  IFS=$as_save_IFS
5386  test -z "$as_dir" && as_dir=.
5387    for ac_exec_ext in '' $ac_executable_extensions; do
5388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5389    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5391    break 2
5392  fi
5393done
5394  done
5395IFS=$as_save_IFS
5396
5397  ;;
5398esac
5399fi
5400BASH=$ac_cv_path_BASH
5401if test -n "$BASH"; then
5402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5403$as_echo "$BASH" >&6; }
5404else
5405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5406$as_echo "no" >&6; }
5407fi
5408
5409
5410  test -n "$BASH" && break
5411done
5412
5413  else
5414    # The variable is set, but is it from the command line or the environment?
5415
5416    # Try to remove the string !BASH! from our list.
5417    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5418    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5419      # If it failed, the variable was not from the command line. Ignore it,
5420      # but warn the user (except for BASH, which is always set by the calling BASH).
5421      if test "xBASH" != xBASH; then
5422        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5423$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5424      fi
5425      # Try to locate tool using the code snippet
5426      for ac_prog in bash
5427do
5428  # Extract the first word of "$ac_prog", so it can be a program name with args.
5429set dummy $ac_prog; ac_word=$2
5430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5431$as_echo_n "checking for $ac_word... " >&6; }
5432if ${ac_cv_path_BASH+:} false; then :
5433  $as_echo_n "(cached) " >&6
5434else
5435  case $BASH in
5436  [\\/]* | ?:[\\/]*)
5437  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5438  ;;
5439  *)
5440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5441for as_dir in $PATH
5442do
5443  IFS=$as_save_IFS
5444  test -z "$as_dir" && as_dir=.
5445    for ac_exec_ext in '' $ac_executable_extensions; do
5446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5447    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5449    break 2
5450  fi
5451done
5452  done
5453IFS=$as_save_IFS
5454
5455  ;;
5456esac
5457fi
5458BASH=$ac_cv_path_BASH
5459if test -n "$BASH"; then
5460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5461$as_echo "$BASH" >&6; }
5462else
5463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5464$as_echo "no" >&6; }
5465fi
5466
5467
5468  test -n "$BASH" && break
5469done
5470
5471    else
5472      # If it succeeded, then it was overridden by the user. We will use it
5473      # for the tool.
5474
5475      # First remove it from the list of overridden variables, so we can test
5476      # for unknown variables in the end.
5477      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5478
5479      # Check if we try to supply an empty value
5480      if test "x$BASH" = x; then
5481        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5482$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5483        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5484$as_echo_n "checking for BASH... " >&6; }
5485        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5486$as_echo "disabled" >&6; }
5487      else
5488        # Check if the provided tool contains a complete path.
5489        tool_specified="$BASH"
5490        tool_basename="${tool_specified##*/}"
5491        if test "x$tool_basename" = "x$tool_specified"; then
5492          # A command without a complete path is provided, search $PATH.
5493          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5494$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5495          # Extract the first word of "$tool_basename", so it can be a program name with args.
5496set dummy $tool_basename; ac_word=$2
5497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5498$as_echo_n "checking for $ac_word... " >&6; }
5499if ${ac_cv_path_BASH+:} false; then :
5500  $as_echo_n "(cached) " >&6
5501else
5502  case $BASH in
5503  [\\/]* | ?:[\\/]*)
5504  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5505  ;;
5506  *)
5507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5508for as_dir in $PATH
5509do
5510  IFS=$as_save_IFS
5511  test -z "$as_dir" && as_dir=.
5512    for ac_exec_ext in '' $ac_executable_extensions; do
5513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5514    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5516    break 2
5517  fi
5518done
5519  done
5520IFS=$as_save_IFS
5521
5522  ;;
5523esac
5524fi
5525BASH=$ac_cv_path_BASH
5526if test -n "$BASH"; then
5527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5528$as_echo "$BASH" >&6; }
5529else
5530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5531$as_echo "no" >&6; }
5532fi
5533
5534
5535          if test "x$BASH" = x; then
5536            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5537          fi
5538        else
5539          # Otherwise we believe it is a complete path. Use it as it is.
5540          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5541$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5542          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5543$as_echo_n "checking for BASH... " >&6; }
5544          if test ! -x "$tool_specified"; then
5545            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5546$as_echo "not found" >&6; }
5547            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5548          fi
5549          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5550$as_echo "$tool_specified" >&6; }
5551        fi
5552      fi
5553    fi
5554
5555  fi
5556
5557
5558
5559  if test "x$BASH" = x; then
5560    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5561  fi
5562
5563
5564
5565
5566
5567  # Publish this variable in the help.
5568
5569
5570  if [ -z "${CAT+x}" ]; then
5571    # The variable is not set by user, try to locate tool using the code snippet
5572    for ac_prog in cat
5573do
5574  # Extract the first word of "$ac_prog", so it can be a program name with args.
5575set dummy $ac_prog; ac_word=$2
5576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5577$as_echo_n "checking for $ac_word... " >&6; }
5578if ${ac_cv_path_CAT+:} false; then :
5579  $as_echo_n "(cached) " >&6
5580else
5581  case $CAT in
5582  [\\/]* | ?:[\\/]*)
5583  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5584  ;;
5585  *)
5586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5587for as_dir in $PATH
5588do
5589  IFS=$as_save_IFS
5590  test -z "$as_dir" && as_dir=.
5591    for ac_exec_ext in '' $ac_executable_extensions; do
5592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5593    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5595    break 2
5596  fi
5597done
5598  done
5599IFS=$as_save_IFS
5600
5601  ;;
5602esac
5603fi
5604CAT=$ac_cv_path_CAT
5605if test -n "$CAT"; then
5606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5607$as_echo "$CAT" >&6; }
5608else
5609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5610$as_echo "no" >&6; }
5611fi
5612
5613
5614  test -n "$CAT" && break
5615done
5616
5617  else
5618    # The variable is set, but is it from the command line or the environment?
5619
5620    # Try to remove the string !CAT! from our list.
5621    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5622    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5623      # If it failed, the variable was not from the command line. Ignore it,
5624      # but warn the user (except for BASH, which is always set by the calling BASH).
5625      if test "xCAT" != xBASH; then
5626        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5627$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5628      fi
5629      # Try to locate tool using the code snippet
5630      for ac_prog in cat
5631do
5632  # Extract the first word of "$ac_prog", so it can be a program name with args.
5633set dummy $ac_prog; ac_word=$2
5634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5635$as_echo_n "checking for $ac_word... " >&6; }
5636if ${ac_cv_path_CAT+:} false; then :
5637  $as_echo_n "(cached) " >&6
5638else
5639  case $CAT in
5640  [\\/]* | ?:[\\/]*)
5641  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5642  ;;
5643  *)
5644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5645for as_dir in $PATH
5646do
5647  IFS=$as_save_IFS
5648  test -z "$as_dir" && as_dir=.
5649    for ac_exec_ext in '' $ac_executable_extensions; do
5650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5651    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5653    break 2
5654  fi
5655done
5656  done
5657IFS=$as_save_IFS
5658
5659  ;;
5660esac
5661fi
5662CAT=$ac_cv_path_CAT
5663if test -n "$CAT"; then
5664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5665$as_echo "$CAT" >&6; }
5666else
5667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5668$as_echo "no" >&6; }
5669fi
5670
5671
5672  test -n "$CAT" && break
5673done
5674
5675    else
5676      # If it succeeded, then it was overridden by the user. We will use it
5677      # for the tool.
5678
5679      # First remove it from the list of overridden variables, so we can test
5680      # for unknown variables in the end.
5681      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5682
5683      # Check if we try to supply an empty value
5684      if test "x$CAT" = x; then
5685        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5686$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5687        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5688$as_echo_n "checking for CAT... " >&6; }
5689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5690$as_echo "disabled" >&6; }
5691      else
5692        # Check if the provided tool contains a complete path.
5693        tool_specified="$CAT"
5694        tool_basename="${tool_specified##*/}"
5695        if test "x$tool_basename" = "x$tool_specified"; then
5696          # A command without a complete path is provided, search $PATH.
5697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5698$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5699          # Extract the first word of "$tool_basename", so it can be a program name with args.
5700set dummy $tool_basename; ac_word=$2
5701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5702$as_echo_n "checking for $ac_word... " >&6; }
5703if ${ac_cv_path_CAT+:} false; then :
5704  $as_echo_n "(cached) " >&6
5705else
5706  case $CAT in
5707  [\\/]* | ?:[\\/]*)
5708  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5709  ;;
5710  *)
5711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5712for as_dir in $PATH
5713do
5714  IFS=$as_save_IFS
5715  test -z "$as_dir" && as_dir=.
5716    for ac_exec_ext in '' $ac_executable_extensions; do
5717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5718    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5720    break 2
5721  fi
5722done
5723  done
5724IFS=$as_save_IFS
5725
5726  ;;
5727esac
5728fi
5729CAT=$ac_cv_path_CAT
5730if test -n "$CAT"; then
5731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5732$as_echo "$CAT" >&6; }
5733else
5734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5735$as_echo "no" >&6; }
5736fi
5737
5738
5739          if test "x$CAT" = x; then
5740            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5741          fi
5742        else
5743          # Otherwise we believe it is a complete path. Use it as it is.
5744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5745$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5746          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5747$as_echo_n "checking for CAT... " >&6; }
5748          if test ! -x "$tool_specified"; then
5749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5750$as_echo "not found" >&6; }
5751            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5752          fi
5753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5754$as_echo "$tool_specified" >&6; }
5755        fi
5756      fi
5757    fi
5758
5759  fi
5760
5761
5762
5763  if test "x$CAT" = x; then
5764    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5765  fi
5766
5767
5768
5769
5770
5771  # Publish this variable in the help.
5772
5773
5774  if [ -z "${CHMOD+x}" ]; then
5775    # The variable is not set by user, try to locate tool using the code snippet
5776    for ac_prog in chmod
5777do
5778  # Extract the first word of "$ac_prog", so it can be a program name with args.
5779set dummy $ac_prog; ac_word=$2
5780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5781$as_echo_n "checking for $ac_word... " >&6; }
5782if ${ac_cv_path_CHMOD+:} false; then :
5783  $as_echo_n "(cached) " >&6
5784else
5785  case $CHMOD in
5786  [\\/]* | ?:[\\/]*)
5787  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5788  ;;
5789  *)
5790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5791for as_dir in $PATH
5792do
5793  IFS=$as_save_IFS
5794  test -z "$as_dir" && as_dir=.
5795    for ac_exec_ext in '' $ac_executable_extensions; do
5796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5797    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5799    break 2
5800  fi
5801done
5802  done
5803IFS=$as_save_IFS
5804
5805  ;;
5806esac
5807fi
5808CHMOD=$ac_cv_path_CHMOD
5809if test -n "$CHMOD"; then
5810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5811$as_echo "$CHMOD" >&6; }
5812else
5813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5814$as_echo "no" >&6; }
5815fi
5816
5817
5818  test -n "$CHMOD" && break
5819done
5820
5821  else
5822    # The variable is set, but is it from the command line or the environment?
5823
5824    # Try to remove the string !CHMOD! from our list.
5825    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5826    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5827      # If it failed, the variable was not from the command line. Ignore it,
5828      # but warn the user (except for BASH, which is always set by the calling BASH).
5829      if test "xCHMOD" != xBASH; then
5830        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5831$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5832      fi
5833      # Try to locate tool using the code snippet
5834      for ac_prog in chmod
5835do
5836  # Extract the first word of "$ac_prog", so it can be a program name with args.
5837set dummy $ac_prog; ac_word=$2
5838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5839$as_echo_n "checking for $ac_word... " >&6; }
5840if ${ac_cv_path_CHMOD+:} false; then :
5841  $as_echo_n "(cached) " >&6
5842else
5843  case $CHMOD in
5844  [\\/]* | ?:[\\/]*)
5845  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5846  ;;
5847  *)
5848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5849for as_dir in $PATH
5850do
5851  IFS=$as_save_IFS
5852  test -z "$as_dir" && as_dir=.
5853    for ac_exec_ext in '' $ac_executable_extensions; do
5854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5855    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5857    break 2
5858  fi
5859done
5860  done
5861IFS=$as_save_IFS
5862
5863  ;;
5864esac
5865fi
5866CHMOD=$ac_cv_path_CHMOD
5867if test -n "$CHMOD"; then
5868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5869$as_echo "$CHMOD" >&6; }
5870else
5871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5872$as_echo "no" >&6; }
5873fi
5874
5875
5876  test -n "$CHMOD" && break
5877done
5878
5879    else
5880      # If it succeeded, then it was overridden by the user. We will use it
5881      # for the tool.
5882
5883      # First remove it from the list of overridden variables, so we can test
5884      # for unknown variables in the end.
5885      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5886
5887      # Check if we try to supply an empty value
5888      if test "x$CHMOD" = x; then
5889        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5890$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5891        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5892$as_echo_n "checking for CHMOD... " >&6; }
5893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5894$as_echo "disabled" >&6; }
5895      else
5896        # Check if the provided tool contains a complete path.
5897        tool_specified="$CHMOD"
5898        tool_basename="${tool_specified##*/}"
5899        if test "x$tool_basename" = "x$tool_specified"; then
5900          # A command without a complete path is provided, search $PATH.
5901          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5902$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5903          # Extract the first word of "$tool_basename", so it can be a program name with args.
5904set dummy $tool_basename; ac_word=$2
5905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5906$as_echo_n "checking for $ac_word... " >&6; }
5907if ${ac_cv_path_CHMOD+:} false; then :
5908  $as_echo_n "(cached) " >&6
5909else
5910  case $CHMOD in
5911  [\\/]* | ?:[\\/]*)
5912  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5913  ;;
5914  *)
5915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5916for as_dir in $PATH
5917do
5918  IFS=$as_save_IFS
5919  test -z "$as_dir" && as_dir=.
5920    for ac_exec_ext in '' $ac_executable_extensions; do
5921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5922    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5924    break 2
5925  fi
5926done
5927  done
5928IFS=$as_save_IFS
5929
5930  ;;
5931esac
5932fi
5933CHMOD=$ac_cv_path_CHMOD
5934if test -n "$CHMOD"; then
5935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5936$as_echo "$CHMOD" >&6; }
5937else
5938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5939$as_echo "no" >&6; }
5940fi
5941
5942
5943          if test "x$CHMOD" = x; then
5944            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5945          fi
5946        else
5947          # Otherwise we believe it is a complete path. Use it as it is.
5948          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5949$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5950          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5951$as_echo_n "checking for CHMOD... " >&6; }
5952          if test ! -x "$tool_specified"; then
5953            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5954$as_echo "not found" >&6; }
5955            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5956          fi
5957          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5958$as_echo "$tool_specified" >&6; }
5959        fi
5960      fi
5961    fi
5962
5963  fi
5964
5965
5966
5967  if test "x$CHMOD" = x; then
5968    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5969  fi
5970
5971
5972
5973
5974
5975  # Publish this variable in the help.
5976
5977
5978  if [ -z "${CMP+x}" ]; then
5979    # The variable is not set by user, try to locate tool using the code snippet
5980    for ac_prog in cmp
5981do
5982  # Extract the first word of "$ac_prog", so it can be a program name with args.
5983set dummy $ac_prog; ac_word=$2
5984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5985$as_echo_n "checking for $ac_word... " >&6; }
5986if ${ac_cv_path_CMP+:} false; then :
5987  $as_echo_n "(cached) " >&6
5988else
5989  case $CMP in
5990  [\\/]* | ?:[\\/]*)
5991  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5992  ;;
5993  *)
5994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995for as_dir in $PATH
5996do
5997  IFS=$as_save_IFS
5998  test -z "$as_dir" && as_dir=.
5999    for ac_exec_ext in '' $ac_executable_extensions; do
6000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6001    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6003    break 2
6004  fi
6005done
6006  done
6007IFS=$as_save_IFS
6008
6009  ;;
6010esac
6011fi
6012CMP=$ac_cv_path_CMP
6013if test -n "$CMP"; then
6014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6015$as_echo "$CMP" >&6; }
6016else
6017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6018$as_echo "no" >&6; }
6019fi
6020
6021
6022  test -n "$CMP" && break
6023done
6024
6025  else
6026    # The variable is set, but is it from the command line or the environment?
6027
6028    # Try to remove the string !CMP! from our list.
6029    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6030    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6031      # If it failed, the variable was not from the command line. Ignore it,
6032      # but warn the user (except for BASH, which is always set by the calling BASH).
6033      if test "xCMP" != xBASH; then
6034        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6035$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6036      fi
6037      # Try to locate tool using the code snippet
6038      for ac_prog in cmp
6039do
6040  # Extract the first word of "$ac_prog", so it can be a program name with args.
6041set dummy $ac_prog; ac_word=$2
6042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6043$as_echo_n "checking for $ac_word... " >&6; }
6044if ${ac_cv_path_CMP+:} false; then :
6045  $as_echo_n "(cached) " >&6
6046else
6047  case $CMP in
6048  [\\/]* | ?:[\\/]*)
6049  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6050  ;;
6051  *)
6052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6053for as_dir in $PATH
6054do
6055  IFS=$as_save_IFS
6056  test -z "$as_dir" && as_dir=.
6057    for ac_exec_ext in '' $ac_executable_extensions; do
6058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6059    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6061    break 2
6062  fi
6063done
6064  done
6065IFS=$as_save_IFS
6066
6067  ;;
6068esac
6069fi
6070CMP=$ac_cv_path_CMP
6071if test -n "$CMP"; then
6072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6073$as_echo "$CMP" >&6; }
6074else
6075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6076$as_echo "no" >&6; }
6077fi
6078
6079
6080  test -n "$CMP" && break
6081done
6082
6083    else
6084      # If it succeeded, then it was overridden by the user. We will use it
6085      # for the tool.
6086
6087      # First remove it from the list of overridden variables, so we can test
6088      # for unknown variables in the end.
6089      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6090
6091      # Check if we try to supply an empty value
6092      if test "x$CMP" = x; then
6093        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6094$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6096$as_echo_n "checking for CMP... " >&6; }
6097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6098$as_echo "disabled" >&6; }
6099      else
6100        # Check if the provided tool contains a complete path.
6101        tool_specified="$CMP"
6102        tool_basename="${tool_specified##*/}"
6103        if test "x$tool_basename" = "x$tool_specified"; then
6104          # A command without a complete path is provided, search $PATH.
6105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6106$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6107          # Extract the first word of "$tool_basename", so it can be a program name with args.
6108set dummy $tool_basename; ac_word=$2
6109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6110$as_echo_n "checking for $ac_word... " >&6; }
6111if ${ac_cv_path_CMP+:} false; then :
6112  $as_echo_n "(cached) " >&6
6113else
6114  case $CMP in
6115  [\\/]* | ?:[\\/]*)
6116  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6117  ;;
6118  *)
6119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6120for as_dir in $PATH
6121do
6122  IFS=$as_save_IFS
6123  test -z "$as_dir" && as_dir=.
6124    for ac_exec_ext in '' $ac_executable_extensions; do
6125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6126    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6128    break 2
6129  fi
6130done
6131  done
6132IFS=$as_save_IFS
6133
6134  ;;
6135esac
6136fi
6137CMP=$ac_cv_path_CMP
6138if test -n "$CMP"; then
6139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6140$as_echo "$CMP" >&6; }
6141else
6142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6143$as_echo "no" >&6; }
6144fi
6145
6146
6147          if test "x$CMP" = x; then
6148            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6149          fi
6150        else
6151          # Otherwise we believe it is a complete path. Use it as it is.
6152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6153$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6154          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6155$as_echo_n "checking for CMP... " >&6; }
6156          if test ! -x "$tool_specified"; then
6157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6158$as_echo "not found" >&6; }
6159            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6160          fi
6161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6162$as_echo "$tool_specified" >&6; }
6163        fi
6164      fi
6165    fi
6166
6167  fi
6168
6169
6170
6171  if test "x$CMP" = x; then
6172    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6173  fi
6174
6175
6176
6177
6178
6179  # Publish this variable in the help.
6180
6181
6182  if [ -z "${COMM+x}" ]; then
6183    # The variable is not set by user, try to locate tool using the code snippet
6184    for ac_prog in comm
6185do
6186  # Extract the first word of "$ac_prog", so it can be a program name with args.
6187set dummy $ac_prog; ac_word=$2
6188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6189$as_echo_n "checking for $ac_word... " >&6; }
6190if ${ac_cv_path_COMM+:} false; then :
6191  $as_echo_n "(cached) " >&6
6192else
6193  case $COMM in
6194  [\\/]* | ?:[\\/]*)
6195  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6196  ;;
6197  *)
6198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6199for as_dir in $PATH
6200do
6201  IFS=$as_save_IFS
6202  test -z "$as_dir" && as_dir=.
6203    for ac_exec_ext in '' $ac_executable_extensions; do
6204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6205    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6207    break 2
6208  fi
6209done
6210  done
6211IFS=$as_save_IFS
6212
6213  ;;
6214esac
6215fi
6216COMM=$ac_cv_path_COMM
6217if test -n "$COMM"; then
6218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6219$as_echo "$COMM" >&6; }
6220else
6221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6222$as_echo "no" >&6; }
6223fi
6224
6225
6226  test -n "$COMM" && break
6227done
6228
6229  else
6230    # The variable is set, but is it from the command line or the environment?
6231
6232    # Try to remove the string !COMM! from our list.
6233    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6234    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6235      # If it failed, the variable was not from the command line. Ignore it,
6236      # but warn the user (except for BASH, which is always set by the calling BASH).
6237      if test "xCOMM" != xBASH; then
6238        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6239$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6240      fi
6241      # Try to locate tool using the code snippet
6242      for ac_prog in comm
6243do
6244  # Extract the first word of "$ac_prog", so it can be a program name with args.
6245set dummy $ac_prog; ac_word=$2
6246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6247$as_echo_n "checking for $ac_word... " >&6; }
6248if ${ac_cv_path_COMM+:} false; then :
6249  $as_echo_n "(cached) " >&6
6250else
6251  case $COMM in
6252  [\\/]* | ?:[\\/]*)
6253  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6254  ;;
6255  *)
6256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6257for as_dir in $PATH
6258do
6259  IFS=$as_save_IFS
6260  test -z "$as_dir" && as_dir=.
6261    for ac_exec_ext in '' $ac_executable_extensions; do
6262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6263    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6265    break 2
6266  fi
6267done
6268  done
6269IFS=$as_save_IFS
6270
6271  ;;
6272esac
6273fi
6274COMM=$ac_cv_path_COMM
6275if test -n "$COMM"; then
6276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6277$as_echo "$COMM" >&6; }
6278else
6279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6280$as_echo "no" >&6; }
6281fi
6282
6283
6284  test -n "$COMM" && break
6285done
6286
6287    else
6288      # If it succeeded, then it was overridden by the user. We will use it
6289      # for the tool.
6290
6291      # First remove it from the list of overridden variables, so we can test
6292      # for unknown variables in the end.
6293      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6294
6295      # Check if we try to supply an empty value
6296      if test "x$COMM" = x; then
6297        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6298$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6299        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6300$as_echo_n "checking for COMM... " >&6; }
6301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6302$as_echo "disabled" >&6; }
6303      else
6304        # Check if the provided tool contains a complete path.
6305        tool_specified="$COMM"
6306        tool_basename="${tool_specified##*/}"
6307        if test "x$tool_basename" = "x$tool_specified"; then
6308          # A command without a complete path is provided, search $PATH.
6309          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6310$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6311          # Extract the first word of "$tool_basename", so it can be a program name with args.
6312set dummy $tool_basename; ac_word=$2
6313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6314$as_echo_n "checking for $ac_word... " >&6; }
6315if ${ac_cv_path_COMM+:} false; then :
6316  $as_echo_n "(cached) " >&6
6317else
6318  case $COMM in
6319  [\\/]* | ?:[\\/]*)
6320  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6321  ;;
6322  *)
6323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6324for as_dir in $PATH
6325do
6326  IFS=$as_save_IFS
6327  test -z "$as_dir" && as_dir=.
6328    for ac_exec_ext in '' $ac_executable_extensions; do
6329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6330    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6332    break 2
6333  fi
6334done
6335  done
6336IFS=$as_save_IFS
6337
6338  ;;
6339esac
6340fi
6341COMM=$ac_cv_path_COMM
6342if test -n "$COMM"; then
6343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6344$as_echo "$COMM" >&6; }
6345else
6346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6347$as_echo "no" >&6; }
6348fi
6349
6350
6351          if test "x$COMM" = x; then
6352            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6353          fi
6354        else
6355          # Otherwise we believe it is a complete path. Use it as it is.
6356          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6357$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6358          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6359$as_echo_n "checking for COMM... " >&6; }
6360          if test ! -x "$tool_specified"; then
6361            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6362$as_echo "not found" >&6; }
6363            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6364          fi
6365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6366$as_echo "$tool_specified" >&6; }
6367        fi
6368      fi
6369    fi
6370
6371  fi
6372
6373
6374
6375  if test "x$COMM" = x; then
6376    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6377  fi
6378
6379
6380
6381
6382
6383  # Publish this variable in the help.
6384
6385
6386  if [ -z "${CP+x}" ]; then
6387    # The variable is not set by user, try to locate tool using the code snippet
6388    for ac_prog in cp
6389do
6390  # Extract the first word of "$ac_prog", so it can be a program name with args.
6391set dummy $ac_prog; ac_word=$2
6392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6393$as_echo_n "checking for $ac_word... " >&6; }
6394if ${ac_cv_path_CP+:} false; then :
6395  $as_echo_n "(cached) " >&6
6396else
6397  case $CP in
6398  [\\/]* | ?:[\\/]*)
6399  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6400  ;;
6401  *)
6402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6403for as_dir in $PATH
6404do
6405  IFS=$as_save_IFS
6406  test -z "$as_dir" && as_dir=.
6407    for ac_exec_ext in '' $ac_executable_extensions; do
6408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6409    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6411    break 2
6412  fi
6413done
6414  done
6415IFS=$as_save_IFS
6416
6417  ;;
6418esac
6419fi
6420CP=$ac_cv_path_CP
6421if test -n "$CP"; then
6422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6423$as_echo "$CP" >&6; }
6424else
6425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6426$as_echo "no" >&6; }
6427fi
6428
6429
6430  test -n "$CP" && break
6431done
6432
6433  else
6434    # The variable is set, but is it from the command line or the environment?
6435
6436    # Try to remove the string !CP! from our list.
6437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6439      # If it failed, the variable was not from the command line. Ignore it,
6440      # but warn the user (except for BASH, which is always set by the calling BASH).
6441      if test "xCP" != xBASH; then
6442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6443$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6444      fi
6445      # Try to locate tool using the code snippet
6446      for ac_prog in cp
6447do
6448  # Extract the first word of "$ac_prog", so it can be a program name with args.
6449set dummy $ac_prog; ac_word=$2
6450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6451$as_echo_n "checking for $ac_word... " >&6; }
6452if ${ac_cv_path_CP+:} false; then :
6453  $as_echo_n "(cached) " >&6
6454else
6455  case $CP in
6456  [\\/]* | ?:[\\/]*)
6457  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6458  ;;
6459  *)
6460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6461for as_dir in $PATH
6462do
6463  IFS=$as_save_IFS
6464  test -z "$as_dir" && as_dir=.
6465    for ac_exec_ext in '' $ac_executable_extensions; do
6466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6467    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6469    break 2
6470  fi
6471done
6472  done
6473IFS=$as_save_IFS
6474
6475  ;;
6476esac
6477fi
6478CP=$ac_cv_path_CP
6479if test -n "$CP"; then
6480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6481$as_echo "$CP" >&6; }
6482else
6483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6484$as_echo "no" >&6; }
6485fi
6486
6487
6488  test -n "$CP" && break
6489done
6490
6491    else
6492      # If it succeeded, then it was overridden by the user. We will use it
6493      # for the tool.
6494
6495      # First remove it from the list of overridden variables, so we can test
6496      # for unknown variables in the end.
6497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6498
6499      # Check if we try to supply an empty value
6500      if test "x$CP" = x; then
6501        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6502$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6503        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6504$as_echo_n "checking for CP... " >&6; }
6505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6506$as_echo "disabled" >&6; }
6507      else
6508        # Check if the provided tool contains a complete path.
6509        tool_specified="$CP"
6510        tool_basename="${tool_specified##*/}"
6511        if test "x$tool_basename" = "x$tool_specified"; then
6512          # A command without a complete path is provided, search $PATH.
6513          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6514$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6515          # Extract the first word of "$tool_basename", so it can be a program name with args.
6516set dummy $tool_basename; ac_word=$2
6517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6518$as_echo_n "checking for $ac_word... " >&6; }
6519if ${ac_cv_path_CP+:} false; then :
6520  $as_echo_n "(cached) " >&6
6521else
6522  case $CP in
6523  [\\/]* | ?:[\\/]*)
6524  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6525  ;;
6526  *)
6527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6528for as_dir in $PATH
6529do
6530  IFS=$as_save_IFS
6531  test -z "$as_dir" && as_dir=.
6532    for ac_exec_ext in '' $ac_executable_extensions; do
6533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6534    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6536    break 2
6537  fi
6538done
6539  done
6540IFS=$as_save_IFS
6541
6542  ;;
6543esac
6544fi
6545CP=$ac_cv_path_CP
6546if test -n "$CP"; then
6547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6548$as_echo "$CP" >&6; }
6549else
6550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6551$as_echo "no" >&6; }
6552fi
6553
6554
6555          if test "x$CP" = x; then
6556            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6557          fi
6558        else
6559          # Otherwise we believe it is a complete path. Use it as it is.
6560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6561$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6562          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6563$as_echo_n "checking for CP... " >&6; }
6564          if test ! -x "$tool_specified"; then
6565            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6566$as_echo "not found" >&6; }
6567            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6568          fi
6569          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6570$as_echo "$tool_specified" >&6; }
6571        fi
6572      fi
6573    fi
6574
6575  fi
6576
6577
6578
6579  if test "x$CP" = x; then
6580    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6581  fi
6582
6583
6584
6585
6586
6587  # Publish this variable in the help.
6588
6589
6590  if [ -z "${CUT+x}" ]; then
6591    # The variable is not set by user, try to locate tool using the code snippet
6592    for ac_prog in cut
6593do
6594  # Extract the first word of "$ac_prog", so it can be a program name with args.
6595set dummy $ac_prog; ac_word=$2
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6597$as_echo_n "checking for $ac_word... " >&6; }
6598if ${ac_cv_path_CUT+:} false; then :
6599  $as_echo_n "(cached) " >&6
6600else
6601  case $CUT in
6602  [\\/]* | ?:[\\/]*)
6603  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6604  ;;
6605  *)
6606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6607for as_dir in $PATH
6608do
6609  IFS=$as_save_IFS
6610  test -z "$as_dir" && as_dir=.
6611    for ac_exec_ext in '' $ac_executable_extensions; do
6612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6613    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6615    break 2
6616  fi
6617done
6618  done
6619IFS=$as_save_IFS
6620
6621  ;;
6622esac
6623fi
6624CUT=$ac_cv_path_CUT
6625if test -n "$CUT"; then
6626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6627$as_echo "$CUT" >&6; }
6628else
6629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6630$as_echo "no" >&6; }
6631fi
6632
6633
6634  test -n "$CUT" && break
6635done
6636
6637  else
6638    # The variable is set, but is it from the command line or the environment?
6639
6640    # Try to remove the string !CUT! from our list.
6641    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6642    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6643      # If it failed, the variable was not from the command line. Ignore it,
6644      # but warn the user (except for BASH, which is always set by the calling BASH).
6645      if test "xCUT" != xBASH; then
6646        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6647$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6648      fi
6649      # Try to locate tool using the code snippet
6650      for ac_prog in cut
6651do
6652  # Extract the first word of "$ac_prog", so it can be a program name with args.
6653set dummy $ac_prog; ac_word=$2
6654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6655$as_echo_n "checking for $ac_word... " >&6; }
6656if ${ac_cv_path_CUT+:} false; then :
6657  $as_echo_n "(cached) " >&6
6658else
6659  case $CUT in
6660  [\\/]* | ?:[\\/]*)
6661  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6662  ;;
6663  *)
6664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6665for as_dir in $PATH
6666do
6667  IFS=$as_save_IFS
6668  test -z "$as_dir" && as_dir=.
6669    for ac_exec_ext in '' $ac_executable_extensions; do
6670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6671    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6673    break 2
6674  fi
6675done
6676  done
6677IFS=$as_save_IFS
6678
6679  ;;
6680esac
6681fi
6682CUT=$ac_cv_path_CUT
6683if test -n "$CUT"; then
6684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6685$as_echo "$CUT" >&6; }
6686else
6687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6688$as_echo "no" >&6; }
6689fi
6690
6691
6692  test -n "$CUT" && break
6693done
6694
6695    else
6696      # If it succeeded, then it was overridden by the user. We will use it
6697      # for the tool.
6698
6699      # First remove it from the list of overridden variables, so we can test
6700      # for unknown variables in the end.
6701      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6702
6703      # Check if we try to supply an empty value
6704      if test "x$CUT" = x; then
6705        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6706$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6708$as_echo_n "checking for CUT... " >&6; }
6709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6710$as_echo "disabled" >&6; }
6711      else
6712        # Check if the provided tool contains a complete path.
6713        tool_specified="$CUT"
6714        tool_basename="${tool_specified##*/}"
6715        if test "x$tool_basename" = "x$tool_specified"; then
6716          # A command without a complete path is provided, search $PATH.
6717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6718$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6719          # Extract the first word of "$tool_basename", so it can be a program name with args.
6720set dummy $tool_basename; ac_word=$2
6721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6722$as_echo_n "checking for $ac_word... " >&6; }
6723if ${ac_cv_path_CUT+:} false; then :
6724  $as_echo_n "(cached) " >&6
6725else
6726  case $CUT in
6727  [\\/]* | ?:[\\/]*)
6728  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6729  ;;
6730  *)
6731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6732for as_dir in $PATH
6733do
6734  IFS=$as_save_IFS
6735  test -z "$as_dir" && as_dir=.
6736    for ac_exec_ext in '' $ac_executable_extensions; do
6737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6738    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6740    break 2
6741  fi
6742done
6743  done
6744IFS=$as_save_IFS
6745
6746  ;;
6747esac
6748fi
6749CUT=$ac_cv_path_CUT
6750if test -n "$CUT"; then
6751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6752$as_echo "$CUT" >&6; }
6753else
6754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6755$as_echo "no" >&6; }
6756fi
6757
6758
6759          if test "x$CUT" = x; then
6760            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6761          fi
6762        else
6763          # Otherwise we believe it is a complete path. Use it as it is.
6764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6765$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6766          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6767$as_echo_n "checking for CUT... " >&6; }
6768          if test ! -x "$tool_specified"; then
6769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6770$as_echo "not found" >&6; }
6771            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6772          fi
6773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6774$as_echo "$tool_specified" >&6; }
6775        fi
6776      fi
6777    fi
6778
6779  fi
6780
6781
6782
6783  if test "x$CUT" = x; then
6784    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6785  fi
6786
6787
6788
6789
6790
6791  # Publish this variable in the help.
6792
6793
6794  if [ -z "${DATE+x}" ]; then
6795    # The variable is not set by user, try to locate tool using the code snippet
6796    for ac_prog in date
6797do
6798  # Extract the first word of "$ac_prog", so it can be a program name with args.
6799set dummy $ac_prog; ac_word=$2
6800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6801$as_echo_n "checking for $ac_word... " >&6; }
6802if ${ac_cv_path_DATE+:} false; then :
6803  $as_echo_n "(cached) " >&6
6804else
6805  case $DATE in
6806  [\\/]* | ?:[\\/]*)
6807  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6808  ;;
6809  *)
6810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6811for as_dir in $PATH
6812do
6813  IFS=$as_save_IFS
6814  test -z "$as_dir" && as_dir=.
6815    for ac_exec_ext in '' $ac_executable_extensions; do
6816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6817    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6819    break 2
6820  fi
6821done
6822  done
6823IFS=$as_save_IFS
6824
6825  ;;
6826esac
6827fi
6828DATE=$ac_cv_path_DATE
6829if test -n "$DATE"; then
6830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6831$as_echo "$DATE" >&6; }
6832else
6833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6834$as_echo "no" >&6; }
6835fi
6836
6837
6838  test -n "$DATE" && break
6839done
6840
6841  else
6842    # The variable is set, but is it from the command line or the environment?
6843
6844    # Try to remove the string !DATE! from our list.
6845    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6846    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6847      # If it failed, the variable was not from the command line. Ignore it,
6848      # but warn the user (except for BASH, which is always set by the calling BASH).
6849      if test "xDATE" != xBASH; then
6850        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6851$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6852      fi
6853      # Try to locate tool using the code snippet
6854      for ac_prog in date
6855do
6856  # Extract the first word of "$ac_prog", so it can be a program name with args.
6857set dummy $ac_prog; ac_word=$2
6858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6859$as_echo_n "checking for $ac_word... " >&6; }
6860if ${ac_cv_path_DATE+:} false; then :
6861  $as_echo_n "(cached) " >&6
6862else
6863  case $DATE in
6864  [\\/]* | ?:[\\/]*)
6865  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6866  ;;
6867  *)
6868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6869for as_dir in $PATH
6870do
6871  IFS=$as_save_IFS
6872  test -z "$as_dir" && as_dir=.
6873    for ac_exec_ext in '' $ac_executable_extensions; do
6874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6875    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6877    break 2
6878  fi
6879done
6880  done
6881IFS=$as_save_IFS
6882
6883  ;;
6884esac
6885fi
6886DATE=$ac_cv_path_DATE
6887if test -n "$DATE"; then
6888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6889$as_echo "$DATE" >&6; }
6890else
6891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6892$as_echo "no" >&6; }
6893fi
6894
6895
6896  test -n "$DATE" && break
6897done
6898
6899    else
6900      # If it succeeded, then it was overridden by the user. We will use it
6901      # for the tool.
6902
6903      # First remove it from the list of overridden variables, so we can test
6904      # for unknown variables in the end.
6905      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6906
6907      # Check if we try to supply an empty value
6908      if test "x$DATE" = x; then
6909        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6910$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6911        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6912$as_echo_n "checking for DATE... " >&6; }
6913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6914$as_echo "disabled" >&6; }
6915      else
6916        # Check if the provided tool contains a complete path.
6917        tool_specified="$DATE"
6918        tool_basename="${tool_specified##*/}"
6919        if test "x$tool_basename" = "x$tool_specified"; then
6920          # A command without a complete path is provided, search $PATH.
6921          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6922$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6923          # Extract the first word of "$tool_basename", so it can be a program name with args.
6924set dummy $tool_basename; ac_word=$2
6925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6926$as_echo_n "checking for $ac_word... " >&6; }
6927if ${ac_cv_path_DATE+:} false; then :
6928  $as_echo_n "(cached) " >&6
6929else
6930  case $DATE in
6931  [\\/]* | ?:[\\/]*)
6932  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6933  ;;
6934  *)
6935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6936for as_dir in $PATH
6937do
6938  IFS=$as_save_IFS
6939  test -z "$as_dir" && as_dir=.
6940    for ac_exec_ext in '' $ac_executable_extensions; do
6941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6942    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6944    break 2
6945  fi
6946done
6947  done
6948IFS=$as_save_IFS
6949
6950  ;;
6951esac
6952fi
6953DATE=$ac_cv_path_DATE
6954if test -n "$DATE"; then
6955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6956$as_echo "$DATE" >&6; }
6957else
6958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6959$as_echo "no" >&6; }
6960fi
6961
6962
6963          if test "x$DATE" = x; then
6964            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6965          fi
6966        else
6967          # Otherwise we believe it is a complete path. Use it as it is.
6968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6969$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6970          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6971$as_echo_n "checking for DATE... " >&6; }
6972          if test ! -x "$tool_specified"; then
6973            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6974$as_echo "not found" >&6; }
6975            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6976          fi
6977          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6978$as_echo "$tool_specified" >&6; }
6979        fi
6980      fi
6981    fi
6982
6983  fi
6984
6985
6986
6987  if test "x$DATE" = x; then
6988    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6989  fi
6990
6991
6992
6993
6994
6995  # Publish this variable in the help.
6996
6997
6998  if [ -z "${DIFF+x}" ]; then
6999    # The variable is not set by user, try to locate tool using the code snippet
7000    for ac_prog in gdiff diff
7001do
7002  # Extract the first word of "$ac_prog", so it can be a program name with args.
7003set dummy $ac_prog; ac_word=$2
7004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7005$as_echo_n "checking for $ac_word... " >&6; }
7006if ${ac_cv_path_DIFF+:} false; then :
7007  $as_echo_n "(cached) " >&6
7008else
7009  case $DIFF in
7010  [\\/]* | ?:[\\/]*)
7011  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7012  ;;
7013  *)
7014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7015for as_dir in $PATH
7016do
7017  IFS=$as_save_IFS
7018  test -z "$as_dir" && as_dir=.
7019    for ac_exec_ext in '' $ac_executable_extensions; do
7020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7021    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7023    break 2
7024  fi
7025done
7026  done
7027IFS=$as_save_IFS
7028
7029  ;;
7030esac
7031fi
7032DIFF=$ac_cv_path_DIFF
7033if test -n "$DIFF"; then
7034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7035$as_echo "$DIFF" >&6; }
7036else
7037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7038$as_echo "no" >&6; }
7039fi
7040
7041
7042  test -n "$DIFF" && break
7043done
7044
7045  else
7046    # The variable is set, but is it from the command line or the environment?
7047
7048    # Try to remove the string !DIFF! from our list.
7049    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7050    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7051      # If it failed, the variable was not from the command line. Ignore it,
7052      # but warn the user (except for BASH, which is always set by the calling BASH).
7053      if test "xDIFF" != xBASH; then
7054        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7055$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7056      fi
7057      # Try to locate tool using the code snippet
7058      for ac_prog in gdiff diff
7059do
7060  # Extract the first word of "$ac_prog", so it can be a program name with args.
7061set dummy $ac_prog; ac_word=$2
7062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7063$as_echo_n "checking for $ac_word... " >&6; }
7064if ${ac_cv_path_DIFF+:} false; then :
7065  $as_echo_n "(cached) " >&6
7066else
7067  case $DIFF in
7068  [\\/]* | ?:[\\/]*)
7069  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7070  ;;
7071  *)
7072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7073for as_dir in $PATH
7074do
7075  IFS=$as_save_IFS
7076  test -z "$as_dir" && as_dir=.
7077    for ac_exec_ext in '' $ac_executable_extensions; do
7078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7079    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7081    break 2
7082  fi
7083done
7084  done
7085IFS=$as_save_IFS
7086
7087  ;;
7088esac
7089fi
7090DIFF=$ac_cv_path_DIFF
7091if test -n "$DIFF"; then
7092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7093$as_echo "$DIFF" >&6; }
7094else
7095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7096$as_echo "no" >&6; }
7097fi
7098
7099
7100  test -n "$DIFF" && break
7101done
7102
7103    else
7104      # If it succeeded, then it was overridden by the user. We will use it
7105      # for the tool.
7106
7107      # First remove it from the list of overridden variables, so we can test
7108      # for unknown variables in the end.
7109      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7110
7111      # Check if we try to supply an empty value
7112      if test "x$DIFF" = x; then
7113        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7114$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7115        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7116$as_echo_n "checking for DIFF... " >&6; }
7117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7118$as_echo "disabled" >&6; }
7119      else
7120        # Check if the provided tool contains a complete path.
7121        tool_specified="$DIFF"
7122        tool_basename="${tool_specified##*/}"
7123        if test "x$tool_basename" = "x$tool_specified"; then
7124          # A command without a complete path is provided, search $PATH.
7125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7126$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7127          # Extract the first word of "$tool_basename", so it can be a program name with args.
7128set dummy $tool_basename; ac_word=$2
7129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7130$as_echo_n "checking for $ac_word... " >&6; }
7131if ${ac_cv_path_DIFF+:} false; then :
7132  $as_echo_n "(cached) " >&6
7133else
7134  case $DIFF in
7135  [\\/]* | ?:[\\/]*)
7136  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7137  ;;
7138  *)
7139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7140for as_dir in $PATH
7141do
7142  IFS=$as_save_IFS
7143  test -z "$as_dir" && as_dir=.
7144    for ac_exec_ext in '' $ac_executable_extensions; do
7145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7146    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7148    break 2
7149  fi
7150done
7151  done
7152IFS=$as_save_IFS
7153
7154  ;;
7155esac
7156fi
7157DIFF=$ac_cv_path_DIFF
7158if test -n "$DIFF"; then
7159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7160$as_echo "$DIFF" >&6; }
7161else
7162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7163$as_echo "no" >&6; }
7164fi
7165
7166
7167          if test "x$DIFF" = x; then
7168            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7169          fi
7170        else
7171          # Otherwise we believe it is a complete path. Use it as it is.
7172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7173$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7174          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7175$as_echo_n "checking for DIFF... " >&6; }
7176          if test ! -x "$tool_specified"; then
7177            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7178$as_echo "not found" >&6; }
7179            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7180          fi
7181          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7182$as_echo "$tool_specified" >&6; }
7183        fi
7184      fi
7185    fi
7186
7187  fi
7188
7189
7190
7191  if test "x$DIFF" = x; then
7192    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7193  fi
7194
7195
7196
7197
7198
7199  # Publish this variable in the help.
7200
7201
7202  if [ -z "${DIRNAME+x}" ]; then
7203    # The variable is not set by user, try to locate tool using the code snippet
7204    for ac_prog in dirname
7205do
7206  # Extract the first word of "$ac_prog", so it can be a program name with args.
7207set dummy $ac_prog; ac_word=$2
7208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7209$as_echo_n "checking for $ac_word... " >&6; }
7210if ${ac_cv_path_DIRNAME+:} false; then :
7211  $as_echo_n "(cached) " >&6
7212else
7213  case $DIRNAME in
7214  [\\/]* | ?:[\\/]*)
7215  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7216  ;;
7217  *)
7218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7219for as_dir in $PATH
7220do
7221  IFS=$as_save_IFS
7222  test -z "$as_dir" && as_dir=.
7223    for ac_exec_ext in '' $ac_executable_extensions; do
7224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7225    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7227    break 2
7228  fi
7229done
7230  done
7231IFS=$as_save_IFS
7232
7233  ;;
7234esac
7235fi
7236DIRNAME=$ac_cv_path_DIRNAME
7237if test -n "$DIRNAME"; then
7238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7239$as_echo "$DIRNAME" >&6; }
7240else
7241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7242$as_echo "no" >&6; }
7243fi
7244
7245
7246  test -n "$DIRNAME" && break
7247done
7248
7249  else
7250    # The variable is set, but is it from the command line or the environment?
7251
7252    # Try to remove the string !DIRNAME! from our list.
7253    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7254    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7255      # If it failed, the variable was not from the command line. Ignore it,
7256      # but warn the user (except for BASH, which is always set by the calling BASH).
7257      if test "xDIRNAME" != xBASH; then
7258        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7259$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7260      fi
7261      # Try to locate tool using the code snippet
7262      for ac_prog in dirname
7263do
7264  # Extract the first word of "$ac_prog", so it can be a program name with args.
7265set dummy $ac_prog; ac_word=$2
7266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7267$as_echo_n "checking for $ac_word... " >&6; }
7268if ${ac_cv_path_DIRNAME+:} false; then :
7269  $as_echo_n "(cached) " >&6
7270else
7271  case $DIRNAME in
7272  [\\/]* | ?:[\\/]*)
7273  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7274  ;;
7275  *)
7276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7277for as_dir in $PATH
7278do
7279  IFS=$as_save_IFS
7280  test -z "$as_dir" && as_dir=.
7281    for ac_exec_ext in '' $ac_executable_extensions; do
7282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7283    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7285    break 2
7286  fi
7287done
7288  done
7289IFS=$as_save_IFS
7290
7291  ;;
7292esac
7293fi
7294DIRNAME=$ac_cv_path_DIRNAME
7295if test -n "$DIRNAME"; then
7296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7297$as_echo "$DIRNAME" >&6; }
7298else
7299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7300$as_echo "no" >&6; }
7301fi
7302
7303
7304  test -n "$DIRNAME" && break
7305done
7306
7307    else
7308      # If it succeeded, then it was overridden by the user. We will use it
7309      # for the tool.
7310
7311      # First remove it from the list of overridden variables, so we can test
7312      # for unknown variables in the end.
7313      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7314
7315      # Check if we try to supply an empty value
7316      if test "x$DIRNAME" = x; then
7317        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7318$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7319        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7320$as_echo_n "checking for DIRNAME... " >&6; }
7321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7322$as_echo "disabled" >&6; }
7323      else
7324        # Check if the provided tool contains a complete path.
7325        tool_specified="$DIRNAME"
7326        tool_basename="${tool_specified##*/}"
7327        if test "x$tool_basename" = "x$tool_specified"; then
7328          # A command without a complete path is provided, search $PATH.
7329          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7330$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7331          # Extract the first word of "$tool_basename", so it can be a program name with args.
7332set dummy $tool_basename; ac_word=$2
7333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7334$as_echo_n "checking for $ac_word... " >&6; }
7335if ${ac_cv_path_DIRNAME+:} false; then :
7336  $as_echo_n "(cached) " >&6
7337else
7338  case $DIRNAME in
7339  [\\/]* | ?:[\\/]*)
7340  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7341  ;;
7342  *)
7343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7344for as_dir in $PATH
7345do
7346  IFS=$as_save_IFS
7347  test -z "$as_dir" && as_dir=.
7348    for ac_exec_ext in '' $ac_executable_extensions; do
7349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7350    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7352    break 2
7353  fi
7354done
7355  done
7356IFS=$as_save_IFS
7357
7358  ;;
7359esac
7360fi
7361DIRNAME=$ac_cv_path_DIRNAME
7362if test -n "$DIRNAME"; then
7363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7364$as_echo "$DIRNAME" >&6; }
7365else
7366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7367$as_echo "no" >&6; }
7368fi
7369
7370
7371          if test "x$DIRNAME" = x; then
7372            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7373          fi
7374        else
7375          # Otherwise we believe it is a complete path. Use it as it is.
7376          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7377$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7378          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7379$as_echo_n "checking for DIRNAME... " >&6; }
7380          if test ! -x "$tool_specified"; then
7381            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7382$as_echo "not found" >&6; }
7383            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7384          fi
7385          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7386$as_echo "$tool_specified" >&6; }
7387        fi
7388      fi
7389    fi
7390
7391  fi
7392
7393
7394
7395  if test "x$DIRNAME" = x; then
7396    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7397  fi
7398
7399
7400
7401
7402
7403  # Publish this variable in the help.
7404
7405
7406  if [ -z "${ECHO+x}" ]; then
7407    # The variable is not set by user, try to locate tool using the code snippet
7408    for ac_prog in echo
7409do
7410  # Extract the first word of "$ac_prog", so it can be a program name with args.
7411set dummy $ac_prog; ac_word=$2
7412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7413$as_echo_n "checking for $ac_word... " >&6; }
7414if ${ac_cv_path_ECHO+:} false; then :
7415  $as_echo_n "(cached) " >&6
7416else
7417  case $ECHO in
7418  [\\/]* | ?:[\\/]*)
7419  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7420  ;;
7421  *)
7422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7423for as_dir in $PATH
7424do
7425  IFS=$as_save_IFS
7426  test -z "$as_dir" && as_dir=.
7427    for ac_exec_ext in '' $ac_executable_extensions; do
7428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7429    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7431    break 2
7432  fi
7433done
7434  done
7435IFS=$as_save_IFS
7436
7437  ;;
7438esac
7439fi
7440ECHO=$ac_cv_path_ECHO
7441if test -n "$ECHO"; then
7442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7443$as_echo "$ECHO" >&6; }
7444else
7445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7446$as_echo "no" >&6; }
7447fi
7448
7449
7450  test -n "$ECHO" && break
7451done
7452
7453  else
7454    # The variable is set, but is it from the command line or the environment?
7455
7456    # Try to remove the string !ECHO! from our list.
7457    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7458    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7459      # If it failed, the variable was not from the command line. Ignore it,
7460      # but warn the user (except for BASH, which is always set by the calling BASH).
7461      if test "xECHO" != xBASH; then
7462        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7463$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7464      fi
7465      # Try to locate tool using the code snippet
7466      for ac_prog in echo
7467do
7468  # Extract the first word of "$ac_prog", so it can be a program name with args.
7469set dummy $ac_prog; ac_word=$2
7470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7471$as_echo_n "checking for $ac_word... " >&6; }
7472if ${ac_cv_path_ECHO+:} false; then :
7473  $as_echo_n "(cached) " >&6
7474else
7475  case $ECHO in
7476  [\\/]* | ?:[\\/]*)
7477  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7478  ;;
7479  *)
7480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7481for as_dir in $PATH
7482do
7483  IFS=$as_save_IFS
7484  test -z "$as_dir" && as_dir=.
7485    for ac_exec_ext in '' $ac_executable_extensions; do
7486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7487    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7489    break 2
7490  fi
7491done
7492  done
7493IFS=$as_save_IFS
7494
7495  ;;
7496esac
7497fi
7498ECHO=$ac_cv_path_ECHO
7499if test -n "$ECHO"; then
7500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7501$as_echo "$ECHO" >&6; }
7502else
7503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7504$as_echo "no" >&6; }
7505fi
7506
7507
7508  test -n "$ECHO" && break
7509done
7510
7511    else
7512      # If it succeeded, then it was overridden by the user. We will use it
7513      # for the tool.
7514
7515      # First remove it from the list of overridden variables, so we can test
7516      # for unknown variables in the end.
7517      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7518
7519      # Check if we try to supply an empty value
7520      if test "x$ECHO" = x; then
7521        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7522$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7523        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7524$as_echo_n "checking for ECHO... " >&6; }
7525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7526$as_echo "disabled" >&6; }
7527      else
7528        # Check if the provided tool contains a complete path.
7529        tool_specified="$ECHO"
7530        tool_basename="${tool_specified##*/}"
7531        if test "x$tool_basename" = "x$tool_specified"; then
7532          # A command without a complete path is provided, search $PATH.
7533          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7534$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7535          # Extract the first word of "$tool_basename", so it can be a program name with args.
7536set dummy $tool_basename; ac_word=$2
7537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7538$as_echo_n "checking for $ac_word... " >&6; }
7539if ${ac_cv_path_ECHO+:} false; then :
7540  $as_echo_n "(cached) " >&6
7541else
7542  case $ECHO in
7543  [\\/]* | ?:[\\/]*)
7544  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7545  ;;
7546  *)
7547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7548for as_dir in $PATH
7549do
7550  IFS=$as_save_IFS
7551  test -z "$as_dir" && as_dir=.
7552    for ac_exec_ext in '' $ac_executable_extensions; do
7553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7554    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7556    break 2
7557  fi
7558done
7559  done
7560IFS=$as_save_IFS
7561
7562  ;;
7563esac
7564fi
7565ECHO=$ac_cv_path_ECHO
7566if test -n "$ECHO"; then
7567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7568$as_echo "$ECHO" >&6; }
7569else
7570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7571$as_echo "no" >&6; }
7572fi
7573
7574
7575          if test "x$ECHO" = x; then
7576            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7577          fi
7578        else
7579          # Otherwise we believe it is a complete path. Use it as it is.
7580          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7581$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7582          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7583$as_echo_n "checking for ECHO... " >&6; }
7584          if test ! -x "$tool_specified"; then
7585            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7586$as_echo "not found" >&6; }
7587            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7588          fi
7589          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7590$as_echo "$tool_specified" >&6; }
7591        fi
7592      fi
7593    fi
7594
7595  fi
7596
7597
7598
7599  if test "x$ECHO" = x; then
7600    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7601  fi
7602
7603
7604
7605
7606
7607  # Publish this variable in the help.
7608
7609
7610  if [ -z "${EXPR+x}" ]; then
7611    # The variable is not set by user, try to locate tool using the code snippet
7612    for ac_prog in expr
7613do
7614  # Extract the first word of "$ac_prog", so it can be a program name with args.
7615set dummy $ac_prog; ac_word=$2
7616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7617$as_echo_n "checking for $ac_word... " >&6; }
7618if ${ac_cv_path_EXPR+:} false; then :
7619  $as_echo_n "(cached) " >&6
7620else
7621  case $EXPR in
7622  [\\/]* | ?:[\\/]*)
7623  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7624  ;;
7625  *)
7626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7627for as_dir in $PATH
7628do
7629  IFS=$as_save_IFS
7630  test -z "$as_dir" && as_dir=.
7631    for ac_exec_ext in '' $ac_executable_extensions; do
7632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7633    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7635    break 2
7636  fi
7637done
7638  done
7639IFS=$as_save_IFS
7640
7641  ;;
7642esac
7643fi
7644EXPR=$ac_cv_path_EXPR
7645if test -n "$EXPR"; then
7646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7647$as_echo "$EXPR" >&6; }
7648else
7649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7650$as_echo "no" >&6; }
7651fi
7652
7653
7654  test -n "$EXPR" && break
7655done
7656
7657  else
7658    # The variable is set, but is it from the command line or the environment?
7659
7660    # Try to remove the string !EXPR! from our list.
7661    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7662    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7663      # If it failed, the variable was not from the command line. Ignore it,
7664      # but warn the user (except for BASH, which is always set by the calling BASH).
7665      if test "xEXPR" != xBASH; then
7666        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7667$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7668      fi
7669      # Try to locate tool using the code snippet
7670      for ac_prog in expr
7671do
7672  # Extract the first word of "$ac_prog", so it can be a program name with args.
7673set dummy $ac_prog; ac_word=$2
7674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7675$as_echo_n "checking for $ac_word... " >&6; }
7676if ${ac_cv_path_EXPR+:} false; then :
7677  $as_echo_n "(cached) " >&6
7678else
7679  case $EXPR in
7680  [\\/]* | ?:[\\/]*)
7681  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7682  ;;
7683  *)
7684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7685for as_dir in $PATH
7686do
7687  IFS=$as_save_IFS
7688  test -z "$as_dir" && as_dir=.
7689    for ac_exec_ext in '' $ac_executable_extensions; do
7690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7691    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7693    break 2
7694  fi
7695done
7696  done
7697IFS=$as_save_IFS
7698
7699  ;;
7700esac
7701fi
7702EXPR=$ac_cv_path_EXPR
7703if test -n "$EXPR"; then
7704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7705$as_echo "$EXPR" >&6; }
7706else
7707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7708$as_echo "no" >&6; }
7709fi
7710
7711
7712  test -n "$EXPR" && break
7713done
7714
7715    else
7716      # If it succeeded, then it was overridden by the user. We will use it
7717      # for the tool.
7718
7719      # First remove it from the list of overridden variables, so we can test
7720      # for unknown variables in the end.
7721      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7722
7723      # Check if we try to supply an empty value
7724      if test "x$EXPR" = x; then
7725        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7726$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7727        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7728$as_echo_n "checking for EXPR... " >&6; }
7729        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7730$as_echo "disabled" >&6; }
7731      else
7732        # Check if the provided tool contains a complete path.
7733        tool_specified="$EXPR"
7734        tool_basename="${tool_specified##*/}"
7735        if test "x$tool_basename" = "x$tool_specified"; then
7736          # A command without a complete path is provided, search $PATH.
7737          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7738$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7739          # Extract the first word of "$tool_basename", so it can be a program name with args.
7740set dummy $tool_basename; ac_word=$2
7741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7742$as_echo_n "checking for $ac_word... " >&6; }
7743if ${ac_cv_path_EXPR+:} false; then :
7744  $as_echo_n "(cached) " >&6
7745else
7746  case $EXPR in
7747  [\\/]* | ?:[\\/]*)
7748  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7749  ;;
7750  *)
7751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7752for as_dir in $PATH
7753do
7754  IFS=$as_save_IFS
7755  test -z "$as_dir" && as_dir=.
7756    for ac_exec_ext in '' $ac_executable_extensions; do
7757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7758    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7760    break 2
7761  fi
7762done
7763  done
7764IFS=$as_save_IFS
7765
7766  ;;
7767esac
7768fi
7769EXPR=$ac_cv_path_EXPR
7770if test -n "$EXPR"; then
7771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7772$as_echo "$EXPR" >&6; }
7773else
7774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7775$as_echo "no" >&6; }
7776fi
7777
7778
7779          if test "x$EXPR" = x; then
7780            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7781          fi
7782        else
7783          # Otherwise we believe it is a complete path. Use it as it is.
7784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7785$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7786          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7787$as_echo_n "checking for EXPR... " >&6; }
7788          if test ! -x "$tool_specified"; then
7789            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7790$as_echo "not found" >&6; }
7791            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7792          fi
7793          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7794$as_echo "$tool_specified" >&6; }
7795        fi
7796      fi
7797    fi
7798
7799  fi
7800
7801
7802
7803  if test "x$EXPR" = x; then
7804    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7805  fi
7806
7807
7808
7809
7810
7811  # Publish this variable in the help.
7812
7813
7814  if [ -z "${FILE+x}" ]; then
7815    # The variable is not set by user, try to locate tool using the code snippet
7816    for ac_prog in file
7817do
7818  # Extract the first word of "$ac_prog", so it can be a program name with args.
7819set dummy $ac_prog; ac_word=$2
7820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7821$as_echo_n "checking for $ac_word... " >&6; }
7822if ${ac_cv_path_FILE+:} false; then :
7823  $as_echo_n "(cached) " >&6
7824else
7825  case $FILE in
7826  [\\/]* | ?:[\\/]*)
7827  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7828  ;;
7829  *)
7830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7831for as_dir in $PATH
7832do
7833  IFS=$as_save_IFS
7834  test -z "$as_dir" && as_dir=.
7835    for ac_exec_ext in '' $ac_executable_extensions; do
7836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7837    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7839    break 2
7840  fi
7841done
7842  done
7843IFS=$as_save_IFS
7844
7845  ;;
7846esac
7847fi
7848FILE=$ac_cv_path_FILE
7849if test -n "$FILE"; then
7850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7851$as_echo "$FILE" >&6; }
7852else
7853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7854$as_echo "no" >&6; }
7855fi
7856
7857
7858  test -n "$FILE" && break
7859done
7860
7861  else
7862    # The variable is set, but is it from the command line or the environment?
7863
7864    # Try to remove the string !FILE! from our list.
7865    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7866    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7867      # If it failed, the variable was not from the command line. Ignore it,
7868      # but warn the user (except for BASH, which is always set by the calling BASH).
7869      if test "xFILE" != xBASH; then
7870        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7871$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7872      fi
7873      # Try to locate tool using the code snippet
7874      for ac_prog in file
7875do
7876  # Extract the first word of "$ac_prog", so it can be a program name with args.
7877set dummy $ac_prog; ac_word=$2
7878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7879$as_echo_n "checking for $ac_word... " >&6; }
7880if ${ac_cv_path_FILE+:} false; then :
7881  $as_echo_n "(cached) " >&6
7882else
7883  case $FILE in
7884  [\\/]* | ?:[\\/]*)
7885  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7886  ;;
7887  *)
7888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7889for as_dir in $PATH
7890do
7891  IFS=$as_save_IFS
7892  test -z "$as_dir" && as_dir=.
7893    for ac_exec_ext in '' $ac_executable_extensions; do
7894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7895    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7897    break 2
7898  fi
7899done
7900  done
7901IFS=$as_save_IFS
7902
7903  ;;
7904esac
7905fi
7906FILE=$ac_cv_path_FILE
7907if test -n "$FILE"; then
7908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7909$as_echo "$FILE" >&6; }
7910else
7911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7912$as_echo "no" >&6; }
7913fi
7914
7915
7916  test -n "$FILE" && break
7917done
7918
7919    else
7920      # If it succeeded, then it was overridden by the user. We will use it
7921      # for the tool.
7922
7923      # First remove it from the list of overridden variables, so we can test
7924      # for unknown variables in the end.
7925      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7926
7927      # Check if we try to supply an empty value
7928      if test "x$FILE" = x; then
7929        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7930$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7932$as_echo_n "checking for FILE... " >&6; }
7933        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7934$as_echo "disabled" >&6; }
7935      else
7936        # Check if the provided tool contains a complete path.
7937        tool_specified="$FILE"
7938        tool_basename="${tool_specified##*/}"
7939        if test "x$tool_basename" = "x$tool_specified"; then
7940          # A command without a complete path is provided, search $PATH.
7941          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7942$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7943          # Extract the first word of "$tool_basename", so it can be a program name with args.
7944set dummy $tool_basename; ac_word=$2
7945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7946$as_echo_n "checking for $ac_word... " >&6; }
7947if ${ac_cv_path_FILE+:} false; then :
7948  $as_echo_n "(cached) " >&6
7949else
7950  case $FILE in
7951  [\\/]* | ?:[\\/]*)
7952  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7953  ;;
7954  *)
7955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7956for as_dir in $PATH
7957do
7958  IFS=$as_save_IFS
7959  test -z "$as_dir" && as_dir=.
7960    for ac_exec_ext in '' $ac_executable_extensions; do
7961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7962    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7964    break 2
7965  fi
7966done
7967  done
7968IFS=$as_save_IFS
7969
7970  ;;
7971esac
7972fi
7973FILE=$ac_cv_path_FILE
7974if test -n "$FILE"; then
7975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7976$as_echo "$FILE" >&6; }
7977else
7978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7979$as_echo "no" >&6; }
7980fi
7981
7982
7983          if test "x$FILE" = x; then
7984            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7985          fi
7986        else
7987          # Otherwise we believe it is a complete path. Use it as it is.
7988          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7989$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7990          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7991$as_echo_n "checking for FILE... " >&6; }
7992          if test ! -x "$tool_specified"; then
7993            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7994$as_echo "not found" >&6; }
7995            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7996          fi
7997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7998$as_echo "$tool_specified" >&6; }
7999        fi
8000      fi
8001    fi
8002
8003  fi
8004
8005
8006
8007  if test "x$FILE" = x; then
8008    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8009  fi
8010
8011
8012
8013
8014
8015  # Publish this variable in the help.
8016
8017
8018  if [ -z "${FIND+x}" ]; then
8019    # The variable is not set by user, try to locate tool using the code snippet
8020    for ac_prog in find
8021do
8022  # Extract the first word of "$ac_prog", so it can be a program name with args.
8023set dummy $ac_prog; ac_word=$2
8024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8025$as_echo_n "checking for $ac_word... " >&6; }
8026if ${ac_cv_path_FIND+:} false; then :
8027  $as_echo_n "(cached) " >&6
8028else
8029  case $FIND in
8030  [\\/]* | ?:[\\/]*)
8031  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8032  ;;
8033  *)
8034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8035for as_dir in $PATH
8036do
8037  IFS=$as_save_IFS
8038  test -z "$as_dir" && as_dir=.
8039    for ac_exec_ext in '' $ac_executable_extensions; do
8040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8041    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8043    break 2
8044  fi
8045done
8046  done
8047IFS=$as_save_IFS
8048
8049  ;;
8050esac
8051fi
8052FIND=$ac_cv_path_FIND
8053if test -n "$FIND"; then
8054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8055$as_echo "$FIND" >&6; }
8056else
8057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8058$as_echo "no" >&6; }
8059fi
8060
8061
8062  test -n "$FIND" && break
8063done
8064
8065  else
8066    # The variable is set, but is it from the command line or the environment?
8067
8068    # Try to remove the string !FIND! from our list.
8069    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8070    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8071      # If it failed, the variable was not from the command line. Ignore it,
8072      # but warn the user (except for BASH, which is always set by the calling BASH).
8073      if test "xFIND" != xBASH; then
8074        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8075$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8076      fi
8077      # Try to locate tool using the code snippet
8078      for ac_prog in find
8079do
8080  # Extract the first word of "$ac_prog", so it can be a program name with args.
8081set dummy $ac_prog; ac_word=$2
8082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8083$as_echo_n "checking for $ac_word... " >&6; }
8084if ${ac_cv_path_FIND+:} false; then :
8085  $as_echo_n "(cached) " >&6
8086else
8087  case $FIND in
8088  [\\/]* | ?:[\\/]*)
8089  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8090  ;;
8091  *)
8092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8093for as_dir in $PATH
8094do
8095  IFS=$as_save_IFS
8096  test -z "$as_dir" && as_dir=.
8097    for ac_exec_ext in '' $ac_executable_extensions; do
8098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8099    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8101    break 2
8102  fi
8103done
8104  done
8105IFS=$as_save_IFS
8106
8107  ;;
8108esac
8109fi
8110FIND=$ac_cv_path_FIND
8111if test -n "$FIND"; then
8112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8113$as_echo "$FIND" >&6; }
8114else
8115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8116$as_echo "no" >&6; }
8117fi
8118
8119
8120  test -n "$FIND" && break
8121done
8122
8123    else
8124      # If it succeeded, then it was overridden by the user. We will use it
8125      # for the tool.
8126
8127      # First remove it from the list of overridden variables, so we can test
8128      # for unknown variables in the end.
8129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8130
8131      # Check if we try to supply an empty value
8132      if test "x$FIND" = x; then
8133        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8134$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8135        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8136$as_echo_n "checking for FIND... " >&6; }
8137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8138$as_echo "disabled" >&6; }
8139      else
8140        # Check if the provided tool contains a complete path.
8141        tool_specified="$FIND"
8142        tool_basename="${tool_specified##*/}"
8143        if test "x$tool_basename" = "x$tool_specified"; then
8144          # A command without a complete path is provided, search $PATH.
8145          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8146$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8147          # Extract the first word of "$tool_basename", so it can be a program name with args.
8148set dummy $tool_basename; ac_word=$2
8149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8150$as_echo_n "checking for $ac_word... " >&6; }
8151if ${ac_cv_path_FIND+:} false; then :
8152  $as_echo_n "(cached) " >&6
8153else
8154  case $FIND in
8155  [\\/]* | ?:[\\/]*)
8156  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8157  ;;
8158  *)
8159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8160for as_dir in $PATH
8161do
8162  IFS=$as_save_IFS
8163  test -z "$as_dir" && as_dir=.
8164    for ac_exec_ext in '' $ac_executable_extensions; do
8165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8166    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8168    break 2
8169  fi
8170done
8171  done
8172IFS=$as_save_IFS
8173
8174  ;;
8175esac
8176fi
8177FIND=$ac_cv_path_FIND
8178if test -n "$FIND"; then
8179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8180$as_echo "$FIND" >&6; }
8181else
8182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8183$as_echo "no" >&6; }
8184fi
8185
8186
8187          if test "x$FIND" = x; then
8188            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8189          fi
8190        else
8191          # Otherwise we believe it is a complete path. Use it as it is.
8192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8193$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8194          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8195$as_echo_n "checking for FIND... " >&6; }
8196          if test ! -x "$tool_specified"; then
8197            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8198$as_echo "not found" >&6; }
8199            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8200          fi
8201          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8202$as_echo "$tool_specified" >&6; }
8203        fi
8204      fi
8205    fi
8206
8207  fi
8208
8209
8210
8211  if test "x$FIND" = x; then
8212    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8213  fi
8214
8215
8216
8217
8218
8219  # Publish this variable in the help.
8220
8221
8222  if [ -z "${HEAD+x}" ]; then
8223    # The variable is not set by user, try to locate tool using the code snippet
8224    for ac_prog in head
8225do
8226  # Extract the first word of "$ac_prog", so it can be a program name with args.
8227set dummy $ac_prog; ac_word=$2
8228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8229$as_echo_n "checking for $ac_word... " >&6; }
8230if ${ac_cv_path_HEAD+:} false; then :
8231  $as_echo_n "(cached) " >&6
8232else
8233  case $HEAD in
8234  [\\/]* | ?:[\\/]*)
8235  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8236  ;;
8237  *)
8238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8239for as_dir in $PATH
8240do
8241  IFS=$as_save_IFS
8242  test -z "$as_dir" && as_dir=.
8243    for ac_exec_ext in '' $ac_executable_extensions; do
8244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8245    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8247    break 2
8248  fi
8249done
8250  done
8251IFS=$as_save_IFS
8252
8253  ;;
8254esac
8255fi
8256HEAD=$ac_cv_path_HEAD
8257if test -n "$HEAD"; then
8258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8259$as_echo "$HEAD" >&6; }
8260else
8261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8262$as_echo "no" >&6; }
8263fi
8264
8265
8266  test -n "$HEAD" && break
8267done
8268
8269  else
8270    # The variable is set, but is it from the command line or the environment?
8271
8272    # Try to remove the string !HEAD! from our list.
8273    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8274    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8275      # If it failed, the variable was not from the command line. Ignore it,
8276      # but warn the user (except for BASH, which is always set by the calling BASH).
8277      if test "xHEAD" != xBASH; then
8278        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8279$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8280      fi
8281      # Try to locate tool using the code snippet
8282      for ac_prog in head
8283do
8284  # Extract the first word of "$ac_prog", so it can be a program name with args.
8285set dummy $ac_prog; ac_word=$2
8286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8287$as_echo_n "checking for $ac_word... " >&6; }
8288if ${ac_cv_path_HEAD+:} false; then :
8289  $as_echo_n "(cached) " >&6
8290else
8291  case $HEAD in
8292  [\\/]* | ?:[\\/]*)
8293  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8294  ;;
8295  *)
8296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8297for as_dir in $PATH
8298do
8299  IFS=$as_save_IFS
8300  test -z "$as_dir" && as_dir=.
8301    for ac_exec_ext in '' $ac_executable_extensions; do
8302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8303    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8305    break 2
8306  fi
8307done
8308  done
8309IFS=$as_save_IFS
8310
8311  ;;
8312esac
8313fi
8314HEAD=$ac_cv_path_HEAD
8315if test -n "$HEAD"; then
8316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8317$as_echo "$HEAD" >&6; }
8318else
8319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8320$as_echo "no" >&6; }
8321fi
8322
8323
8324  test -n "$HEAD" && break
8325done
8326
8327    else
8328      # If it succeeded, then it was overridden by the user. We will use it
8329      # for the tool.
8330
8331      # First remove it from the list of overridden variables, so we can test
8332      # for unknown variables in the end.
8333      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8334
8335      # Check if we try to supply an empty value
8336      if test "x$HEAD" = x; then
8337        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8338$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8339        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8340$as_echo_n "checking for HEAD... " >&6; }
8341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8342$as_echo "disabled" >&6; }
8343      else
8344        # Check if the provided tool contains a complete path.
8345        tool_specified="$HEAD"
8346        tool_basename="${tool_specified##*/}"
8347        if test "x$tool_basename" = "x$tool_specified"; then
8348          # A command without a complete path is provided, search $PATH.
8349          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8350$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8351          # Extract the first word of "$tool_basename", so it can be a program name with args.
8352set dummy $tool_basename; ac_word=$2
8353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8354$as_echo_n "checking for $ac_word... " >&6; }
8355if ${ac_cv_path_HEAD+:} false; then :
8356  $as_echo_n "(cached) " >&6
8357else
8358  case $HEAD in
8359  [\\/]* | ?:[\\/]*)
8360  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8361  ;;
8362  *)
8363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8364for as_dir in $PATH
8365do
8366  IFS=$as_save_IFS
8367  test -z "$as_dir" && as_dir=.
8368    for ac_exec_ext in '' $ac_executable_extensions; do
8369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8370    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8372    break 2
8373  fi
8374done
8375  done
8376IFS=$as_save_IFS
8377
8378  ;;
8379esac
8380fi
8381HEAD=$ac_cv_path_HEAD
8382if test -n "$HEAD"; then
8383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8384$as_echo "$HEAD" >&6; }
8385else
8386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8387$as_echo "no" >&6; }
8388fi
8389
8390
8391          if test "x$HEAD" = x; then
8392            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8393          fi
8394        else
8395          # Otherwise we believe it is a complete path. Use it as it is.
8396          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8397$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8398          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8399$as_echo_n "checking for HEAD... " >&6; }
8400          if test ! -x "$tool_specified"; then
8401            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8402$as_echo "not found" >&6; }
8403            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8404          fi
8405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8406$as_echo "$tool_specified" >&6; }
8407        fi
8408      fi
8409    fi
8410
8411  fi
8412
8413
8414
8415  if test "x$HEAD" = x; then
8416    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8417  fi
8418
8419
8420
8421
8422
8423  # Publish this variable in the help.
8424
8425
8426  if [ -z "${GUNZIP+x}" ]; then
8427    # The variable is not set by user, try to locate tool using the code snippet
8428    for ac_prog in gunzip
8429do
8430  # Extract the first word of "$ac_prog", so it can be a program name with args.
8431set dummy $ac_prog; ac_word=$2
8432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8433$as_echo_n "checking for $ac_word... " >&6; }
8434if ${ac_cv_path_GUNZIP+:} false; then :
8435  $as_echo_n "(cached) " >&6
8436else
8437  case $GUNZIP in
8438  [\\/]* | ?:[\\/]*)
8439  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8440  ;;
8441  *)
8442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8443for as_dir in $PATH
8444do
8445  IFS=$as_save_IFS
8446  test -z "$as_dir" && as_dir=.
8447    for ac_exec_ext in '' $ac_executable_extensions; do
8448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8449    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8451    break 2
8452  fi
8453done
8454  done
8455IFS=$as_save_IFS
8456
8457  ;;
8458esac
8459fi
8460GUNZIP=$ac_cv_path_GUNZIP
8461if test -n "$GUNZIP"; then
8462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8463$as_echo "$GUNZIP" >&6; }
8464else
8465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8466$as_echo "no" >&6; }
8467fi
8468
8469
8470  test -n "$GUNZIP" && break
8471done
8472
8473  else
8474    # The variable is set, but is it from the command line or the environment?
8475
8476    # Try to remove the string !GUNZIP! from our list.
8477    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8478    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8479      # If it failed, the variable was not from the command line. Ignore it,
8480      # but warn the user (except for BASH, which is always set by the calling BASH).
8481      if test "xGUNZIP" != xBASH; then
8482        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8483$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8484      fi
8485      # Try to locate tool using the code snippet
8486      for ac_prog in gunzip
8487do
8488  # Extract the first word of "$ac_prog", so it can be a program name with args.
8489set dummy $ac_prog; ac_word=$2
8490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8491$as_echo_n "checking for $ac_word... " >&6; }
8492if ${ac_cv_path_GUNZIP+:} false; then :
8493  $as_echo_n "(cached) " >&6
8494else
8495  case $GUNZIP in
8496  [\\/]* | ?:[\\/]*)
8497  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8498  ;;
8499  *)
8500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8501for as_dir in $PATH
8502do
8503  IFS=$as_save_IFS
8504  test -z "$as_dir" && as_dir=.
8505    for ac_exec_ext in '' $ac_executable_extensions; do
8506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8507    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8509    break 2
8510  fi
8511done
8512  done
8513IFS=$as_save_IFS
8514
8515  ;;
8516esac
8517fi
8518GUNZIP=$ac_cv_path_GUNZIP
8519if test -n "$GUNZIP"; then
8520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8521$as_echo "$GUNZIP" >&6; }
8522else
8523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8524$as_echo "no" >&6; }
8525fi
8526
8527
8528  test -n "$GUNZIP" && break
8529done
8530
8531    else
8532      # If it succeeded, then it was overridden by the user. We will use it
8533      # for the tool.
8534
8535      # First remove it from the list of overridden variables, so we can test
8536      # for unknown variables in the end.
8537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8538
8539      # Check if we try to supply an empty value
8540      if test "x$GUNZIP" = x; then
8541        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8542$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8543        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8544$as_echo_n "checking for GUNZIP... " >&6; }
8545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8546$as_echo "disabled" >&6; }
8547      else
8548        # Check if the provided tool contains a complete path.
8549        tool_specified="$GUNZIP"
8550        tool_basename="${tool_specified##*/}"
8551        if test "x$tool_basename" = "x$tool_specified"; then
8552          # A command without a complete path is provided, search $PATH.
8553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8554$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8555          # Extract the first word of "$tool_basename", so it can be a program name with args.
8556set dummy $tool_basename; ac_word=$2
8557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8558$as_echo_n "checking for $ac_word... " >&6; }
8559if ${ac_cv_path_GUNZIP+:} false; then :
8560  $as_echo_n "(cached) " >&6
8561else
8562  case $GUNZIP in
8563  [\\/]* | ?:[\\/]*)
8564  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8565  ;;
8566  *)
8567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8568for as_dir in $PATH
8569do
8570  IFS=$as_save_IFS
8571  test -z "$as_dir" && as_dir=.
8572    for ac_exec_ext in '' $ac_executable_extensions; do
8573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8574    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8576    break 2
8577  fi
8578done
8579  done
8580IFS=$as_save_IFS
8581
8582  ;;
8583esac
8584fi
8585GUNZIP=$ac_cv_path_GUNZIP
8586if test -n "$GUNZIP"; then
8587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8588$as_echo "$GUNZIP" >&6; }
8589else
8590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8591$as_echo "no" >&6; }
8592fi
8593
8594
8595          if test "x$GUNZIP" = x; then
8596            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8597          fi
8598        else
8599          # Otherwise we believe it is a complete path. Use it as it is.
8600          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8601$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8602          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8603$as_echo_n "checking for GUNZIP... " >&6; }
8604          if test ! -x "$tool_specified"; then
8605            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8606$as_echo "not found" >&6; }
8607            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8608          fi
8609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8610$as_echo "$tool_specified" >&6; }
8611        fi
8612      fi
8613    fi
8614
8615  fi
8616
8617
8618
8619  if test "x$GUNZIP" = x; then
8620    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8621  fi
8622
8623
8624
8625
8626
8627  # Publish this variable in the help.
8628
8629
8630  if [ -z "${GZIP+x}" ]; then
8631    # The variable is not set by user, try to locate tool using the code snippet
8632    for ac_prog in pigz gzip
8633do
8634  # Extract the first word of "$ac_prog", so it can be a program name with args.
8635set dummy $ac_prog; ac_word=$2
8636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8637$as_echo_n "checking for $ac_word... " >&6; }
8638if ${ac_cv_path_GZIP+:} false; then :
8639  $as_echo_n "(cached) " >&6
8640else
8641  case $GZIP in
8642  [\\/]* | ?:[\\/]*)
8643  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8644  ;;
8645  *)
8646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8647for as_dir in $PATH
8648do
8649  IFS=$as_save_IFS
8650  test -z "$as_dir" && as_dir=.
8651    for ac_exec_ext in '' $ac_executable_extensions; do
8652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8653    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8655    break 2
8656  fi
8657done
8658  done
8659IFS=$as_save_IFS
8660
8661  ;;
8662esac
8663fi
8664GZIP=$ac_cv_path_GZIP
8665if test -n "$GZIP"; then
8666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8667$as_echo "$GZIP" >&6; }
8668else
8669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8670$as_echo "no" >&6; }
8671fi
8672
8673
8674  test -n "$GZIP" && break
8675done
8676
8677  else
8678    # The variable is set, but is it from the command line or the environment?
8679
8680    # Try to remove the string !GZIP! from our list.
8681    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8682    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8683      # If it failed, the variable was not from the command line. Ignore it,
8684      # but warn the user (except for BASH, which is always set by the calling BASH).
8685      if test "xGZIP" != xBASH; then
8686        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8687$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8688      fi
8689      # Try to locate tool using the code snippet
8690      for ac_prog in pigz gzip
8691do
8692  # Extract the first word of "$ac_prog", so it can be a program name with args.
8693set dummy $ac_prog; ac_word=$2
8694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8695$as_echo_n "checking for $ac_word... " >&6; }
8696if ${ac_cv_path_GZIP+:} false; then :
8697  $as_echo_n "(cached) " >&6
8698else
8699  case $GZIP in
8700  [\\/]* | ?:[\\/]*)
8701  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8702  ;;
8703  *)
8704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8705for as_dir in $PATH
8706do
8707  IFS=$as_save_IFS
8708  test -z "$as_dir" && as_dir=.
8709    for ac_exec_ext in '' $ac_executable_extensions; do
8710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8711    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8713    break 2
8714  fi
8715done
8716  done
8717IFS=$as_save_IFS
8718
8719  ;;
8720esac
8721fi
8722GZIP=$ac_cv_path_GZIP
8723if test -n "$GZIP"; then
8724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8725$as_echo "$GZIP" >&6; }
8726else
8727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8728$as_echo "no" >&6; }
8729fi
8730
8731
8732  test -n "$GZIP" && break
8733done
8734
8735    else
8736      # If it succeeded, then it was overridden by the user. We will use it
8737      # for the tool.
8738
8739      # First remove it from the list of overridden variables, so we can test
8740      # for unknown variables in the end.
8741      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8742
8743      # Check if we try to supply an empty value
8744      if test "x$GZIP" = x; then
8745        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8746$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8747        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8748$as_echo_n "checking for GZIP... " >&6; }
8749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8750$as_echo "disabled" >&6; }
8751      else
8752        # Check if the provided tool contains a complete path.
8753        tool_specified="$GZIP"
8754        tool_basename="${tool_specified##*/}"
8755        if test "x$tool_basename" = "x$tool_specified"; then
8756          # A command without a complete path is provided, search $PATH.
8757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8758$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8759          # Extract the first word of "$tool_basename", so it can be a program name with args.
8760set dummy $tool_basename; ac_word=$2
8761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8762$as_echo_n "checking for $ac_word... " >&6; }
8763if ${ac_cv_path_GZIP+:} false; then :
8764  $as_echo_n "(cached) " >&6
8765else
8766  case $GZIP in
8767  [\\/]* | ?:[\\/]*)
8768  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8769  ;;
8770  *)
8771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8772for as_dir in $PATH
8773do
8774  IFS=$as_save_IFS
8775  test -z "$as_dir" && as_dir=.
8776    for ac_exec_ext in '' $ac_executable_extensions; do
8777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8778    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8780    break 2
8781  fi
8782done
8783  done
8784IFS=$as_save_IFS
8785
8786  ;;
8787esac
8788fi
8789GZIP=$ac_cv_path_GZIP
8790if test -n "$GZIP"; then
8791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8792$as_echo "$GZIP" >&6; }
8793else
8794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8795$as_echo "no" >&6; }
8796fi
8797
8798
8799          if test "x$GZIP" = x; then
8800            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8801          fi
8802        else
8803          # Otherwise we believe it is a complete path. Use it as it is.
8804          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8805$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8806          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8807$as_echo_n "checking for GZIP... " >&6; }
8808          if test ! -x "$tool_specified"; then
8809            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8810$as_echo "not found" >&6; }
8811            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8812          fi
8813          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8814$as_echo "$tool_specified" >&6; }
8815        fi
8816      fi
8817    fi
8818
8819  fi
8820
8821
8822
8823  if test "x$GZIP" = x; then
8824    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8825  fi
8826
8827
8828
8829
8830
8831  # Publish this variable in the help.
8832
8833
8834  if [ -z "${LN+x}" ]; then
8835    # The variable is not set by user, try to locate tool using the code snippet
8836    for ac_prog in ln
8837do
8838  # Extract the first word of "$ac_prog", so it can be a program name with args.
8839set dummy $ac_prog; ac_word=$2
8840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8841$as_echo_n "checking for $ac_word... " >&6; }
8842if ${ac_cv_path_LN+:} false; then :
8843  $as_echo_n "(cached) " >&6
8844else
8845  case $LN in
8846  [\\/]* | ?:[\\/]*)
8847  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8848  ;;
8849  *)
8850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8851for as_dir in $PATH
8852do
8853  IFS=$as_save_IFS
8854  test -z "$as_dir" && as_dir=.
8855    for ac_exec_ext in '' $ac_executable_extensions; do
8856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8857    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8859    break 2
8860  fi
8861done
8862  done
8863IFS=$as_save_IFS
8864
8865  ;;
8866esac
8867fi
8868LN=$ac_cv_path_LN
8869if test -n "$LN"; then
8870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8871$as_echo "$LN" >&6; }
8872else
8873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8874$as_echo "no" >&6; }
8875fi
8876
8877
8878  test -n "$LN" && break
8879done
8880
8881  else
8882    # The variable is set, but is it from the command line or the environment?
8883
8884    # Try to remove the string !LN! from our list.
8885    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8886    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8887      # If it failed, the variable was not from the command line. Ignore it,
8888      # but warn the user (except for BASH, which is always set by the calling BASH).
8889      if test "xLN" != xBASH; then
8890        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8891$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8892      fi
8893      # Try to locate tool using the code snippet
8894      for ac_prog in ln
8895do
8896  # Extract the first word of "$ac_prog", so it can be a program name with args.
8897set dummy $ac_prog; ac_word=$2
8898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8899$as_echo_n "checking for $ac_word... " >&6; }
8900if ${ac_cv_path_LN+:} false; then :
8901  $as_echo_n "(cached) " >&6
8902else
8903  case $LN in
8904  [\\/]* | ?:[\\/]*)
8905  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8906  ;;
8907  *)
8908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8909for as_dir in $PATH
8910do
8911  IFS=$as_save_IFS
8912  test -z "$as_dir" && as_dir=.
8913    for ac_exec_ext in '' $ac_executable_extensions; do
8914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8915    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8917    break 2
8918  fi
8919done
8920  done
8921IFS=$as_save_IFS
8922
8923  ;;
8924esac
8925fi
8926LN=$ac_cv_path_LN
8927if test -n "$LN"; then
8928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8929$as_echo "$LN" >&6; }
8930else
8931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8932$as_echo "no" >&6; }
8933fi
8934
8935
8936  test -n "$LN" && break
8937done
8938
8939    else
8940      # If it succeeded, then it was overridden by the user. We will use it
8941      # for the tool.
8942
8943      # First remove it from the list of overridden variables, so we can test
8944      # for unknown variables in the end.
8945      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8946
8947      # Check if we try to supply an empty value
8948      if test "x$LN" = x; then
8949        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8950$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8951        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8952$as_echo_n "checking for LN... " >&6; }
8953        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8954$as_echo "disabled" >&6; }
8955      else
8956        # Check if the provided tool contains a complete path.
8957        tool_specified="$LN"
8958        tool_basename="${tool_specified##*/}"
8959        if test "x$tool_basename" = "x$tool_specified"; then
8960          # A command without a complete path is provided, search $PATH.
8961          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8962$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8963          # Extract the first word of "$tool_basename", so it can be a program name with args.
8964set dummy $tool_basename; ac_word=$2
8965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8966$as_echo_n "checking for $ac_word... " >&6; }
8967if ${ac_cv_path_LN+:} false; then :
8968  $as_echo_n "(cached) " >&6
8969else
8970  case $LN in
8971  [\\/]* | ?:[\\/]*)
8972  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8973  ;;
8974  *)
8975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8976for as_dir in $PATH
8977do
8978  IFS=$as_save_IFS
8979  test -z "$as_dir" && as_dir=.
8980    for ac_exec_ext in '' $ac_executable_extensions; do
8981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8982    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8984    break 2
8985  fi
8986done
8987  done
8988IFS=$as_save_IFS
8989
8990  ;;
8991esac
8992fi
8993LN=$ac_cv_path_LN
8994if test -n "$LN"; then
8995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8996$as_echo "$LN" >&6; }
8997else
8998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8999$as_echo "no" >&6; }
9000fi
9001
9002
9003          if test "x$LN" = x; then
9004            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9005          fi
9006        else
9007          # Otherwise we believe it is a complete path. Use it as it is.
9008          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9009$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9010          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9011$as_echo_n "checking for LN... " >&6; }
9012          if test ! -x "$tool_specified"; then
9013            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9014$as_echo "not found" >&6; }
9015            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9016          fi
9017          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9018$as_echo "$tool_specified" >&6; }
9019        fi
9020      fi
9021    fi
9022
9023  fi
9024
9025
9026
9027  if test "x$LN" = x; then
9028    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9029  fi
9030
9031
9032
9033
9034
9035  # Publish this variable in the help.
9036
9037
9038  if [ -z "${LS+x}" ]; then
9039    # The variable is not set by user, try to locate tool using the code snippet
9040    for ac_prog in ls
9041do
9042  # Extract the first word of "$ac_prog", so it can be a program name with args.
9043set dummy $ac_prog; ac_word=$2
9044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9045$as_echo_n "checking for $ac_word... " >&6; }
9046if ${ac_cv_path_LS+:} false; then :
9047  $as_echo_n "(cached) " >&6
9048else
9049  case $LS in
9050  [\\/]* | ?:[\\/]*)
9051  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9052  ;;
9053  *)
9054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9055for as_dir in $PATH
9056do
9057  IFS=$as_save_IFS
9058  test -z "$as_dir" && as_dir=.
9059    for ac_exec_ext in '' $ac_executable_extensions; do
9060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9061    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9063    break 2
9064  fi
9065done
9066  done
9067IFS=$as_save_IFS
9068
9069  ;;
9070esac
9071fi
9072LS=$ac_cv_path_LS
9073if test -n "$LS"; then
9074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9075$as_echo "$LS" >&6; }
9076else
9077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9078$as_echo "no" >&6; }
9079fi
9080
9081
9082  test -n "$LS" && break
9083done
9084
9085  else
9086    # The variable is set, but is it from the command line or the environment?
9087
9088    # Try to remove the string !LS! from our list.
9089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9091      # If it failed, the variable was not from the command line. Ignore it,
9092      # but warn the user (except for BASH, which is always set by the calling BASH).
9093      if test "xLS" != xBASH; then
9094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9095$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9096      fi
9097      # Try to locate tool using the code snippet
9098      for ac_prog in ls
9099do
9100  # Extract the first word of "$ac_prog", so it can be a program name with args.
9101set dummy $ac_prog; ac_word=$2
9102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9103$as_echo_n "checking for $ac_word... " >&6; }
9104if ${ac_cv_path_LS+:} false; then :
9105  $as_echo_n "(cached) " >&6
9106else
9107  case $LS in
9108  [\\/]* | ?:[\\/]*)
9109  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9110  ;;
9111  *)
9112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9113for as_dir in $PATH
9114do
9115  IFS=$as_save_IFS
9116  test -z "$as_dir" && as_dir=.
9117    for ac_exec_ext in '' $ac_executable_extensions; do
9118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9119    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9121    break 2
9122  fi
9123done
9124  done
9125IFS=$as_save_IFS
9126
9127  ;;
9128esac
9129fi
9130LS=$ac_cv_path_LS
9131if test -n "$LS"; then
9132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9133$as_echo "$LS" >&6; }
9134else
9135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9136$as_echo "no" >&6; }
9137fi
9138
9139
9140  test -n "$LS" && break
9141done
9142
9143    else
9144      # If it succeeded, then it was overridden by the user. We will use it
9145      # for the tool.
9146
9147      # First remove it from the list of overridden variables, so we can test
9148      # for unknown variables in the end.
9149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9150
9151      # Check if we try to supply an empty value
9152      if test "x$LS" = x; then
9153        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9154$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9156$as_echo_n "checking for LS... " >&6; }
9157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9158$as_echo "disabled" >&6; }
9159      else
9160        # Check if the provided tool contains a complete path.
9161        tool_specified="$LS"
9162        tool_basename="${tool_specified##*/}"
9163        if test "x$tool_basename" = "x$tool_specified"; then
9164          # A command without a complete path is provided, search $PATH.
9165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9166$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9167          # Extract the first word of "$tool_basename", so it can be a program name with args.
9168set dummy $tool_basename; ac_word=$2
9169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9170$as_echo_n "checking for $ac_word... " >&6; }
9171if ${ac_cv_path_LS+:} false; then :
9172  $as_echo_n "(cached) " >&6
9173else
9174  case $LS in
9175  [\\/]* | ?:[\\/]*)
9176  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9177  ;;
9178  *)
9179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9180for as_dir in $PATH
9181do
9182  IFS=$as_save_IFS
9183  test -z "$as_dir" && as_dir=.
9184    for ac_exec_ext in '' $ac_executable_extensions; do
9185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9186    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9188    break 2
9189  fi
9190done
9191  done
9192IFS=$as_save_IFS
9193
9194  ;;
9195esac
9196fi
9197LS=$ac_cv_path_LS
9198if test -n "$LS"; then
9199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9200$as_echo "$LS" >&6; }
9201else
9202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9203$as_echo "no" >&6; }
9204fi
9205
9206
9207          if test "x$LS" = x; then
9208            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9209          fi
9210        else
9211          # Otherwise we believe it is a complete path. Use it as it is.
9212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9213$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9214          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9215$as_echo_n "checking for LS... " >&6; }
9216          if test ! -x "$tool_specified"; then
9217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9218$as_echo "not found" >&6; }
9219            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9220          fi
9221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9222$as_echo "$tool_specified" >&6; }
9223        fi
9224      fi
9225    fi
9226
9227  fi
9228
9229
9230
9231  if test "x$LS" = x; then
9232    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9233  fi
9234
9235
9236
9237
9238
9239  # Publish this variable in the help.
9240
9241
9242  if [ -z "${MKDIR+x}" ]; then
9243    # The variable is not set by user, try to locate tool using the code snippet
9244    for ac_prog in mkdir
9245do
9246  # Extract the first word of "$ac_prog", so it can be a program name with args.
9247set dummy $ac_prog; ac_word=$2
9248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9249$as_echo_n "checking for $ac_word... " >&6; }
9250if ${ac_cv_path_MKDIR+:} false; then :
9251  $as_echo_n "(cached) " >&6
9252else
9253  case $MKDIR in
9254  [\\/]* | ?:[\\/]*)
9255  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9256  ;;
9257  *)
9258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9259for as_dir in $PATH
9260do
9261  IFS=$as_save_IFS
9262  test -z "$as_dir" && as_dir=.
9263    for ac_exec_ext in '' $ac_executable_extensions; do
9264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9265    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9267    break 2
9268  fi
9269done
9270  done
9271IFS=$as_save_IFS
9272
9273  ;;
9274esac
9275fi
9276MKDIR=$ac_cv_path_MKDIR
9277if test -n "$MKDIR"; then
9278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9279$as_echo "$MKDIR" >&6; }
9280else
9281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9282$as_echo "no" >&6; }
9283fi
9284
9285
9286  test -n "$MKDIR" && break
9287done
9288
9289  else
9290    # The variable is set, but is it from the command line or the environment?
9291
9292    # Try to remove the string !MKDIR! from our list.
9293    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9294    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9295      # If it failed, the variable was not from the command line. Ignore it,
9296      # but warn the user (except for BASH, which is always set by the calling BASH).
9297      if test "xMKDIR" != xBASH; then
9298        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9299$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9300      fi
9301      # Try to locate tool using the code snippet
9302      for ac_prog in mkdir
9303do
9304  # Extract the first word of "$ac_prog", so it can be a program name with args.
9305set dummy $ac_prog; ac_word=$2
9306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9307$as_echo_n "checking for $ac_word... " >&6; }
9308if ${ac_cv_path_MKDIR+:} false; then :
9309  $as_echo_n "(cached) " >&6
9310else
9311  case $MKDIR in
9312  [\\/]* | ?:[\\/]*)
9313  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9314  ;;
9315  *)
9316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9317for as_dir in $PATH
9318do
9319  IFS=$as_save_IFS
9320  test -z "$as_dir" && as_dir=.
9321    for ac_exec_ext in '' $ac_executable_extensions; do
9322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9323    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9325    break 2
9326  fi
9327done
9328  done
9329IFS=$as_save_IFS
9330
9331  ;;
9332esac
9333fi
9334MKDIR=$ac_cv_path_MKDIR
9335if test -n "$MKDIR"; then
9336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9337$as_echo "$MKDIR" >&6; }
9338else
9339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9340$as_echo "no" >&6; }
9341fi
9342
9343
9344  test -n "$MKDIR" && break
9345done
9346
9347    else
9348      # If it succeeded, then it was overridden by the user. We will use it
9349      # for the tool.
9350
9351      # First remove it from the list of overridden variables, so we can test
9352      # for unknown variables in the end.
9353      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9354
9355      # Check if we try to supply an empty value
9356      if test "x$MKDIR" = x; then
9357        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9358$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9359        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9360$as_echo_n "checking for MKDIR... " >&6; }
9361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9362$as_echo "disabled" >&6; }
9363      else
9364        # Check if the provided tool contains a complete path.
9365        tool_specified="$MKDIR"
9366        tool_basename="${tool_specified##*/}"
9367        if test "x$tool_basename" = "x$tool_specified"; then
9368          # A command without a complete path is provided, search $PATH.
9369          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9370$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9371          # Extract the first word of "$tool_basename", so it can be a program name with args.
9372set dummy $tool_basename; ac_word=$2
9373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9374$as_echo_n "checking for $ac_word... " >&6; }
9375if ${ac_cv_path_MKDIR+:} false; then :
9376  $as_echo_n "(cached) " >&6
9377else
9378  case $MKDIR in
9379  [\\/]* | ?:[\\/]*)
9380  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9381  ;;
9382  *)
9383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9384for as_dir in $PATH
9385do
9386  IFS=$as_save_IFS
9387  test -z "$as_dir" && as_dir=.
9388    for ac_exec_ext in '' $ac_executable_extensions; do
9389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9390    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9392    break 2
9393  fi
9394done
9395  done
9396IFS=$as_save_IFS
9397
9398  ;;
9399esac
9400fi
9401MKDIR=$ac_cv_path_MKDIR
9402if test -n "$MKDIR"; then
9403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9404$as_echo "$MKDIR" >&6; }
9405else
9406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9407$as_echo "no" >&6; }
9408fi
9409
9410
9411          if test "x$MKDIR" = x; then
9412            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9413          fi
9414        else
9415          # Otherwise we believe it is a complete path. Use it as it is.
9416          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9417$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9418          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9419$as_echo_n "checking for MKDIR... " >&6; }
9420          if test ! -x "$tool_specified"; then
9421            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9422$as_echo "not found" >&6; }
9423            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9424          fi
9425          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9426$as_echo "$tool_specified" >&6; }
9427        fi
9428      fi
9429    fi
9430
9431  fi
9432
9433
9434
9435  if test "x$MKDIR" = x; then
9436    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9437  fi
9438
9439
9440
9441
9442
9443  # Publish this variable in the help.
9444
9445
9446  if [ -z "${MKTEMP+x}" ]; then
9447    # The variable is not set by user, try to locate tool using the code snippet
9448    for ac_prog in mktemp
9449do
9450  # Extract the first word of "$ac_prog", so it can be a program name with args.
9451set dummy $ac_prog; ac_word=$2
9452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9453$as_echo_n "checking for $ac_word... " >&6; }
9454if ${ac_cv_path_MKTEMP+:} false; then :
9455  $as_echo_n "(cached) " >&6
9456else
9457  case $MKTEMP in
9458  [\\/]* | ?:[\\/]*)
9459  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9460  ;;
9461  *)
9462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9463for as_dir in $PATH
9464do
9465  IFS=$as_save_IFS
9466  test -z "$as_dir" && as_dir=.
9467    for ac_exec_ext in '' $ac_executable_extensions; do
9468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9469    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9471    break 2
9472  fi
9473done
9474  done
9475IFS=$as_save_IFS
9476
9477  ;;
9478esac
9479fi
9480MKTEMP=$ac_cv_path_MKTEMP
9481if test -n "$MKTEMP"; then
9482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9483$as_echo "$MKTEMP" >&6; }
9484else
9485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9486$as_echo "no" >&6; }
9487fi
9488
9489
9490  test -n "$MKTEMP" && break
9491done
9492
9493  else
9494    # The variable is set, but is it from the command line or the environment?
9495
9496    # Try to remove the string !MKTEMP! from our list.
9497    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9498    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9499      # If it failed, the variable was not from the command line. Ignore it,
9500      # but warn the user (except for BASH, which is always set by the calling BASH).
9501      if test "xMKTEMP" != xBASH; then
9502        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9503$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9504      fi
9505      # Try to locate tool using the code snippet
9506      for ac_prog in mktemp
9507do
9508  # Extract the first word of "$ac_prog", so it can be a program name with args.
9509set dummy $ac_prog; ac_word=$2
9510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9511$as_echo_n "checking for $ac_word... " >&6; }
9512if ${ac_cv_path_MKTEMP+:} false; then :
9513  $as_echo_n "(cached) " >&6
9514else
9515  case $MKTEMP in
9516  [\\/]* | ?:[\\/]*)
9517  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9518  ;;
9519  *)
9520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9521for as_dir in $PATH
9522do
9523  IFS=$as_save_IFS
9524  test -z "$as_dir" && as_dir=.
9525    for ac_exec_ext in '' $ac_executable_extensions; do
9526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9527    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9529    break 2
9530  fi
9531done
9532  done
9533IFS=$as_save_IFS
9534
9535  ;;
9536esac
9537fi
9538MKTEMP=$ac_cv_path_MKTEMP
9539if test -n "$MKTEMP"; then
9540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9541$as_echo "$MKTEMP" >&6; }
9542else
9543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9544$as_echo "no" >&6; }
9545fi
9546
9547
9548  test -n "$MKTEMP" && break
9549done
9550
9551    else
9552      # If it succeeded, then it was overridden by the user. We will use it
9553      # for the tool.
9554
9555      # First remove it from the list of overridden variables, so we can test
9556      # for unknown variables in the end.
9557      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9558
9559      # Check if we try to supply an empty value
9560      if test "x$MKTEMP" = x; then
9561        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9562$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9563        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9564$as_echo_n "checking for MKTEMP... " >&6; }
9565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9566$as_echo "disabled" >&6; }
9567      else
9568        # Check if the provided tool contains a complete path.
9569        tool_specified="$MKTEMP"
9570        tool_basename="${tool_specified##*/}"
9571        if test "x$tool_basename" = "x$tool_specified"; then
9572          # A command without a complete path is provided, search $PATH.
9573          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9574$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9575          # Extract the first word of "$tool_basename", so it can be a program name with args.
9576set dummy $tool_basename; ac_word=$2
9577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9578$as_echo_n "checking for $ac_word... " >&6; }
9579if ${ac_cv_path_MKTEMP+:} false; then :
9580  $as_echo_n "(cached) " >&6
9581else
9582  case $MKTEMP in
9583  [\\/]* | ?:[\\/]*)
9584  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9585  ;;
9586  *)
9587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9588for as_dir in $PATH
9589do
9590  IFS=$as_save_IFS
9591  test -z "$as_dir" && as_dir=.
9592    for ac_exec_ext in '' $ac_executable_extensions; do
9593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9594    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9596    break 2
9597  fi
9598done
9599  done
9600IFS=$as_save_IFS
9601
9602  ;;
9603esac
9604fi
9605MKTEMP=$ac_cv_path_MKTEMP
9606if test -n "$MKTEMP"; then
9607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9608$as_echo "$MKTEMP" >&6; }
9609else
9610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9611$as_echo "no" >&6; }
9612fi
9613
9614
9615          if test "x$MKTEMP" = x; then
9616            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9617          fi
9618        else
9619          # Otherwise we believe it is a complete path. Use it as it is.
9620          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9621$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9622          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9623$as_echo_n "checking for MKTEMP... " >&6; }
9624          if test ! -x "$tool_specified"; then
9625            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9626$as_echo "not found" >&6; }
9627            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9628          fi
9629          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9630$as_echo "$tool_specified" >&6; }
9631        fi
9632      fi
9633    fi
9634
9635  fi
9636
9637
9638
9639  if test "x$MKTEMP" = x; then
9640    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9641  fi
9642
9643
9644
9645
9646
9647  # Publish this variable in the help.
9648
9649
9650  if [ -z "${MV+x}" ]; then
9651    # The variable is not set by user, try to locate tool using the code snippet
9652    for ac_prog in mv
9653do
9654  # Extract the first word of "$ac_prog", so it can be a program name with args.
9655set dummy $ac_prog; ac_word=$2
9656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9657$as_echo_n "checking for $ac_word... " >&6; }
9658if ${ac_cv_path_MV+:} false; then :
9659  $as_echo_n "(cached) " >&6
9660else
9661  case $MV in
9662  [\\/]* | ?:[\\/]*)
9663  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9664  ;;
9665  *)
9666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9667for as_dir in $PATH
9668do
9669  IFS=$as_save_IFS
9670  test -z "$as_dir" && as_dir=.
9671    for ac_exec_ext in '' $ac_executable_extensions; do
9672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9673    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9675    break 2
9676  fi
9677done
9678  done
9679IFS=$as_save_IFS
9680
9681  ;;
9682esac
9683fi
9684MV=$ac_cv_path_MV
9685if test -n "$MV"; then
9686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9687$as_echo "$MV" >&6; }
9688else
9689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9690$as_echo "no" >&6; }
9691fi
9692
9693
9694  test -n "$MV" && break
9695done
9696
9697  else
9698    # The variable is set, but is it from the command line or the environment?
9699
9700    # Try to remove the string !MV! from our list.
9701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9703      # If it failed, the variable was not from the command line. Ignore it,
9704      # but warn the user (except for BASH, which is always set by the calling BASH).
9705      if test "xMV" != xBASH; then
9706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9707$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9708      fi
9709      # Try to locate tool using the code snippet
9710      for ac_prog in mv
9711do
9712  # Extract the first word of "$ac_prog", so it can be a program name with args.
9713set dummy $ac_prog; ac_word=$2
9714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9715$as_echo_n "checking for $ac_word... " >&6; }
9716if ${ac_cv_path_MV+:} false; then :
9717  $as_echo_n "(cached) " >&6
9718else
9719  case $MV in
9720  [\\/]* | ?:[\\/]*)
9721  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9722  ;;
9723  *)
9724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9725for as_dir in $PATH
9726do
9727  IFS=$as_save_IFS
9728  test -z "$as_dir" && as_dir=.
9729    for ac_exec_ext in '' $ac_executable_extensions; do
9730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9731    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9733    break 2
9734  fi
9735done
9736  done
9737IFS=$as_save_IFS
9738
9739  ;;
9740esac
9741fi
9742MV=$ac_cv_path_MV
9743if test -n "$MV"; then
9744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9745$as_echo "$MV" >&6; }
9746else
9747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9748$as_echo "no" >&6; }
9749fi
9750
9751
9752  test -n "$MV" && break
9753done
9754
9755    else
9756      # If it succeeded, then it was overridden by the user. We will use it
9757      # for the tool.
9758
9759      # First remove it from the list of overridden variables, so we can test
9760      # for unknown variables in the end.
9761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9762
9763      # Check if we try to supply an empty value
9764      if test "x$MV" = x; then
9765        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9766$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9767        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9768$as_echo_n "checking for MV... " >&6; }
9769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9770$as_echo "disabled" >&6; }
9771      else
9772        # Check if the provided tool contains a complete path.
9773        tool_specified="$MV"
9774        tool_basename="${tool_specified##*/}"
9775        if test "x$tool_basename" = "x$tool_specified"; then
9776          # A command without a complete path is provided, search $PATH.
9777          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9778$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9779          # Extract the first word of "$tool_basename", so it can be a program name with args.
9780set dummy $tool_basename; ac_word=$2
9781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9782$as_echo_n "checking for $ac_word... " >&6; }
9783if ${ac_cv_path_MV+:} false; then :
9784  $as_echo_n "(cached) " >&6
9785else
9786  case $MV in
9787  [\\/]* | ?:[\\/]*)
9788  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9789  ;;
9790  *)
9791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9792for as_dir in $PATH
9793do
9794  IFS=$as_save_IFS
9795  test -z "$as_dir" && as_dir=.
9796    for ac_exec_ext in '' $ac_executable_extensions; do
9797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9798    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9800    break 2
9801  fi
9802done
9803  done
9804IFS=$as_save_IFS
9805
9806  ;;
9807esac
9808fi
9809MV=$ac_cv_path_MV
9810if test -n "$MV"; then
9811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9812$as_echo "$MV" >&6; }
9813else
9814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9815$as_echo "no" >&6; }
9816fi
9817
9818
9819          if test "x$MV" = x; then
9820            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9821          fi
9822        else
9823          # Otherwise we believe it is a complete path. Use it as it is.
9824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9825$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9826          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9827$as_echo_n "checking for MV... " >&6; }
9828          if test ! -x "$tool_specified"; then
9829            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9830$as_echo "not found" >&6; }
9831            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9832          fi
9833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9834$as_echo "$tool_specified" >&6; }
9835        fi
9836      fi
9837    fi
9838
9839  fi
9840
9841
9842
9843  if test "x$MV" = x; then
9844    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9845  fi
9846
9847
9848
9849
9850
9851  # Publish this variable in the help.
9852
9853
9854  if [ -z "${NAWK+x}" ]; then
9855    # The variable is not set by user, try to locate tool using the code snippet
9856    for ac_prog in nawk gawk awk
9857do
9858  # Extract the first word of "$ac_prog", so it can be a program name with args.
9859set dummy $ac_prog; ac_word=$2
9860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9861$as_echo_n "checking for $ac_word... " >&6; }
9862if ${ac_cv_path_NAWK+:} false; then :
9863  $as_echo_n "(cached) " >&6
9864else
9865  case $NAWK in
9866  [\\/]* | ?:[\\/]*)
9867  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9868  ;;
9869  *)
9870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9871for as_dir in $PATH
9872do
9873  IFS=$as_save_IFS
9874  test -z "$as_dir" && as_dir=.
9875    for ac_exec_ext in '' $ac_executable_extensions; do
9876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9877    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9879    break 2
9880  fi
9881done
9882  done
9883IFS=$as_save_IFS
9884
9885  ;;
9886esac
9887fi
9888NAWK=$ac_cv_path_NAWK
9889if test -n "$NAWK"; then
9890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9891$as_echo "$NAWK" >&6; }
9892else
9893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9894$as_echo "no" >&6; }
9895fi
9896
9897
9898  test -n "$NAWK" && break
9899done
9900
9901  else
9902    # The variable is set, but is it from the command line or the environment?
9903
9904    # Try to remove the string !NAWK! from our list.
9905    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9906    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9907      # If it failed, the variable was not from the command line. Ignore it,
9908      # but warn the user (except for BASH, which is always set by the calling BASH).
9909      if test "xNAWK" != xBASH; then
9910        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9911$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9912      fi
9913      # Try to locate tool using the code snippet
9914      for ac_prog in nawk gawk awk
9915do
9916  # Extract the first word of "$ac_prog", so it can be a program name with args.
9917set dummy $ac_prog; ac_word=$2
9918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9919$as_echo_n "checking for $ac_word... " >&6; }
9920if ${ac_cv_path_NAWK+:} false; then :
9921  $as_echo_n "(cached) " >&6
9922else
9923  case $NAWK in
9924  [\\/]* | ?:[\\/]*)
9925  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9926  ;;
9927  *)
9928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9929for as_dir in $PATH
9930do
9931  IFS=$as_save_IFS
9932  test -z "$as_dir" && as_dir=.
9933    for ac_exec_ext in '' $ac_executable_extensions; do
9934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9935    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9937    break 2
9938  fi
9939done
9940  done
9941IFS=$as_save_IFS
9942
9943  ;;
9944esac
9945fi
9946NAWK=$ac_cv_path_NAWK
9947if test -n "$NAWK"; then
9948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9949$as_echo "$NAWK" >&6; }
9950else
9951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9952$as_echo "no" >&6; }
9953fi
9954
9955
9956  test -n "$NAWK" && break
9957done
9958
9959    else
9960      # If it succeeded, then it was overridden by the user. We will use it
9961      # for the tool.
9962
9963      # First remove it from the list of overridden variables, so we can test
9964      # for unknown variables in the end.
9965      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9966
9967      # Check if we try to supply an empty value
9968      if test "x$NAWK" = x; then
9969        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9970$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9972$as_echo_n "checking for NAWK... " >&6; }
9973        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9974$as_echo "disabled" >&6; }
9975      else
9976        # Check if the provided tool contains a complete path.
9977        tool_specified="$NAWK"
9978        tool_basename="${tool_specified##*/}"
9979        if test "x$tool_basename" = "x$tool_specified"; then
9980          # A command without a complete path is provided, search $PATH.
9981          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9982$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9983          # Extract the first word of "$tool_basename", so it can be a program name with args.
9984set dummy $tool_basename; ac_word=$2
9985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9986$as_echo_n "checking for $ac_word... " >&6; }
9987if ${ac_cv_path_NAWK+:} false; then :
9988  $as_echo_n "(cached) " >&6
9989else
9990  case $NAWK in
9991  [\\/]* | ?:[\\/]*)
9992  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9993  ;;
9994  *)
9995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9996for as_dir in $PATH
9997do
9998  IFS=$as_save_IFS
9999  test -z "$as_dir" && as_dir=.
10000    for ac_exec_ext in '' $ac_executable_extensions; do
10001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10002    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10004    break 2
10005  fi
10006done
10007  done
10008IFS=$as_save_IFS
10009
10010  ;;
10011esac
10012fi
10013NAWK=$ac_cv_path_NAWK
10014if test -n "$NAWK"; then
10015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10016$as_echo "$NAWK" >&6; }
10017else
10018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10019$as_echo "no" >&6; }
10020fi
10021
10022
10023          if test "x$NAWK" = x; then
10024            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10025          fi
10026        else
10027          # Otherwise we believe it is a complete path. Use it as it is.
10028          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10029$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10030          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10031$as_echo_n "checking for NAWK... " >&6; }
10032          if test ! -x "$tool_specified"; then
10033            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10034$as_echo "not found" >&6; }
10035            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10036          fi
10037          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10038$as_echo "$tool_specified" >&6; }
10039        fi
10040      fi
10041    fi
10042
10043  fi
10044
10045
10046
10047  if test "x$NAWK" = x; then
10048    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10049  fi
10050
10051
10052
10053
10054
10055  # Publish this variable in the help.
10056
10057
10058  if [ -z "${PRINTF+x}" ]; then
10059    # The variable is not set by user, try to locate tool using the code snippet
10060    for ac_prog in printf
10061do
10062  # Extract the first word of "$ac_prog", so it can be a program name with args.
10063set dummy $ac_prog; ac_word=$2
10064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10065$as_echo_n "checking for $ac_word... " >&6; }
10066if ${ac_cv_path_PRINTF+:} false; then :
10067  $as_echo_n "(cached) " >&6
10068else
10069  case $PRINTF in
10070  [\\/]* | ?:[\\/]*)
10071  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10072  ;;
10073  *)
10074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10075for as_dir in $PATH
10076do
10077  IFS=$as_save_IFS
10078  test -z "$as_dir" && as_dir=.
10079    for ac_exec_ext in '' $ac_executable_extensions; do
10080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10081    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10083    break 2
10084  fi
10085done
10086  done
10087IFS=$as_save_IFS
10088
10089  ;;
10090esac
10091fi
10092PRINTF=$ac_cv_path_PRINTF
10093if test -n "$PRINTF"; then
10094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10095$as_echo "$PRINTF" >&6; }
10096else
10097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098$as_echo "no" >&6; }
10099fi
10100
10101
10102  test -n "$PRINTF" && break
10103done
10104
10105  else
10106    # The variable is set, but is it from the command line or the environment?
10107
10108    # Try to remove the string !PRINTF! from our list.
10109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10111      # If it failed, the variable was not from the command line. Ignore it,
10112      # but warn the user (except for BASH, which is always set by the calling BASH).
10113      if test "xPRINTF" != xBASH; then
10114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10115$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10116      fi
10117      # Try to locate tool using the code snippet
10118      for ac_prog in printf
10119do
10120  # Extract the first word of "$ac_prog", so it can be a program name with args.
10121set dummy $ac_prog; ac_word=$2
10122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10123$as_echo_n "checking for $ac_word... " >&6; }
10124if ${ac_cv_path_PRINTF+:} false; then :
10125  $as_echo_n "(cached) " >&6
10126else
10127  case $PRINTF in
10128  [\\/]* | ?:[\\/]*)
10129  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10130  ;;
10131  *)
10132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10133for as_dir in $PATH
10134do
10135  IFS=$as_save_IFS
10136  test -z "$as_dir" && as_dir=.
10137    for ac_exec_ext in '' $ac_executable_extensions; do
10138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10139    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10141    break 2
10142  fi
10143done
10144  done
10145IFS=$as_save_IFS
10146
10147  ;;
10148esac
10149fi
10150PRINTF=$ac_cv_path_PRINTF
10151if test -n "$PRINTF"; then
10152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10153$as_echo "$PRINTF" >&6; }
10154else
10155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10156$as_echo "no" >&6; }
10157fi
10158
10159
10160  test -n "$PRINTF" && break
10161done
10162
10163    else
10164      # If it succeeded, then it was overridden by the user. We will use it
10165      # for the tool.
10166
10167      # First remove it from the list of overridden variables, so we can test
10168      # for unknown variables in the end.
10169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10170
10171      # Check if we try to supply an empty value
10172      if test "x$PRINTF" = x; then
10173        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10174$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10176$as_echo_n "checking for PRINTF... " >&6; }
10177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10178$as_echo "disabled" >&6; }
10179      else
10180        # Check if the provided tool contains a complete path.
10181        tool_specified="$PRINTF"
10182        tool_basename="${tool_specified##*/}"
10183        if test "x$tool_basename" = "x$tool_specified"; then
10184          # A command without a complete path is provided, search $PATH.
10185          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10186$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10187          # Extract the first word of "$tool_basename", so it can be a program name with args.
10188set dummy $tool_basename; ac_word=$2
10189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10190$as_echo_n "checking for $ac_word... " >&6; }
10191if ${ac_cv_path_PRINTF+:} false; then :
10192  $as_echo_n "(cached) " >&6
10193else
10194  case $PRINTF in
10195  [\\/]* | ?:[\\/]*)
10196  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10197  ;;
10198  *)
10199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10200for as_dir in $PATH
10201do
10202  IFS=$as_save_IFS
10203  test -z "$as_dir" && as_dir=.
10204    for ac_exec_ext in '' $ac_executable_extensions; do
10205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10206    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10208    break 2
10209  fi
10210done
10211  done
10212IFS=$as_save_IFS
10213
10214  ;;
10215esac
10216fi
10217PRINTF=$ac_cv_path_PRINTF
10218if test -n "$PRINTF"; then
10219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10220$as_echo "$PRINTF" >&6; }
10221else
10222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10223$as_echo "no" >&6; }
10224fi
10225
10226
10227          if test "x$PRINTF" = x; then
10228            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10229          fi
10230        else
10231          # Otherwise we believe it is a complete path. Use it as it is.
10232          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10233$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10234          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10235$as_echo_n "checking for PRINTF... " >&6; }
10236          if test ! -x "$tool_specified"; then
10237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10238$as_echo "not found" >&6; }
10239            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10240          fi
10241          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10242$as_echo "$tool_specified" >&6; }
10243        fi
10244      fi
10245    fi
10246
10247  fi
10248
10249
10250
10251  if test "x$PRINTF" = x; then
10252    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10253  fi
10254
10255
10256
10257
10258
10259  # Publish this variable in the help.
10260
10261
10262  if [ -z "${RM+x}" ]; then
10263    # The variable is not set by user, try to locate tool using the code snippet
10264    for ac_prog in rm
10265do
10266  # Extract the first word of "$ac_prog", so it can be a program name with args.
10267set dummy $ac_prog; ac_word=$2
10268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10269$as_echo_n "checking for $ac_word... " >&6; }
10270if ${ac_cv_path_RM+:} false; then :
10271  $as_echo_n "(cached) " >&6
10272else
10273  case $RM in
10274  [\\/]* | ?:[\\/]*)
10275  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10276  ;;
10277  *)
10278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10279for as_dir in $PATH
10280do
10281  IFS=$as_save_IFS
10282  test -z "$as_dir" && as_dir=.
10283    for ac_exec_ext in '' $ac_executable_extensions; do
10284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10285    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10287    break 2
10288  fi
10289done
10290  done
10291IFS=$as_save_IFS
10292
10293  ;;
10294esac
10295fi
10296RM=$ac_cv_path_RM
10297if test -n "$RM"; then
10298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10299$as_echo "$RM" >&6; }
10300else
10301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10302$as_echo "no" >&6; }
10303fi
10304
10305
10306  test -n "$RM" && break
10307done
10308
10309  else
10310    # The variable is set, but is it from the command line or the environment?
10311
10312    # Try to remove the string !RM! from our list.
10313    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10314    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10315      # If it failed, the variable was not from the command line. Ignore it,
10316      # but warn the user (except for BASH, which is always set by the calling BASH).
10317      if test "xRM" != xBASH; then
10318        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10319$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10320      fi
10321      # Try to locate tool using the code snippet
10322      for ac_prog in rm
10323do
10324  # Extract the first word of "$ac_prog", so it can be a program name with args.
10325set dummy $ac_prog; ac_word=$2
10326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10327$as_echo_n "checking for $ac_word... " >&6; }
10328if ${ac_cv_path_RM+:} false; then :
10329  $as_echo_n "(cached) " >&6
10330else
10331  case $RM in
10332  [\\/]* | ?:[\\/]*)
10333  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10334  ;;
10335  *)
10336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10337for as_dir in $PATH
10338do
10339  IFS=$as_save_IFS
10340  test -z "$as_dir" && as_dir=.
10341    for ac_exec_ext in '' $ac_executable_extensions; do
10342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10343    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10345    break 2
10346  fi
10347done
10348  done
10349IFS=$as_save_IFS
10350
10351  ;;
10352esac
10353fi
10354RM=$ac_cv_path_RM
10355if test -n "$RM"; then
10356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10357$as_echo "$RM" >&6; }
10358else
10359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10360$as_echo "no" >&6; }
10361fi
10362
10363
10364  test -n "$RM" && break
10365done
10366
10367    else
10368      # If it succeeded, then it was overridden by the user. We will use it
10369      # for the tool.
10370
10371      # First remove it from the list of overridden variables, so we can test
10372      # for unknown variables in the end.
10373      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10374
10375      # Check if we try to supply an empty value
10376      if test "x$RM" = x; then
10377        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10378$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10380$as_echo_n "checking for RM... " >&6; }
10381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10382$as_echo "disabled" >&6; }
10383      else
10384        # Check if the provided tool contains a complete path.
10385        tool_specified="$RM"
10386        tool_basename="${tool_specified##*/}"
10387        if test "x$tool_basename" = "x$tool_specified"; then
10388          # A command without a complete path is provided, search $PATH.
10389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10390$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10391          # Extract the first word of "$tool_basename", so it can be a program name with args.
10392set dummy $tool_basename; ac_word=$2
10393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10394$as_echo_n "checking for $ac_word... " >&6; }
10395if ${ac_cv_path_RM+:} false; then :
10396  $as_echo_n "(cached) " >&6
10397else
10398  case $RM in
10399  [\\/]* | ?:[\\/]*)
10400  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10401  ;;
10402  *)
10403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10404for as_dir in $PATH
10405do
10406  IFS=$as_save_IFS
10407  test -z "$as_dir" && as_dir=.
10408    for ac_exec_ext in '' $ac_executable_extensions; do
10409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10410    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10412    break 2
10413  fi
10414done
10415  done
10416IFS=$as_save_IFS
10417
10418  ;;
10419esac
10420fi
10421RM=$ac_cv_path_RM
10422if test -n "$RM"; then
10423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10424$as_echo "$RM" >&6; }
10425else
10426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10427$as_echo "no" >&6; }
10428fi
10429
10430
10431          if test "x$RM" = x; then
10432            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10433          fi
10434        else
10435          # Otherwise we believe it is a complete path. Use it as it is.
10436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10437$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10438          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10439$as_echo_n "checking for RM... " >&6; }
10440          if test ! -x "$tool_specified"; then
10441            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10442$as_echo "not found" >&6; }
10443            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10444          fi
10445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10446$as_echo "$tool_specified" >&6; }
10447        fi
10448      fi
10449    fi
10450
10451  fi
10452
10453
10454
10455  if test "x$RM" = x; then
10456    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10457  fi
10458
10459
10460
10461
10462
10463  # Publish this variable in the help.
10464
10465
10466  if [ -z "${RMDIR+x}" ]; then
10467    # The variable is not set by user, try to locate tool using the code snippet
10468    for ac_prog in rmdir
10469do
10470  # Extract the first word of "$ac_prog", so it can be a program name with args.
10471set dummy $ac_prog; ac_word=$2
10472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10473$as_echo_n "checking for $ac_word... " >&6; }
10474if ${ac_cv_path_RMDIR+:} false; then :
10475  $as_echo_n "(cached) " >&6
10476else
10477  case $RMDIR in
10478  [\\/]* | ?:[\\/]*)
10479  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10480  ;;
10481  *)
10482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10483for as_dir in $PATH
10484do
10485  IFS=$as_save_IFS
10486  test -z "$as_dir" && as_dir=.
10487    for ac_exec_ext in '' $ac_executable_extensions; do
10488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10489    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10491    break 2
10492  fi
10493done
10494  done
10495IFS=$as_save_IFS
10496
10497  ;;
10498esac
10499fi
10500RMDIR=$ac_cv_path_RMDIR
10501if test -n "$RMDIR"; then
10502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10503$as_echo "$RMDIR" >&6; }
10504else
10505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10506$as_echo "no" >&6; }
10507fi
10508
10509
10510  test -n "$RMDIR" && break
10511done
10512
10513  else
10514    # The variable is set, but is it from the command line or the environment?
10515
10516    # Try to remove the string !RMDIR! from our list.
10517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10519      # If it failed, the variable was not from the command line. Ignore it,
10520      # but warn the user (except for BASH, which is always set by the calling BASH).
10521      if test "xRMDIR" != xBASH; then
10522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10523$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10524      fi
10525      # Try to locate tool using the code snippet
10526      for ac_prog in rmdir
10527do
10528  # Extract the first word of "$ac_prog", so it can be a program name with args.
10529set dummy $ac_prog; ac_word=$2
10530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10531$as_echo_n "checking for $ac_word... " >&6; }
10532if ${ac_cv_path_RMDIR+:} false; then :
10533  $as_echo_n "(cached) " >&6
10534else
10535  case $RMDIR in
10536  [\\/]* | ?:[\\/]*)
10537  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10538  ;;
10539  *)
10540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10541for as_dir in $PATH
10542do
10543  IFS=$as_save_IFS
10544  test -z "$as_dir" && as_dir=.
10545    for ac_exec_ext in '' $ac_executable_extensions; do
10546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10547    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10549    break 2
10550  fi
10551done
10552  done
10553IFS=$as_save_IFS
10554
10555  ;;
10556esac
10557fi
10558RMDIR=$ac_cv_path_RMDIR
10559if test -n "$RMDIR"; then
10560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10561$as_echo "$RMDIR" >&6; }
10562else
10563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10564$as_echo "no" >&6; }
10565fi
10566
10567
10568  test -n "$RMDIR" && break
10569done
10570
10571    else
10572      # If it succeeded, then it was overridden by the user. We will use it
10573      # for the tool.
10574
10575      # First remove it from the list of overridden variables, so we can test
10576      # for unknown variables in the end.
10577      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10578
10579      # Check if we try to supply an empty value
10580      if test "x$RMDIR" = x; then
10581        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10582$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10583        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10584$as_echo_n "checking for RMDIR... " >&6; }
10585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10586$as_echo "disabled" >&6; }
10587      else
10588        # Check if the provided tool contains a complete path.
10589        tool_specified="$RMDIR"
10590        tool_basename="${tool_specified##*/}"
10591        if test "x$tool_basename" = "x$tool_specified"; then
10592          # A command without a complete path is provided, search $PATH.
10593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10594$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10595          # Extract the first word of "$tool_basename", so it can be a program name with args.
10596set dummy $tool_basename; ac_word=$2
10597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10598$as_echo_n "checking for $ac_word... " >&6; }
10599if ${ac_cv_path_RMDIR+:} false; then :
10600  $as_echo_n "(cached) " >&6
10601else
10602  case $RMDIR in
10603  [\\/]* | ?:[\\/]*)
10604  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10605  ;;
10606  *)
10607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10608for as_dir in $PATH
10609do
10610  IFS=$as_save_IFS
10611  test -z "$as_dir" && as_dir=.
10612    for ac_exec_ext in '' $ac_executable_extensions; do
10613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10614    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10616    break 2
10617  fi
10618done
10619  done
10620IFS=$as_save_IFS
10621
10622  ;;
10623esac
10624fi
10625RMDIR=$ac_cv_path_RMDIR
10626if test -n "$RMDIR"; then
10627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10628$as_echo "$RMDIR" >&6; }
10629else
10630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10631$as_echo "no" >&6; }
10632fi
10633
10634
10635          if test "x$RMDIR" = x; then
10636            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10637          fi
10638        else
10639          # Otherwise we believe it is a complete path. Use it as it is.
10640          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10641$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10642          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10643$as_echo_n "checking for RMDIR... " >&6; }
10644          if test ! -x "$tool_specified"; then
10645            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10646$as_echo "not found" >&6; }
10647            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10648          fi
10649          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10650$as_echo "$tool_specified" >&6; }
10651        fi
10652      fi
10653    fi
10654
10655  fi
10656
10657
10658
10659  if test "x$RMDIR" = x; then
10660    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10661  fi
10662
10663
10664
10665
10666
10667  # Publish this variable in the help.
10668
10669
10670  if [ -z "${SH+x}" ]; then
10671    # The variable is not set by user, try to locate tool using the code snippet
10672    for ac_prog in sh
10673do
10674  # Extract the first word of "$ac_prog", so it can be a program name with args.
10675set dummy $ac_prog; ac_word=$2
10676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10677$as_echo_n "checking for $ac_word... " >&6; }
10678if ${ac_cv_path_SH+:} false; then :
10679  $as_echo_n "(cached) " >&6
10680else
10681  case $SH in
10682  [\\/]* | ?:[\\/]*)
10683  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10684  ;;
10685  *)
10686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10687for as_dir in $PATH
10688do
10689  IFS=$as_save_IFS
10690  test -z "$as_dir" && as_dir=.
10691    for ac_exec_ext in '' $ac_executable_extensions; do
10692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10693    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10695    break 2
10696  fi
10697done
10698  done
10699IFS=$as_save_IFS
10700
10701  ;;
10702esac
10703fi
10704SH=$ac_cv_path_SH
10705if test -n "$SH"; then
10706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10707$as_echo "$SH" >&6; }
10708else
10709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10710$as_echo "no" >&6; }
10711fi
10712
10713
10714  test -n "$SH" && break
10715done
10716
10717  else
10718    # The variable is set, but is it from the command line or the environment?
10719
10720    # Try to remove the string !SH! from our list.
10721    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10722    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10723      # If it failed, the variable was not from the command line. Ignore it,
10724      # but warn the user (except for BASH, which is always set by the calling BASH).
10725      if test "xSH" != xBASH; then
10726        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10727$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10728      fi
10729      # Try to locate tool using the code snippet
10730      for ac_prog in sh
10731do
10732  # Extract the first word of "$ac_prog", so it can be a program name with args.
10733set dummy $ac_prog; ac_word=$2
10734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10735$as_echo_n "checking for $ac_word... " >&6; }
10736if ${ac_cv_path_SH+:} false; then :
10737  $as_echo_n "(cached) " >&6
10738else
10739  case $SH in
10740  [\\/]* | ?:[\\/]*)
10741  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10742  ;;
10743  *)
10744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10745for as_dir in $PATH
10746do
10747  IFS=$as_save_IFS
10748  test -z "$as_dir" && as_dir=.
10749    for ac_exec_ext in '' $ac_executable_extensions; do
10750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10751    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10753    break 2
10754  fi
10755done
10756  done
10757IFS=$as_save_IFS
10758
10759  ;;
10760esac
10761fi
10762SH=$ac_cv_path_SH
10763if test -n "$SH"; then
10764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10765$as_echo "$SH" >&6; }
10766else
10767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10768$as_echo "no" >&6; }
10769fi
10770
10771
10772  test -n "$SH" && break
10773done
10774
10775    else
10776      # If it succeeded, then it was overridden by the user. We will use it
10777      # for the tool.
10778
10779      # First remove it from the list of overridden variables, so we can test
10780      # for unknown variables in the end.
10781      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10782
10783      # Check if we try to supply an empty value
10784      if test "x$SH" = x; then
10785        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10786$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10787        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10788$as_echo_n "checking for SH... " >&6; }
10789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10790$as_echo "disabled" >&6; }
10791      else
10792        # Check if the provided tool contains a complete path.
10793        tool_specified="$SH"
10794        tool_basename="${tool_specified##*/}"
10795        if test "x$tool_basename" = "x$tool_specified"; then
10796          # A command without a complete path is provided, search $PATH.
10797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10798$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10799          # Extract the first word of "$tool_basename", so it can be a program name with args.
10800set dummy $tool_basename; ac_word=$2
10801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10802$as_echo_n "checking for $ac_word... " >&6; }
10803if ${ac_cv_path_SH+:} false; then :
10804  $as_echo_n "(cached) " >&6
10805else
10806  case $SH in
10807  [\\/]* | ?:[\\/]*)
10808  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10809  ;;
10810  *)
10811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10812for as_dir in $PATH
10813do
10814  IFS=$as_save_IFS
10815  test -z "$as_dir" && as_dir=.
10816    for ac_exec_ext in '' $ac_executable_extensions; do
10817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10818    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10820    break 2
10821  fi
10822done
10823  done
10824IFS=$as_save_IFS
10825
10826  ;;
10827esac
10828fi
10829SH=$ac_cv_path_SH
10830if test -n "$SH"; then
10831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10832$as_echo "$SH" >&6; }
10833else
10834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10835$as_echo "no" >&6; }
10836fi
10837
10838
10839          if test "x$SH" = x; then
10840            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10841          fi
10842        else
10843          # Otherwise we believe it is a complete path. Use it as it is.
10844          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10845$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10846          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10847$as_echo_n "checking for SH... " >&6; }
10848          if test ! -x "$tool_specified"; then
10849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10850$as_echo "not found" >&6; }
10851            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10852          fi
10853          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10854$as_echo "$tool_specified" >&6; }
10855        fi
10856      fi
10857    fi
10858
10859  fi
10860
10861
10862
10863  if test "x$SH" = x; then
10864    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10865  fi
10866
10867
10868
10869
10870
10871  # Publish this variable in the help.
10872
10873
10874  if [ -z "${SORT+x}" ]; then
10875    # The variable is not set by user, try to locate tool using the code snippet
10876    for ac_prog in sort
10877do
10878  # Extract the first word of "$ac_prog", so it can be a program name with args.
10879set dummy $ac_prog; ac_word=$2
10880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10881$as_echo_n "checking for $ac_word... " >&6; }
10882if ${ac_cv_path_SORT+:} false; then :
10883  $as_echo_n "(cached) " >&6
10884else
10885  case $SORT in
10886  [\\/]* | ?:[\\/]*)
10887  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10888  ;;
10889  *)
10890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10891for as_dir in $PATH
10892do
10893  IFS=$as_save_IFS
10894  test -z "$as_dir" && as_dir=.
10895    for ac_exec_ext in '' $ac_executable_extensions; do
10896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10897    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10899    break 2
10900  fi
10901done
10902  done
10903IFS=$as_save_IFS
10904
10905  ;;
10906esac
10907fi
10908SORT=$ac_cv_path_SORT
10909if test -n "$SORT"; then
10910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10911$as_echo "$SORT" >&6; }
10912else
10913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10914$as_echo "no" >&6; }
10915fi
10916
10917
10918  test -n "$SORT" && break
10919done
10920
10921  else
10922    # The variable is set, but is it from the command line or the environment?
10923
10924    # Try to remove the string !SORT! from our list.
10925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10927      # If it failed, the variable was not from the command line. Ignore it,
10928      # but warn the user (except for BASH, which is always set by the calling BASH).
10929      if test "xSORT" != xBASH; then
10930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10931$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10932      fi
10933      # Try to locate tool using the code snippet
10934      for ac_prog in sort
10935do
10936  # Extract the first word of "$ac_prog", so it can be a program name with args.
10937set dummy $ac_prog; ac_word=$2
10938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10939$as_echo_n "checking for $ac_word... " >&6; }
10940if ${ac_cv_path_SORT+:} false; then :
10941  $as_echo_n "(cached) " >&6
10942else
10943  case $SORT in
10944  [\\/]* | ?:[\\/]*)
10945  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10946  ;;
10947  *)
10948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10949for as_dir in $PATH
10950do
10951  IFS=$as_save_IFS
10952  test -z "$as_dir" && as_dir=.
10953    for ac_exec_ext in '' $ac_executable_extensions; do
10954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10955    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10957    break 2
10958  fi
10959done
10960  done
10961IFS=$as_save_IFS
10962
10963  ;;
10964esac
10965fi
10966SORT=$ac_cv_path_SORT
10967if test -n "$SORT"; then
10968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10969$as_echo "$SORT" >&6; }
10970else
10971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10972$as_echo "no" >&6; }
10973fi
10974
10975
10976  test -n "$SORT" && break
10977done
10978
10979    else
10980      # If it succeeded, then it was overridden by the user. We will use it
10981      # for the tool.
10982
10983      # First remove it from the list of overridden variables, so we can test
10984      # for unknown variables in the end.
10985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10986
10987      # Check if we try to supply an empty value
10988      if test "x$SORT" = x; then
10989        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10990$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10991        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10992$as_echo_n "checking for SORT... " >&6; }
10993        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10994$as_echo "disabled" >&6; }
10995      else
10996        # Check if the provided tool contains a complete path.
10997        tool_specified="$SORT"
10998        tool_basename="${tool_specified##*/}"
10999        if test "x$tool_basename" = "x$tool_specified"; then
11000          # A command without a complete path is provided, search $PATH.
11001          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11002$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11003          # Extract the first word of "$tool_basename", so it can be a program name with args.
11004set dummy $tool_basename; ac_word=$2
11005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11006$as_echo_n "checking for $ac_word... " >&6; }
11007if ${ac_cv_path_SORT+:} false; then :
11008  $as_echo_n "(cached) " >&6
11009else
11010  case $SORT in
11011  [\\/]* | ?:[\\/]*)
11012  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11013  ;;
11014  *)
11015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11016for as_dir in $PATH
11017do
11018  IFS=$as_save_IFS
11019  test -z "$as_dir" && as_dir=.
11020    for ac_exec_ext in '' $ac_executable_extensions; do
11021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11022    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11024    break 2
11025  fi
11026done
11027  done
11028IFS=$as_save_IFS
11029
11030  ;;
11031esac
11032fi
11033SORT=$ac_cv_path_SORT
11034if test -n "$SORT"; then
11035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11036$as_echo "$SORT" >&6; }
11037else
11038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11039$as_echo "no" >&6; }
11040fi
11041
11042
11043          if test "x$SORT" = x; then
11044            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11045          fi
11046        else
11047          # Otherwise we believe it is a complete path. Use it as it is.
11048          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11049$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11050          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11051$as_echo_n "checking for SORT... " >&6; }
11052          if test ! -x "$tool_specified"; then
11053            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11054$as_echo "not found" >&6; }
11055            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11056          fi
11057          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11058$as_echo "$tool_specified" >&6; }
11059        fi
11060      fi
11061    fi
11062
11063  fi
11064
11065
11066
11067  if test "x$SORT" = x; then
11068    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11069  fi
11070
11071
11072
11073
11074
11075  # Publish this variable in the help.
11076
11077
11078  if [ -z "${TAIL+x}" ]; then
11079    # The variable is not set by user, try to locate tool using the code snippet
11080    for ac_prog in tail
11081do
11082  # Extract the first word of "$ac_prog", so it can be a program name with args.
11083set dummy $ac_prog; ac_word=$2
11084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11085$as_echo_n "checking for $ac_word... " >&6; }
11086if ${ac_cv_path_TAIL+:} false; then :
11087  $as_echo_n "(cached) " >&6
11088else
11089  case $TAIL in
11090  [\\/]* | ?:[\\/]*)
11091  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11092  ;;
11093  *)
11094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11095for as_dir in $PATH
11096do
11097  IFS=$as_save_IFS
11098  test -z "$as_dir" && as_dir=.
11099    for ac_exec_ext in '' $ac_executable_extensions; do
11100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11101    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11103    break 2
11104  fi
11105done
11106  done
11107IFS=$as_save_IFS
11108
11109  ;;
11110esac
11111fi
11112TAIL=$ac_cv_path_TAIL
11113if test -n "$TAIL"; then
11114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11115$as_echo "$TAIL" >&6; }
11116else
11117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11118$as_echo "no" >&6; }
11119fi
11120
11121
11122  test -n "$TAIL" && break
11123done
11124
11125  else
11126    # The variable is set, but is it from the command line or the environment?
11127
11128    # Try to remove the string !TAIL! from our list.
11129    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11130    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11131      # If it failed, the variable was not from the command line. Ignore it,
11132      # but warn the user (except for BASH, which is always set by the calling BASH).
11133      if test "xTAIL" != xBASH; then
11134        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11135$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11136      fi
11137      # Try to locate tool using the code snippet
11138      for ac_prog in tail
11139do
11140  # Extract the first word of "$ac_prog", so it can be a program name with args.
11141set dummy $ac_prog; ac_word=$2
11142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11143$as_echo_n "checking for $ac_word... " >&6; }
11144if ${ac_cv_path_TAIL+:} false; then :
11145  $as_echo_n "(cached) " >&6
11146else
11147  case $TAIL in
11148  [\\/]* | ?:[\\/]*)
11149  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11150  ;;
11151  *)
11152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11153for as_dir in $PATH
11154do
11155  IFS=$as_save_IFS
11156  test -z "$as_dir" && as_dir=.
11157    for ac_exec_ext in '' $ac_executable_extensions; do
11158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11159    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11161    break 2
11162  fi
11163done
11164  done
11165IFS=$as_save_IFS
11166
11167  ;;
11168esac
11169fi
11170TAIL=$ac_cv_path_TAIL
11171if test -n "$TAIL"; then
11172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11173$as_echo "$TAIL" >&6; }
11174else
11175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11176$as_echo "no" >&6; }
11177fi
11178
11179
11180  test -n "$TAIL" && break
11181done
11182
11183    else
11184      # If it succeeded, then it was overridden by the user. We will use it
11185      # for the tool.
11186
11187      # First remove it from the list of overridden variables, so we can test
11188      # for unknown variables in the end.
11189      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11190
11191      # Check if we try to supply an empty value
11192      if test "x$TAIL" = x; then
11193        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11194$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11195        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11196$as_echo_n "checking for TAIL... " >&6; }
11197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11198$as_echo "disabled" >&6; }
11199      else
11200        # Check if the provided tool contains a complete path.
11201        tool_specified="$TAIL"
11202        tool_basename="${tool_specified##*/}"
11203        if test "x$tool_basename" = "x$tool_specified"; then
11204          # A command without a complete path is provided, search $PATH.
11205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11206$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11207          # Extract the first word of "$tool_basename", so it can be a program name with args.
11208set dummy $tool_basename; ac_word=$2
11209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11210$as_echo_n "checking for $ac_word... " >&6; }
11211if ${ac_cv_path_TAIL+:} false; then :
11212  $as_echo_n "(cached) " >&6
11213else
11214  case $TAIL in
11215  [\\/]* | ?:[\\/]*)
11216  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11217  ;;
11218  *)
11219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11220for as_dir in $PATH
11221do
11222  IFS=$as_save_IFS
11223  test -z "$as_dir" && as_dir=.
11224    for ac_exec_ext in '' $ac_executable_extensions; do
11225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11226    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11228    break 2
11229  fi
11230done
11231  done
11232IFS=$as_save_IFS
11233
11234  ;;
11235esac
11236fi
11237TAIL=$ac_cv_path_TAIL
11238if test -n "$TAIL"; then
11239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11240$as_echo "$TAIL" >&6; }
11241else
11242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11243$as_echo "no" >&6; }
11244fi
11245
11246
11247          if test "x$TAIL" = x; then
11248            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11249          fi
11250        else
11251          # Otherwise we believe it is a complete path. Use it as it is.
11252          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11253$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11254          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11255$as_echo_n "checking for TAIL... " >&6; }
11256          if test ! -x "$tool_specified"; then
11257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11258$as_echo "not found" >&6; }
11259            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11260          fi
11261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11262$as_echo "$tool_specified" >&6; }
11263        fi
11264      fi
11265    fi
11266
11267  fi
11268
11269
11270
11271  if test "x$TAIL" = x; then
11272    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11273  fi
11274
11275
11276
11277
11278
11279  # Publish this variable in the help.
11280
11281
11282  if [ -z "${TAR+x}" ]; then
11283    # The variable is not set by user, try to locate tool using the code snippet
11284    for ac_prog in gtar tar
11285do
11286  # Extract the first word of "$ac_prog", so it can be a program name with args.
11287set dummy $ac_prog; ac_word=$2
11288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11289$as_echo_n "checking for $ac_word... " >&6; }
11290if ${ac_cv_path_TAR+:} false; then :
11291  $as_echo_n "(cached) " >&6
11292else
11293  case $TAR in
11294  [\\/]* | ?:[\\/]*)
11295  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11296  ;;
11297  *)
11298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11299for as_dir in $PATH
11300do
11301  IFS=$as_save_IFS
11302  test -z "$as_dir" && as_dir=.
11303    for ac_exec_ext in '' $ac_executable_extensions; do
11304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11305    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11307    break 2
11308  fi
11309done
11310  done
11311IFS=$as_save_IFS
11312
11313  ;;
11314esac
11315fi
11316TAR=$ac_cv_path_TAR
11317if test -n "$TAR"; then
11318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11319$as_echo "$TAR" >&6; }
11320else
11321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11322$as_echo "no" >&6; }
11323fi
11324
11325
11326  test -n "$TAR" && break
11327done
11328
11329  else
11330    # The variable is set, but is it from the command line or the environment?
11331
11332    # Try to remove the string !TAR! from our list.
11333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11335      # If it failed, the variable was not from the command line. Ignore it,
11336      # but warn the user (except for BASH, which is always set by the calling BASH).
11337      if test "xTAR" != xBASH; then
11338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11339$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11340      fi
11341      # Try to locate tool using the code snippet
11342      for ac_prog in gtar tar
11343do
11344  # Extract the first word of "$ac_prog", so it can be a program name with args.
11345set dummy $ac_prog; ac_word=$2
11346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11347$as_echo_n "checking for $ac_word... " >&6; }
11348if ${ac_cv_path_TAR+:} false; then :
11349  $as_echo_n "(cached) " >&6
11350else
11351  case $TAR in
11352  [\\/]* | ?:[\\/]*)
11353  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11354  ;;
11355  *)
11356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11357for as_dir in $PATH
11358do
11359  IFS=$as_save_IFS
11360  test -z "$as_dir" && as_dir=.
11361    for ac_exec_ext in '' $ac_executable_extensions; do
11362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11363    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11365    break 2
11366  fi
11367done
11368  done
11369IFS=$as_save_IFS
11370
11371  ;;
11372esac
11373fi
11374TAR=$ac_cv_path_TAR
11375if test -n "$TAR"; then
11376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11377$as_echo "$TAR" >&6; }
11378else
11379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11380$as_echo "no" >&6; }
11381fi
11382
11383
11384  test -n "$TAR" && break
11385done
11386
11387    else
11388      # If it succeeded, then it was overridden by the user. We will use it
11389      # for the tool.
11390
11391      # First remove it from the list of overridden variables, so we can test
11392      # for unknown variables in the end.
11393      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11394
11395      # Check if we try to supply an empty value
11396      if test "x$TAR" = x; then
11397        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11398$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11399        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11400$as_echo_n "checking for TAR... " >&6; }
11401        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11402$as_echo "disabled" >&6; }
11403      else
11404        # Check if the provided tool contains a complete path.
11405        tool_specified="$TAR"
11406        tool_basename="${tool_specified##*/}"
11407        if test "x$tool_basename" = "x$tool_specified"; then
11408          # A command without a complete path is provided, search $PATH.
11409          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11410$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11411          # Extract the first word of "$tool_basename", so it can be a program name with args.
11412set dummy $tool_basename; ac_word=$2
11413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11414$as_echo_n "checking for $ac_word... " >&6; }
11415if ${ac_cv_path_TAR+:} false; then :
11416  $as_echo_n "(cached) " >&6
11417else
11418  case $TAR in
11419  [\\/]* | ?:[\\/]*)
11420  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11421  ;;
11422  *)
11423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11424for as_dir in $PATH
11425do
11426  IFS=$as_save_IFS
11427  test -z "$as_dir" && as_dir=.
11428    for ac_exec_ext in '' $ac_executable_extensions; do
11429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11430    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11432    break 2
11433  fi
11434done
11435  done
11436IFS=$as_save_IFS
11437
11438  ;;
11439esac
11440fi
11441TAR=$ac_cv_path_TAR
11442if test -n "$TAR"; then
11443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11444$as_echo "$TAR" >&6; }
11445else
11446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11447$as_echo "no" >&6; }
11448fi
11449
11450
11451          if test "x$TAR" = x; then
11452            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11453          fi
11454        else
11455          # Otherwise we believe it is a complete path. Use it as it is.
11456          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11457$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11458          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11459$as_echo_n "checking for TAR... " >&6; }
11460          if test ! -x "$tool_specified"; then
11461            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11462$as_echo "not found" >&6; }
11463            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11464          fi
11465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11466$as_echo "$tool_specified" >&6; }
11467        fi
11468      fi
11469    fi
11470
11471  fi
11472
11473
11474
11475  if test "x$TAR" = x; then
11476    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11477  fi
11478
11479
11480
11481
11482
11483  # Publish this variable in the help.
11484
11485
11486  if [ -z "${TEE+x}" ]; then
11487    # The variable is not set by user, try to locate tool using the code snippet
11488    for ac_prog in tee
11489do
11490  # Extract the first word of "$ac_prog", so it can be a program name with args.
11491set dummy $ac_prog; ac_word=$2
11492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11493$as_echo_n "checking for $ac_word... " >&6; }
11494if ${ac_cv_path_TEE+:} false; then :
11495  $as_echo_n "(cached) " >&6
11496else
11497  case $TEE in
11498  [\\/]* | ?:[\\/]*)
11499  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11500  ;;
11501  *)
11502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11503for as_dir in $PATH
11504do
11505  IFS=$as_save_IFS
11506  test -z "$as_dir" && as_dir=.
11507    for ac_exec_ext in '' $ac_executable_extensions; do
11508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11509    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11511    break 2
11512  fi
11513done
11514  done
11515IFS=$as_save_IFS
11516
11517  ;;
11518esac
11519fi
11520TEE=$ac_cv_path_TEE
11521if test -n "$TEE"; then
11522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11523$as_echo "$TEE" >&6; }
11524else
11525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11526$as_echo "no" >&6; }
11527fi
11528
11529
11530  test -n "$TEE" && break
11531done
11532
11533  else
11534    # The variable is set, but is it from the command line or the environment?
11535
11536    # Try to remove the string !TEE! from our list.
11537    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11538    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11539      # If it failed, the variable was not from the command line. Ignore it,
11540      # but warn the user (except for BASH, which is always set by the calling BASH).
11541      if test "xTEE" != xBASH; then
11542        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11543$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11544      fi
11545      # Try to locate tool using the code snippet
11546      for ac_prog in tee
11547do
11548  # Extract the first word of "$ac_prog", so it can be a program name with args.
11549set dummy $ac_prog; ac_word=$2
11550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11551$as_echo_n "checking for $ac_word... " >&6; }
11552if ${ac_cv_path_TEE+:} false; then :
11553  $as_echo_n "(cached) " >&6
11554else
11555  case $TEE in
11556  [\\/]* | ?:[\\/]*)
11557  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11558  ;;
11559  *)
11560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11561for as_dir in $PATH
11562do
11563  IFS=$as_save_IFS
11564  test -z "$as_dir" && as_dir=.
11565    for ac_exec_ext in '' $ac_executable_extensions; do
11566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11567    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11569    break 2
11570  fi
11571done
11572  done
11573IFS=$as_save_IFS
11574
11575  ;;
11576esac
11577fi
11578TEE=$ac_cv_path_TEE
11579if test -n "$TEE"; then
11580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11581$as_echo "$TEE" >&6; }
11582else
11583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11584$as_echo "no" >&6; }
11585fi
11586
11587
11588  test -n "$TEE" && break
11589done
11590
11591    else
11592      # If it succeeded, then it was overridden by the user. We will use it
11593      # for the tool.
11594
11595      # First remove it from the list of overridden variables, so we can test
11596      # for unknown variables in the end.
11597      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11598
11599      # Check if we try to supply an empty value
11600      if test "x$TEE" = x; then
11601        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11602$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11604$as_echo_n "checking for TEE... " >&6; }
11605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11606$as_echo "disabled" >&6; }
11607      else
11608        # Check if the provided tool contains a complete path.
11609        tool_specified="$TEE"
11610        tool_basename="${tool_specified##*/}"
11611        if test "x$tool_basename" = "x$tool_specified"; then
11612          # A command without a complete path is provided, search $PATH.
11613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11614$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11615          # Extract the first word of "$tool_basename", so it can be a program name with args.
11616set dummy $tool_basename; ac_word=$2
11617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11618$as_echo_n "checking for $ac_word... " >&6; }
11619if ${ac_cv_path_TEE+:} false; then :
11620  $as_echo_n "(cached) " >&6
11621else
11622  case $TEE in
11623  [\\/]* | ?:[\\/]*)
11624  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11625  ;;
11626  *)
11627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11628for as_dir in $PATH
11629do
11630  IFS=$as_save_IFS
11631  test -z "$as_dir" && as_dir=.
11632    for ac_exec_ext in '' $ac_executable_extensions; do
11633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11634    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11636    break 2
11637  fi
11638done
11639  done
11640IFS=$as_save_IFS
11641
11642  ;;
11643esac
11644fi
11645TEE=$ac_cv_path_TEE
11646if test -n "$TEE"; then
11647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11648$as_echo "$TEE" >&6; }
11649else
11650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11651$as_echo "no" >&6; }
11652fi
11653
11654
11655          if test "x$TEE" = x; then
11656            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11657          fi
11658        else
11659          # Otherwise we believe it is a complete path. Use it as it is.
11660          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11661$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11662          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11663$as_echo_n "checking for TEE... " >&6; }
11664          if test ! -x "$tool_specified"; then
11665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11666$as_echo "not found" >&6; }
11667            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11668          fi
11669          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11670$as_echo "$tool_specified" >&6; }
11671        fi
11672      fi
11673    fi
11674
11675  fi
11676
11677
11678
11679  if test "x$TEE" = x; then
11680    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11681  fi
11682
11683
11684
11685
11686
11687  # Publish this variable in the help.
11688
11689
11690  if [ -z "${TOUCH+x}" ]; then
11691    # The variable is not set by user, try to locate tool using the code snippet
11692    for ac_prog in touch
11693do
11694  # Extract the first word of "$ac_prog", so it can be a program name with args.
11695set dummy $ac_prog; ac_word=$2
11696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11697$as_echo_n "checking for $ac_word... " >&6; }
11698if ${ac_cv_path_TOUCH+:} false; then :
11699  $as_echo_n "(cached) " >&6
11700else
11701  case $TOUCH in
11702  [\\/]* | ?:[\\/]*)
11703  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11704  ;;
11705  *)
11706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11707for as_dir in $PATH
11708do
11709  IFS=$as_save_IFS
11710  test -z "$as_dir" && as_dir=.
11711    for ac_exec_ext in '' $ac_executable_extensions; do
11712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11713    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11715    break 2
11716  fi
11717done
11718  done
11719IFS=$as_save_IFS
11720
11721  ;;
11722esac
11723fi
11724TOUCH=$ac_cv_path_TOUCH
11725if test -n "$TOUCH"; then
11726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11727$as_echo "$TOUCH" >&6; }
11728else
11729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11730$as_echo "no" >&6; }
11731fi
11732
11733
11734  test -n "$TOUCH" && break
11735done
11736
11737  else
11738    # The variable is set, but is it from the command line or the environment?
11739
11740    # Try to remove the string !TOUCH! from our list.
11741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11743      # If it failed, the variable was not from the command line. Ignore it,
11744      # but warn the user (except for BASH, which is always set by the calling BASH).
11745      if test "xTOUCH" != xBASH; then
11746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11747$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11748      fi
11749      # Try to locate tool using the code snippet
11750      for ac_prog in touch
11751do
11752  # Extract the first word of "$ac_prog", so it can be a program name with args.
11753set dummy $ac_prog; ac_word=$2
11754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11755$as_echo_n "checking for $ac_word... " >&6; }
11756if ${ac_cv_path_TOUCH+:} false; then :
11757  $as_echo_n "(cached) " >&6
11758else
11759  case $TOUCH in
11760  [\\/]* | ?:[\\/]*)
11761  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11762  ;;
11763  *)
11764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11765for as_dir in $PATH
11766do
11767  IFS=$as_save_IFS
11768  test -z "$as_dir" && as_dir=.
11769    for ac_exec_ext in '' $ac_executable_extensions; do
11770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11771    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11773    break 2
11774  fi
11775done
11776  done
11777IFS=$as_save_IFS
11778
11779  ;;
11780esac
11781fi
11782TOUCH=$ac_cv_path_TOUCH
11783if test -n "$TOUCH"; then
11784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11785$as_echo "$TOUCH" >&6; }
11786else
11787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11788$as_echo "no" >&6; }
11789fi
11790
11791
11792  test -n "$TOUCH" && break
11793done
11794
11795    else
11796      # If it succeeded, then it was overridden by the user. We will use it
11797      # for the tool.
11798
11799      # First remove it from the list of overridden variables, so we can test
11800      # for unknown variables in the end.
11801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11802
11803      # Check if we try to supply an empty value
11804      if test "x$TOUCH" = x; then
11805        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11806$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11807        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11808$as_echo_n "checking for TOUCH... " >&6; }
11809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11810$as_echo "disabled" >&6; }
11811      else
11812        # Check if the provided tool contains a complete path.
11813        tool_specified="$TOUCH"
11814        tool_basename="${tool_specified##*/}"
11815        if test "x$tool_basename" = "x$tool_specified"; then
11816          # A command without a complete path is provided, search $PATH.
11817          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11818$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11819          # Extract the first word of "$tool_basename", so it can be a program name with args.
11820set dummy $tool_basename; ac_word=$2
11821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11822$as_echo_n "checking for $ac_word... " >&6; }
11823if ${ac_cv_path_TOUCH+:} false; then :
11824  $as_echo_n "(cached) " >&6
11825else
11826  case $TOUCH in
11827  [\\/]* | ?:[\\/]*)
11828  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11829  ;;
11830  *)
11831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11832for as_dir in $PATH
11833do
11834  IFS=$as_save_IFS
11835  test -z "$as_dir" && as_dir=.
11836    for ac_exec_ext in '' $ac_executable_extensions; do
11837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11838    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11840    break 2
11841  fi
11842done
11843  done
11844IFS=$as_save_IFS
11845
11846  ;;
11847esac
11848fi
11849TOUCH=$ac_cv_path_TOUCH
11850if test -n "$TOUCH"; then
11851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11852$as_echo "$TOUCH" >&6; }
11853else
11854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11855$as_echo "no" >&6; }
11856fi
11857
11858
11859          if test "x$TOUCH" = x; then
11860            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11861          fi
11862        else
11863          # Otherwise we believe it is a complete path. Use it as it is.
11864          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11865$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11866          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11867$as_echo_n "checking for TOUCH... " >&6; }
11868          if test ! -x "$tool_specified"; then
11869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11870$as_echo "not found" >&6; }
11871            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11872          fi
11873          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11874$as_echo "$tool_specified" >&6; }
11875        fi
11876      fi
11877    fi
11878
11879  fi
11880
11881
11882
11883  if test "x$TOUCH" = x; then
11884    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11885  fi
11886
11887
11888
11889
11890
11891  # Publish this variable in the help.
11892
11893
11894  if [ -z "${TR+x}" ]; then
11895    # The variable is not set by user, try to locate tool using the code snippet
11896    for ac_prog in tr
11897do
11898  # Extract the first word of "$ac_prog", so it can be a program name with args.
11899set dummy $ac_prog; ac_word=$2
11900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11901$as_echo_n "checking for $ac_word... " >&6; }
11902if ${ac_cv_path_TR+:} false; then :
11903  $as_echo_n "(cached) " >&6
11904else
11905  case $TR in
11906  [\\/]* | ?:[\\/]*)
11907  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11908  ;;
11909  *)
11910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11911for as_dir in $PATH
11912do
11913  IFS=$as_save_IFS
11914  test -z "$as_dir" && as_dir=.
11915    for ac_exec_ext in '' $ac_executable_extensions; do
11916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11917    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11919    break 2
11920  fi
11921done
11922  done
11923IFS=$as_save_IFS
11924
11925  ;;
11926esac
11927fi
11928TR=$ac_cv_path_TR
11929if test -n "$TR"; then
11930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11931$as_echo "$TR" >&6; }
11932else
11933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11934$as_echo "no" >&6; }
11935fi
11936
11937
11938  test -n "$TR" && break
11939done
11940
11941  else
11942    # The variable is set, but is it from the command line or the environment?
11943
11944    # Try to remove the string !TR! from our list.
11945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11947      # If it failed, the variable was not from the command line. Ignore it,
11948      # but warn the user (except for BASH, which is always set by the calling BASH).
11949      if test "xTR" != xBASH; then
11950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11951$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11952      fi
11953      # Try to locate tool using the code snippet
11954      for ac_prog in tr
11955do
11956  # Extract the first word of "$ac_prog", so it can be a program name with args.
11957set dummy $ac_prog; ac_word=$2
11958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11959$as_echo_n "checking for $ac_word... " >&6; }
11960if ${ac_cv_path_TR+:} false; then :
11961  $as_echo_n "(cached) " >&6
11962else
11963  case $TR in
11964  [\\/]* | ?:[\\/]*)
11965  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11966  ;;
11967  *)
11968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11969for as_dir in $PATH
11970do
11971  IFS=$as_save_IFS
11972  test -z "$as_dir" && as_dir=.
11973    for ac_exec_ext in '' $ac_executable_extensions; do
11974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11975    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11977    break 2
11978  fi
11979done
11980  done
11981IFS=$as_save_IFS
11982
11983  ;;
11984esac
11985fi
11986TR=$ac_cv_path_TR
11987if test -n "$TR"; then
11988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11989$as_echo "$TR" >&6; }
11990else
11991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11992$as_echo "no" >&6; }
11993fi
11994
11995
11996  test -n "$TR" && break
11997done
11998
11999    else
12000      # If it succeeded, then it was overridden by the user. We will use it
12001      # for the tool.
12002
12003      # First remove it from the list of overridden variables, so we can test
12004      # for unknown variables in the end.
12005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12006
12007      # Check if we try to supply an empty value
12008      if test "x$TR" = x; then
12009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12010$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12012$as_echo_n "checking for TR... " >&6; }
12013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12014$as_echo "disabled" >&6; }
12015      else
12016        # Check if the provided tool contains a complete path.
12017        tool_specified="$TR"
12018        tool_basename="${tool_specified##*/}"
12019        if test "x$tool_basename" = "x$tool_specified"; then
12020          # A command without a complete path is provided, search $PATH.
12021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12022$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12023          # Extract the first word of "$tool_basename", so it can be a program name with args.
12024set dummy $tool_basename; ac_word=$2
12025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12026$as_echo_n "checking for $ac_word... " >&6; }
12027if ${ac_cv_path_TR+:} false; then :
12028  $as_echo_n "(cached) " >&6
12029else
12030  case $TR in
12031  [\\/]* | ?:[\\/]*)
12032  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12033  ;;
12034  *)
12035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12036for as_dir in $PATH
12037do
12038  IFS=$as_save_IFS
12039  test -z "$as_dir" && as_dir=.
12040    for ac_exec_ext in '' $ac_executable_extensions; do
12041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12042    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12044    break 2
12045  fi
12046done
12047  done
12048IFS=$as_save_IFS
12049
12050  ;;
12051esac
12052fi
12053TR=$ac_cv_path_TR
12054if test -n "$TR"; then
12055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12056$as_echo "$TR" >&6; }
12057else
12058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12059$as_echo "no" >&6; }
12060fi
12061
12062
12063          if test "x$TR" = x; then
12064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12065          fi
12066        else
12067          # Otherwise we believe it is a complete path. Use it as it is.
12068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12069$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12071$as_echo_n "checking for TR... " >&6; }
12072          if test ! -x "$tool_specified"; then
12073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12074$as_echo "not found" >&6; }
12075            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12076          fi
12077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12078$as_echo "$tool_specified" >&6; }
12079        fi
12080      fi
12081    fi
12082
12083  fi
12084
12085
12086
12087  if test "x$TR" = x; then
12088    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12089  fi
12090
12091
12092
12093
12094
12095  # Publish this variable in the help.
12096
12097
12098  if [ -z "${UNAME+x}" ]; then
12099    # The variable is not set by user, try to locate tool using the code snippet
12100    for ac_prog in uname
12101do
12102  # Extract the first word of "$ac_prog", so it can be a program name with args.
12103set dummy $ac_prog; ac_word=$2
12104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12105$as_echo_n "checking for $ac_word... " >&6; }
12106if ${ac_cv_path_UNAME+:} false; then :
12107  $as_echo_n "(cached) " >&6
12108else
12109  case $UNAME in
12110  [\\/]* | ?:[\\/]*)
12111  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12112  ;;
12113  *)
12114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12115for as_dir in $PATH
12116do
12117  IFS=$as_save_IFS
12118  test -z "$as_dir" && as_dir=.
12119    for ac_exec_ext in '' $ac_executable_extensions; do
12120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12121    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12123    break 2
12124  fi
12125done
12126  done
12127IFS=$as_save_IFS
12128
12129  ;;
12130esac
12131fi
12132UNAME=$ac_cv_path_UNAME
12133if test -n "$UNAME"; then
12134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12135$as_echo "$UNAME" >&6; }
12136else
12137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12138$as_echo "no" >&6; }
12139fi
12140
12141
12142  test -n "$UNAME" && break
12143done
12144
12145  else
12146    # The variable is set, but is it from the command line or the environment?
12147
12148    # Try to remove the string !UNAME! from our list.
12149    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12150    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12151      # If it failed, the variable was not from the command line. Ignore it,
12152      # but warn the user (except for BASH, which is always set by the calling BASH).
12153      if test "xUNAME" != xBASH; then
12154        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12155$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12156      fi
12157      # Try to locate tool using the code snippet
12158      for ac_prog in uname
12159do
12160  # Extract the first word of "$ac_prog", so it can be a program name with args.
12161set dummy $ac_prog; ac_word=$2
12162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12163$as_echo_n "checking for $ac_word... " >&6; }
12164if ${ac_cv_path_UNAME+:} false; then :
12165  $as_echo_n "(cached) " >&6
12166else
12167  case $UNAME in
12168  [\\/]* | ?:[\\/]*)
12169  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12170  ;;
12171  *)
12172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12173for as_dir in $PATH
12174do
12175  IFS=$as_save_IFS
12176  test -z "$as_dir" && as_dir=.
12177    for ac_exec_ext in '' $ac_executable_extensions; do
12178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12179    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12181    break 2
12182  fi
12183done
12184  done
12185IFS=$as_save_IFS
12186
12187  ;;
12188esac
12189fi
12190UNAME=$ac_cv_path_UNAME
12191if test -n "$UNAME"; then
12192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12193$as_echo "$UNAME" >&6; }
12194else
12195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12196$as_echo "no" >&6; }
12197fi
12198
12199
12200  test -n "$UNAME" && break
12201done
12202
12203    else
12204      # If it succeeded, then it was overridden by the user. We will use it
12205      # for the tool.
12206
12207      # First remove it from the list of overridden variables, so we can test
12208      # for unknown variables in the end.
12209      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12210
12211      # Check if we try to supply an empty value
12212      if test "x$UNAME" = x; then
12213        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12214$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12216$as_echo_n "checking for UNAME... " >&6; }
12217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12218$as_echo "disabled" >&6; }
12219      else
12220        # Check if the provided tool contains a complete path.
12221        tool_specified="$UNAME"
12222        tool_basename="${tool_specified##*/}"
12223        if test "x$tool_basename" = "x$tool_specified"; then
12224          # A command without a complete path is provided, search $PATH.
12225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12226$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12227          # Extract the first word of "$tool_basename", so it can be a program name with args.
12228set dummy $tool_basename; ac_word=$2
12229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12230$as_echo_n "checking for $ac_word... " >&6; }
12231if ${ac_cv_path_UNAME+:} false; then :
12232  $as_echo_n "(cached) " >&6
12233else
12234  case $UNAME in
12235  [\\/]* | ?:[\\/]*)
12236  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12237  ;;
12238  *)
12239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12240for as_dir in $PATH
12241do
12242  IFS=$as_save_IFS
12243  test -z "$as_dir" && as_dir=.
12244    for ac_exec_ext in '' $ac_executable_extensions; do
12245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12246    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12248    break 2
12249  fi
12250done
12251  done
12252IFS=$as_save_IFS
12253
12254  ;;
12255esac
12256fi
12257UNAME=$ac_cv_path_UNAME
12258if test -n "$UNAME"; then
12259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12260$as_echo "$UNAME" >&6; }
12261else
12262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12263$as_echo "no" >&6; }
12264fi
12265
12266
12267          if test "x$UNAME" = x; then
12268            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12269          fi
12270        else
12271          # Otherwise we believe it is a complete path. Use it as it is.
12272          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12273$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12274          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12275$as_echo_n "checking for UNAME... " >&6; }
12276          if test ! -x "$tool_specified"; then
12277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12278$as_echo "not found" >&6; }
12279            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12280          fi
12281          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12282$as_echo "$tool_specified" >&6; }
12283        fi
12284      fi
12285    fi
12286
12287  fi
12288
12289
12290
12291  if test "x$UNAME" = x; then
12292    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12293  fi
12294
12295
12296
12297
12298
12299  # Publish this variable in the help.
12300
12301
12302  if [ -z "${UNIQ+x}" ]; then
12303    # The variable is not set by user, try to locate tool using the code snippet
12304    for ac_prog in uniq
12305do
12306  # Extract the first word of "$ac_prog", so it can be a program name with args.
12307set dummy $ac_prog; ac_word=$2
12308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12309$as_echo_n "checking for $ac_word... " >&6; }
12310if ${ac_cv_path_UNIQ+:} false; then :
12311  $as_echo_n "(cached) " >&6
12312else
12313  case $UNIQ in
12314  [\\/]* | ?:[\\/]*)
12315  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12316  ;;
12317  *)
12318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12319for as_dir in $PATH
12320do
12321  IFS=$as_save_IFS
12322  test -z "$as_dir" && as_dir=.
12323    for ac_exec_ext in '' $ac_executable_extensions; do
12324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12325    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12327    break 2
12328  fi
12329done
12330  done
12331IFS=$as_save_IFS
12332
12333  ;;
12334esac
12335fi
12336UNIQ=$ac_cv_path_UNIQ
12337if test -n "$UNIQ"; then
12338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12339$as_echo "$UNIQ" >&6; }
12340else
12341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12342$as_echo "no" >&6; }
12343fi
12344
12345
12346  test -n "$UNIQ" && break
12347done
12348
12349  else
12350    # The variable is set, but is it from the command line or the environment?
12351
12352    # Try to remove the string !UNIQ! from our list.
12353    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12354    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12355      # If it failed, the variable was not from the command line. Ignore it,
12356      # but warn the user (except for BASH, which is always set by the calling BASH).
12357      if test "xUNIQ" != xBASH; then
12358        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12359$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12360      fi
12361      # Try to locate tool using the code snippet
12362      for ac_prog in uniq
12363do
12364  # Extract the first word of "$ac_prog", so it can be a program name with args.
12365set dummy $ac_prog; ac_word=$2
12366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12367$as_echo_n "checking for $ac_word... " >&6; }
12368if ${ac_cv_path_UNIQ+:} false; then :
12369  $as_echo_n "(cached) " >&6
12370else
12371  case $UNIQ in
12372  [\\/]* | ?:[\\/]*)
12373  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12374  ;;
12375  *)
12376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12377for as_dir in $PATH
12378do
12379  IFS=$as_save_IFS
12380  test -z "$as_dir" && as_dir=.
12381    for ac_exec_ext in '' $ac_executable_extensions; do
12382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12383    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12385    break 2
12386  fi
12387done
12388  done
12389IFS=$as_save_IFS
12390
12391  ;;
12392esac
12393fi
12394UNIQ=$ac_cv_path_UNIQ
12395if test -n "$UNIQ"; then
12396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12397$as_echo "$UNIQ" >&6; }
12398else
12399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12400$as_echo "no" >&6; }
12401fi
12402
12403
12404  test -n "$UNIQ" && break
12405done
12406
12407    else
12408      # If it succeeded, then it was overridden by the user. We will use it
12409      # for the tool.
12410
12411      # First remove it from the list of overridden variables, so we can test
12412      # for unknown variables in the end.
12413      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12414
12415      # Check if we try to supply an empty value
12416      if test "x$UNIQ" = x; then
12417        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12418$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12420$as_echo_n "checking for UNIQ... " >&6; }
12421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12422$as_echo "disabled" >&6; }
12423      else
12424        # Check if the provided tool contains a complete path.
12425        tool_specified="$UNIQ"
12426        tool_basename="${tool_specified##*/}"
12427        if test "x$tool_basename" = "x$tool_specified"; then
12428          # A command without a complete path is provided, search $PATH.
12429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12430$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12431          # Extract the first word of "$tool_basename", so it can be a program name with args.
12432set dummy $tool_basename; ac_word=$2
12433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12434$as_echo_n "checking for $ac_word... " >&6; }
12435if ${ac_cv_path_UNIQ+:} false; then :
12436  $as_echo_n "(cached) " >&6
12437else
12438  case $UNIQ in
12439  [\\/]* | ?:[\\/]*)
12440  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12441  ;;
12442  *)
12443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12444for as_dir in $PATH
12445do
12446  IFS=$as_save_IFS
12447  test -z "$as_dir" && as_dir=.
12448    for ac_exec_ext in '' $ac_executable_extensions; do
12449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12450    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12452    break 2
12453  fi
12454done
12455  done
12456IFS=$as_save_IFS
12457
12458  ;;
12459esac
12460fi
12461UNIQ=$ac_cv_path_UNIQ
12462if test -n "$UNIQ"; then
12463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12464$as_echo "$UNIQ" >&6; }
12465else
12466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12467$as_echo "no" >&6; }
12468fi
12469
12470
12471          if test "x$UNIQ" = x; then
12472            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12473          fi
12474        else
12475          # Otherwise we believe it is a complete path. Use it as it is.
12476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12477$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12478          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12479$as_echo_n "checking for UNIQ... " >&6; }
12480          if test ! -x "$tool_specified"; then
12481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12482$as_echo "not found" >&6; }
12483            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12484          fi
12485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12486$as_echo "$tool_specified" >&6; }
12487        fi
12488      fi
12489    fi
12490
12491  fi
12492
12493
12494
12495  if test "x$UNIQ" = x; then
12496    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12497  fi
12498
12499
12500
12501
12502
12503  # Publish this variable in the help.
12504
12505
12506  if [ -z "${WC+x}" ]; then
12507    # The variable is not set by user, try to locate tool using the code snippet
12508    for ac_prog in wc
12509do
12510  # Extract the first word of "$ac_prog", so it can be a program name with args.
12511set dummy $ac_prog; ac_word=$2
12512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12513$as_echo_n "checking for $ac_word... " >&6; }
12514if ${ac_cv_path_WC+:} false; then :
12515  $as_echo_n "(cached) " >&6
12516else
12517  case $WC in
12518  [\\/]* | ?:[\\/]*)
12519  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12520  ;;
12521  *)
12522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12523for as_dir in $PATH
12524do
12525  IFS=$as_save_IFS
12526  test -z "$as_dir" && as_dir=.
12527    for ac_exec_ext in '' $ac_executable_extensions; do
12528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12529    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12531    break 2
12532  fi
12533done
12534  done
12535IFS=$as_save_IFS
12536
12537  ;;
12538esac
12539fi
12540WC=$ac_cv_path_WC
12541if test -n "$WC"; then
12542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12543$as_echo "$WC" >&6; }
12544else
12545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12546$as_echo "no" >&6; }
12547fi
12548
12549
12550  test -n "$WC" && break
12551done
12552
12553  else
12554    # The variable is set, but is it from the command line or the environment?
12555
12556    # Try to remove the string !WC! from our list.
12557    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12558    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12559      # If it failed, the variable was not from the command line. Ignore it,
12560      # but warn the user (except for BASH, which is always set by the calling BASH).
12561      if test "xWC" != xBASH; then
12562        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12563$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12564      fi
12565      # Try to locate tool using the code snippet
12566      for ac_prog in wc
12567do
12568  # Extract the first word of "$ac_prog", so it can be a program name with args.
12569set dummy $ac_prog; ac_word=$2
12570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12571$as_echo_n "checking for $ac_word... " >&6; }
12572if ${ac_cv_path_WC+:} false; then :
12573  $as_echo_n "(cached) " >&6
12574else
12575  case $WC in
12576  [\\/]* | ?:[\\/]*)
12577  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12578  ;;
12579  *)
12580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12581for as_dir in $PATH
12582do
12583  IFS=$as_save_IFS
12584  test -z "$as_dir" && as_dir=.
12585    for ac_exec_ext in '' $ac_executable_extensions; do
12586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12587    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12589    break 2
12590  fi
12591done
12592  done
12593IFS=$as_save_IFS
12594
12595  ;;
12596esac
12597fi
12598WC=$ac_cv_path_WC
12599if test -n "$WC"; then
12600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12601$as_echo "$WC" >&6; }
12602else
12603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12604$as_echo "no" >&6; }
12605fi
12606
12607
12608  test -n "$WC" && break
12609done
12610
12611    else
12612      # If it succeeded, then it was overridden by the user. We will use it
12613      # for the tool.
12614
12615      # First remove it from the list of overridden variables, so we can test
12616      # for unknown variables in the end.
12617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12618
12619      # Check if we try to supply an empty value
12620      if test "x$WC" = x; then
12621        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12622$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12624$as_echo_n "checking for WC... " >&6; }
12625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12626$as_echo "disabled" >&6; }
12627      else
12628        # Check if the provided tool contains a complete path.
12629        tool_specified="$WC"
12630        tool_basename="${tool_specified##*/}"
12631        if test "x$tool_basename" = "x$tool_specified"; then
12632          # A command without a complete path is provided, search $PATH.
12633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12634$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12635          # Extract the first word of "$tool_basename", so it can be a program name with args.
12636set dummy $tool_basename; ac_word=$2
12637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12638$as_echo_n "checking for $ac_word... " >&6; }
12639if ${ac_cv_path_WC+:} false; then :
12640  $as_echo_n "(cached) " >&6
12641else
12642  case $WC in
12643  [\\/]* | ?:[\\/]*)
12644  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12645  ;;
12646  *)
12647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12648for as_dir in $PATH
12649do
12650  IFS=$as_save_IFS
12651  test -z "$as_dir" && as_dir=.
12652    for ac_exec_ext in '' $ac_executable_extensions; do
12653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12654    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12656    break 2
12657  fi
12658done
12659  done
12660IFS=$as_save_IFS
12661
12662  ;;
12663esac
12664fi
12665WC=$ac_cv_path_WC
12666if test -n "$WC"; then
12667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12668$as_echo "$WC" >&6; }
12669else
12670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12671$as_echo "no" >&6; }
12672fi
12673
12674
12675          if test "x$WC" = x; then
12676            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12677          fi
12678        else
12679          # Otherwise we believe it is a complete path. Use it as it is.
12680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12681$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12682          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12683$as_echo_n "checking for WC... " >&6; }
12684          if test ! -x "$tool_specified"; then
12685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12686$as_echo "not found" >&6; }
12687            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12688          fi
12689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12690$as_echo "$tool_specified" >&6; }
12691        fi
12692      fi
12693    fi
12694
12695  fi
12696
12697
12698
12699  if test "x$WC" = x; then
12700    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12701  fi
12702
12703
12704
12705
12706
12707  # Publish this variable in the help.
12708
12709
12710  if [ -z "${WHICH+x}" ]; then
12711    # The variable is not set by user, try to locate tool using the code snippet
12712    for ac_prog in which
12713do
12714  # Extract the first word of "$ac_prog", so it can be a program name with args.
12715set dummy $ac_prog; ac_word=$2
12716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12717$as_echo_n "checking for $ac_word... " >&6; }
12718if ${ac_cv_path_WHICH+:} false; then :
12719  $as_echo_n "(cached) " >&6
12720else
12721  case $WHICH in
12722  [\\/]* | ?:[\\/]*)
12723  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12724  ;;
12725  *)
12726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12727for as_dir in $PATH
12728do
12729  IFS=$as_save_IFS
12730  test -z "$as_dir" && as_dir=.
12731    for ac_exec_ext in '' $ac_executable_extensions; do
12732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12733    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12735    break 2
12736  fi
12737done
12738  done
12739IFS=$as_save_IFS
12740
12741  ;;
12742esac
12743fi
12744WHICH=$ac_cv_path_WHICH
12745if test -n "$WHICH"; then
12746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12747$as_echo "$WHICH" >&6; }
12748else
12749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12750$as_echo "no" >&6; }
12751fi
12752
12753
12754  test -n "$WHICH" && break
12755done
12756
12757  else
12758    # The variable is set, but is it from the command line or the environment?
12759
12760    # Try to remove the string !WHICH! from our list.
12761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12763      # If it failed, the variable was not from the command line. Ignore it,
12764      # but warn the user (except for BASH, which is always set by the calling BASH).
12765      if test "xWHICH" != xBASH; then
12766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12767$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12768      fi
12769      # Try to locate tool using the code snippet
12770      for ac_prog in which
12771do
12772  # Extract the first word of "$ac_prog", so it can be a program name with args.
12773set dummy $ac_prog; ac_word=$2
12774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12775$as_echo_n "checking for $ac_word... " >&6; }
12776if ${ac_cv_path_WHICH+:} false; then :
12777  $as_echo_n "(cached) " >&6
12778else
12779  case $WHICH in
12780  [\\/]* | ?:[\\/]*)
12781  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12782  ;;
12783  *)
12784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12785for as_dir in $PATH
12786do
12787  IFS=$as_save_IFS
12788  test -z "$as_dir" && as_dir=.
12789    for ac_exec_ext in '' $ac_executable_extensions; do
12790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12791    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12793    break 2
12794  fi
12795done
12796  done
12797IFS=$as_save_IFS
12798
12799  ;;
12800esac
12801fi
12802WHICH=$ac_cv_path_WHICH
12803if test -n "$WHICH"; then
12804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12805$as_echo "$WHICH" >&6; }
12806else
12807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12808$as_echo "no" >&6; }
12809fi
12810
12811
12812  test -n "$WHICH" && break
12813done
12814
12815    else
12816      # If it succeeded, then it was overridden by the user. We will use it
12817      # for the tool.
12818
12819      # First remove it from the list of overridden variables, so we can test
12820      # for unknown variables in the end.
12821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12822
12823      # Check if we try to supply an empty value
12824      if test "x$WHICH" = x; then
12825        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12826$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12827        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12828$as_echo_n "checking for WHICH... " >&6; }
12829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12830$as_echo "disabled" >&6; }
12831      else
12832        # Check if the provided tool contains a complete path.
12833        tool_specified="$WHICH"
12834        tool_basename="${tool_specified##*/}"
12835        if test "x$tool_basename" = "x$tool_specified"; then
12836          # A command without a complete path is provided, search $PATH.
12837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12838$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12839          # Extract the first word of "$tool_basename", so it can be a program name with args.
12840set dummy $tool_basename; ac_word=$2
12841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12842$as_echo_n "checking for $ac_word... " >&6; }
12843if ${ac_cv_path_WHICH+:} false; then :
12844  $as_echo_n "(cached) " >&6
12845else
12846  case $WHICH in
12847  [\\/]* | ?:[\\/]*)
12848  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12849  ;;
12850  *)
12851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12852for as_dir in $PATH
12853do
12854  IFS=$as_save_IFS
12855  test -z "$as_dir" && as_dir=.
12856    for ac_exec_ext in '' $ac_executable_extensions; do
12857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12858    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12860    break 2
12861  fi
12862done
12863  done
12864IFS=$as_save_IFS
12865
12866  ;;
12867esac
12868fi
12869WHICH=$ac_cv_path_WHICH
12870if test -n "$WHICH"; then
12871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12872$as_echo "$WHICH" >&6; }
12873else
12874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12875$as_echo "no" >&6; }
12876fi
12877
12878
12879          if test "x$WHICH" = x; then
12880            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12881          fi
12882        else
12883          # Otherwise we believe it is a complete path. Use it as it is.
12884          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12885$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12886          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12887$as_echo_n "checking for WHICH... " >&6; }
12888          if test ! -x "$tool_specified"; then
12889            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12890$as_echo "not found" >&6; }
12891            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12892          fi
12893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12894$as_echo "$tool_specified" >&6; }
12895        fi
12896      fi
12897    fi
12898
12899  fi
12900
12901
12902
12903  if test "x$WHICH" = x; then
12904    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12905  fi
12906
12907
12908
12909
12910
12911  # Publish this variable in the help.
12912
12913
12914  if [ -z "${XARGS+x}" ]; then
12915    # The variable is not set by user, try to locate tool using the code snippet
12916    for ac_prog in xargs
12917do
12918  # Extract the first word of "$ac_prog", so it can be a program name with args.
12919set dummy $ac_prog; ac_word=$2
12920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12921$as_echo_n "checking for $ac_word... " >&6; }
12922if ${ac_cv_path_XARGS+:} false; then :
12923  $as_echo_n "(cached) " >&6
12924else
12925  case $XARGS in
12926  [\\/]* | ?:[\\/]*)
12927  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12928  ;;
12929  *)
12930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12931for as_dir in $PATH
12932do
12933  IFS=$as_save_IFS
12934  test -z "$as_dir" && as_dir=.
12935    for ac_exec_ext in '' $ac_executable_extensions; do
12936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12937    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12939    break 2
12940  fi
12941done
12942  done
12943IFS=$as_save_IFS
12944
12945  ;;
12946esac
12947fi
12948XARGS=$ac_cv_path_XARGS
12949if test -n "$XARGS"; then
12950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12951$as_echo "$XARGS" >&6; }
12952else
12953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12954$as_echo "no" >&6; }
12955fi
12956
12957
12958  test -n "$XARGS" && break
12959done
12960
12961  else
12962    # The variable is set, but is it from the command line or the environment?
12963
12964    # Try to remove the string !XARGS! from our list.
12965    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12966    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12967      # If it failed, the variable was not from the command line. Ignore it,
12968      # but warn the user (except for BASH, which is always set by the calling BASH).
12969      if test "xXARGS" != xBASH; then
12970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12971$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12972      fi
12973      # Try to locate tool using the code snippet
12974      for ac_prog in xargs
12975do
12976  # Extract the first word of "$ac_prog", so it can be a program name with args.
12977set dummy $ac_prog; ac_word=$2
12978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12979$as_echo_n "checking for $ac_word... " >&6; }
12980if ${ac_cv_path_XARGS+:} false; then :
12981  $as_echo_n "(cached) " >&6
12982else
12983  case $XARGS in
12984  [\\/]* | ?:[\\/]*)
12985  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12986  ;;
12987  *)
12988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12989for as_dir in $PATH
12990do
12991  IFS=$as_save_IFS
12992  test -z "$as_dir" && as_dir=.
12993    for ac_exec_ext in '' $ac_executable_extensions; do
12994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12995    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12997    break 2
12998  fi
12999done
13000  done
13001IFS=$as_save_IFS
13002
13003  ;;
13004esac
13005fi
13006XARGS=$ac_cv_path_XARGS
13007if test -n "$XARGS"; then
13008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13009$as_echo "$XARGS" >&6; }
13010else
13011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13012$as_echo "no" >&6; }
13013fi
13014
13015
13016  test -n "$XARGS" && break
13017done
13018
13019    else
13020      # If it succeeded, then it was overridden by the user. We will use it
13021      # for the tool.
13022
13023      # First remove it from the list of overridden variables, so we can test
13024      # for unknown variables in the end.
13025      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13026
13027      # Check if we try to supply an empty value
13028      if test "x$XARGS" = x; then
13029        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13030$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13032$as_echo_n "checking for XARGS... " >&6; }
13033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13034$as_echo "disabled" >&6; }
13035      else
13036        # Check if the provided tool contains a complete path.
13037        tool_specified="$XARGS"
13038        tool_basename="${tool_specified##*/}"
13039        if test "x$tool_basename" = "x$tool_specified"; then
13040          # A command without a complete path is provided, search $PATH.
13041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13042$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13043          # Extract the first word of "$tool_basename", so it can be a program name with args.
13044set dummy $tool_basename; ac_word=$2
13045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13046$as_echo_n "checking for $ac_word... " >&6; }
13047if ${ac_cv_path_XARGS+:} false; then :
13048  $as_echo_n "(cached) " >&6
13049else
13050  case $XARGS in
13051  [\\/]* | ?:[\\/]*)
13052  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13053  ;;
13054  *)
13055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13056for as_dir in $PATH
13057do
13058  IFS=$as_save_IFS
13059  test -z "$as_dir" && as_dir=.
13060    for ac_exec_ext in '' $ac_executable_extensions; do
13061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13062    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13064    break 2
13065  fi
13066done
13067  done
13068IFS=$as_save_IFS
13069
13070  ;;
13071esac
13072fi
13073XARGS=$ac_cv_path_XARGS
13074if test -n "$XARGS"; then
13075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13076$as_echo "$XARGS" >&6; }
13077else
13078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13079$as_echo "no" >&6; }
13080fi
13081
13082
13083          if test "x$XARGS" = x; then
13084            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13085          fi
13086        else
13087          # Otherwise we believe it is a complete path. Use it as it is.
13088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13089$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13090          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13091$as_echo_n "checking for XARGS... " >&6; }
13092          if test ! -x "$tool_specified"; then
13093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13094$as_echo "not found" >&6; }
13095            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13096          fi
13097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13098$as_echo "$tool_specified" >&6; }
13099        fi
13100      fi
13101    fi
13102
13103  fi
13104
13105
13106
13107  if test "x$XARGS" = x; then
13108    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13109  fi
13110
13111
13112
13113  # Then required tools that require some special treatment.
13114
13115
13116  # Publish this variable in the help.
13117
13118
13119  if [ -z "${AWK+x}" ]; then
13120    # The variable is not set by user, try to locate tool using the code snippet
13121    for ac_prog in gawk mawk nawk awk
13122do
13123  # Extract the first word of "$ac_prog", so it can be a program name with args.
13124set dummy $ac_prog; ac_word=$2
13125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13126$as_echo_n "checking for $ac_word... " >&6; }
13127if ${ac_cv_prog_AWK+:} false; then :
13128  $as_echo_n "(cached) " >&6
13129else
13130  if test -n "$AWK"; then
13131  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13132else
13133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13134for as_dir in $PATH
13135do
13136  IFS=$as_save_IFS
13137  test -z "$as_dir" && as_dir=.
13138    for ac_exec_ext in '' $ac_executable_extensions; do
13139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13140    ac_cv_prog_AWK="$ac_prog"
13141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13142    break 2
13143  fi
13144done
13145  done
13146IFS=$as_save_IFS
13147
13148fi
13149fi
13150AWK=$ac_cv_prog_AWK
13151if test -n "$AWK"; then
13152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13153$as_echo "$AWK" >&6; }
13154else
13155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13156$as_echo "no" >&6; }
13157fi
13158
13159
13160  test -n "$AWK" && break
13161done
13162
13163  else
13164    # The variable is set, but is it from the command line or the environment?
13165
13166    # Try to remove the string !AWK! from our list.
13167    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13168    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13169      # If it failed, the variable was not from the command line. Ignore it,
13170      # but warn the user (except for BASH, which is always set by the calling BASH).
13171      if test "xAWK" != xBASH; then
13172        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13173$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13174      fi
13175      # Try to locate tool using the code snippet
13176      for ac_prog in gawk mawk nawk awk
13177do
13178  # Extract the first word of "$ac_prog", so it can be a program name with args.
13179set dummy $ac_prog; ac_word=$2
13180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13181$as_echo_n "checking for $ac_word... " >&6; }
13182if ${ac_cv_prog_AWK+:} false; then :
13183  $as_echo_n "(cached) " >&6
13184else
13185  if test -n "$AWK"; then
13186  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13187else
13188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13189for as_dir in $PATH
13190do
13191  IFS=$as_save_IFS
13192  test -z "$as_dir" && as_dir=.
13193    for ac_exec_ext in '' $ac_executable_extensions; do
13194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13195    ac_cv_prog_AWK="$ac_prog"
13196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13197    break 2
13198  fi
13199done
13200  done
13201IFS=$as_save_IFS
13202
13203fi
13204fi
13205AWK=$ac_cv_prog_AWK
13206if test -n "$AWK"; then
13207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13208$as_echo "$AWK" >&6; }
13209else
13210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13211$as_echo "no" >&6; }
13212fi
13213
13214
13215  test -n "$AWK" && break
13216done
13217
13218    else
13219      # If it succeeded, then it was overridden by the user. We will use it
13220      # for the tool.
13221
13222      # First remove it from the list of overridden variables, so we can test
13223      # for unknown variables in the end.
13224      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13225
13226      # Check if we try to supply an empty value
13227      if test "x$AWK" = x; then
13228        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13229$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13231$as_echo_n "checking for AWK... " >&6; }
13232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13233$as_echo "disabled" >&6; }
13234      else
13235        # Check if the provided tool contains a complete path.
13236        tool_specified="$AWK"
13237        tool_basename="${tool_specified##*/}"
13238        if test "x$tool_basename" = "x$tool_specified"; then
13239          # A command without a complete path is provided, search $PATH.
13240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13241$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13242          # Extract the first word of "$tool_basename", so it can be a program name with args.
13243set dummy $tool_basename; ac_word=$2
13244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13245$as_echo_n "checking for $ac_word... " >&6; }
13246if ${ac_cv_path_AWK+:} false; then :
13247  $as_echo_n "(cached) " >&6
13248else
13249  case $AWK in
13250  [\\/]* | ?:[\\/]*)
13251  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13252  ;;
13253  *)
13254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13255for as_dir in $PATH
13256do
13257  IFS=$as_save_IFS
13258  test -z "$as_dir" && as_dir=.
13259    for ac_exec_ext in '' $ac_executable_extensions; do
13260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13261    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13263    break 2
13264  fi
13265done
13266  done
13267IFS=$as_save_IFS
13268
13269  ;;
13270esac
13271fi
13272AWK=$ac_cv_path_AWK
13273if test -n "$AWK"; then
13274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13275$as_echo "$AWK" >&6; }
13276else
13277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13278$as_echo "no" >&6; }
13279fi
13280
13281
13282          if test "x$AWK" = x; then
13283            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13284          fi
13285        else
13286          # Otherwise we believe it is a complete path. Use it as it is.
13287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13288$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13289          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13290$as_echo_n "checking for AWK... " >&6; }
13291          if test ! -x "$tool_specified"; then
13292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13293$as_echo "not found" >&6; }
13294            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13295          fi
13296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13297$as_echo "$tool_specified" >&6; }
13298        fi
13299      fi
13300    fi
13301
13302  fi
13303
13304
13305  if test "x$AWK" = x; then
13306    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13307  fi
13308
13309
13310
13311
13312  # Publish this variable in the help.
13313
13314
13315  if [ -z "${GREP+x}" ]; then
13316    # The variable is not set by user, try to locate tool using the code snippet
13317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13318$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13319if ${ac_cv_path_GREP+:} false; then :
13320  $as_echo_n "(cached) " >&6
13321else
13322  if test -z "$GREP"; then
13323  ac_path_GREP_found=false
13324  # Loop through the user's path and test for each of PROGNAME-LIST
13325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13326for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13327do
13328  IFS=$as_save_IFS
13329  test -z "$as_dir" && as_dir=.
13330    for ac_prog in grep ggrep; do
13331    for ac_exec_ext in '' $ac_executable_extensions; do
13332      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13333      as_fn_executable_p "$ac_path_GREP" || continue
13334# Check for GNU ac_path_GREP and select it if it is found.
13335  # Check for GNU $ac_path_GREP
13336case `"$ac_path_GREP" --version 2>&1` in
13337*GNU*)
13338  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13339*)
13340  ac_count=0
13341  $as_echo_n 0123456789 >"conftest.in"
13342  while :
13343  do
13344    cat "conftest.in" "conftest.in" >"conftest.tmp"
13345    mv "conftest.tmp" "conftest.in"
13346    cp "conftest.in" "conftest.nl"
13347    $as_echo 'GREP' >> "conftest.nl"
13348    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13349    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13350    as_fn_arith $ac_count + 1 && ac_count=$as_val
13351    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13352      # Best one so far, save it but keep looking for a better one
13353      ac_cv_path_GREP="$ac_path_GREP"
13354      ac_path_GREP_max=$ac_count
13355    fi
13356    # 10*(2^10) chars as input seems more than enough
13357    test $ac_count -gt 10 && break
13358  done
13359  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13360esac
13361
13362      $ac_path_GREP_found && break 3
13363    done
13364  done
13365  done
13366IFS=$as_save_IFS
13367  if test -z "$ac_cv_path_GREP"; then
13368    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13369  fi
13370else
13371  ac_cv_path_GREP=$GREP
13372fi
13373
13374fi
13375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13376$as_echo "$ac_cv_path_GREP" >&6; }
13377 GREP="$ac_cv_path_GREP"
13378
13379
13380  else
13381    # The variable is set, but is it from the command line or the environment?
13382
13383    # Try to remove the string !GREP! from our list.
13384    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13385    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13386      # If it failed, the variable was not from the command line. Ignore it,
13387      # but warn the user (except for BASH, which is always set by the calling BASH).
13388      if test "xGREP" != xBASH; then
13389        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13390$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13391      fi
13392      # Try to locate tool using the code snippet
13393      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13394$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13395if ${ac_cv_path_GREP+:} false; then :
13396  $as_echo_n "(cached) " >&6
13397else
13398  if test -z "$GREP"; then
13399  ac_path_GREP_found=false
13400  # Loop through the user's path and test for each of PROGNAME-LIST
13401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13402for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13403do
13404  IFS=$as_save_IFS
13405  test -z "$as_dir" && as_dir=.
13406    for ac_prog in grep ggrep; do
13407    for ac_exec_ext in '' $ac_executable_extensions; do
13408      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13409      as_fn_executable_p "$ac_path_GREP" || continue
13410# Check for GNU ac_path_GREP and select it if it is found.
13411  # Check for GNU $ac_path_GREP
13412case `"$ac_path_GREP" --version 2>&1` in
13413*GNU*)
13414  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13415*)
13416  ac_count=0
13417  $as_echo_n 0123456789 >"conftest.in"
13418  while :
13419  do
13420    cat "conftest.in" "conftest.in" >"conftest.tmp"
13421    mv "conftest.tmp" "conftest.in"
13422    cp "conftest.in" "conftest.nl"
13423    $as_echo 'GREP' >> "conftest.nl"
13424    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13425    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13426    as_fn_arith $ac_count + 1 && ac_count=$as_val
13427    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13428      # Best one so far, save it but keep looking for a better one
13429      ac_cv_path_GREP="$ac_path_GREP"
13430      ac_path_GREP_max=$ac_count
13431    fi
13432    # 10*(2^10) chars as input seems more than enough
13433    test $ac_count -gt 10 && break
13434  done
13435  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13436esac
13437
13438      $ac_path_GREP_found && break 3
13439    done
13440  done
13441  done
13442IFS=$as_save_IFS
13443  if test -z "$ac_cv_path_GREP"; then
13444    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13445  fi
13446else
13447  ac_cv_path_GREP=$GREP
13448fi
13449
13450fi
13451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13452$as_echo "$ac_cv_path_GREP" >&6; }
13453 GREP="$ac_cv_path_GREP"
13454
13455
13456    else
13457      # If it succeeded, then it was overridden by the user. We will use it
13458      # for the tool.
13459
13460      # First remove it from the list of overridden variables, so we can test
13461      # for unknown variables in the end.
13462      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13463
13464      # Check if we try to supply an empty value
13465      if test "x$GREP" = x; then
13466        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13467$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13468        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13469$as_echo_n "checking for GREP... " >&6; }
13470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13471$as_echo "disabled" >&6; }
13472      else
13473        # Check if the provided tool contains a complete path.
13474        tool_specified="$GREP"
13475        tool_basename="${tool_specified##*/}"
13476        if test "x$tool_basename" = "x$tool_specified"; then
13477          # A command without a complete path is provided, search $PATH.
13478          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13479$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13480          # Extract the first word of "$tool_basename", so it can be a program name with args.
13481set dummy $tool_basename; ac_word=$2
13482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13483$as_echo_n "checking for $ac_word... " >&6; }
13484if ${ac_cv_path_GREP+:} false; then :
13485  $as_echo_n "(cached) " >&6
13486else
13487  case $GREP in
13488  [\\/]* | ?:[\\/]*)
13489  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13490  ;;
13491  *)
13492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13493for as_dir in $PATH
13494do
13495  IFS=$as_save_IFS
13496  test -z "$as_dir" && as_dir=.
13497    for ac_exec_ext in '' $ac_executable_extensions; do
13498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13499    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13501    break 2
13502  fi
13503done
13504  done
13505IFS=$as_save_IFS
13506
13507  ;;
13508esac
13509fi
13510GREP=$ac_cv_path_GREP
13511if test -n "$GREP"; then
13512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13513$as_echo "$GREP" >&6; }
13514else
13515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13516$as_echo "no" >&6; }
13517fi
13518
13519
13520          if test "x$GREP" = x; then
13521            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13522          fi
13523        else
13524          # Otherwise we believe it is a complete path. Use it as it is.
13525          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13526$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13527          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13528$as_echo_n "checking for GREP... " >&6; }
13529          if test ! -x "$tool_specified"; then
13530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13531$as_echo "not found" >&6; }
13532            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13533          fi
13534          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13535$as_echo "$tool_specified" >&6; }
13536        fi
13537      fi
13538    fi
13539
13540  fi
13541
13542
13543  if test "x$GREP" = x; then
13544    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13545  fi
13546
13547
13548
13549
13550  # Publish this variable in the help.
13551
13552
13553  if [ -z "${EGREP+x}" ]; then
13554    # The variable is not set by user, try to locate tool using the code snippet
13555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13556$as_echo_n "checking for egrep... " >&6; }
13557if ${ac_cv_path_EGREP+:} false; then :
13558  $as_echo_n "(cached) " >&6
13559else
13560  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13561   then ac_cv_path_EGREP="$GREP -E"
13562   else
13563     if test -z "$EGREP"; then
13564  ac_path_EGREP_found=false
13565  # Loop through the user's path and test for each of PROGNAME-LIST
13566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13567for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13568do
13569  IFS=$as_save_IFS
13570  test -z "$as_dir" && as_dir=.
13571    for ac_prog in egrep; do
13572    for ac_exec_ext in '' $ac_executable_extensions; do
13573      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13574      as_fn_executable_p "$ac_path_EGREP" || continue
13575# Check for GNU ac_path_EGREP and select it if it is found.
13576  # Check for GNU $ac_path_EGREP
13577case `"$ac_path_EGREP" --version 2>&1` in
13578*GNU*)
13579  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13580*)
13581  ac_count=0
13582  $as_echo_n 0123456789 >"conftest.in"
13583  while :
13584  do
13585    cat "conftest.in" "conftest.in" >"conftest.tmp"
13586    mv "conftest.tmp" "conftest.in"
13587    cp "conftest.in" "conftest.nl"
13588    $as_echo 'EGREP' >> "conftest.nl"
13589    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13590    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13591    as_fn_arith $ac_count + 1 && ac_count=$as_val
13592    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13593      # Best one so far, save it but keep looking for a better one
13594      ac_cv_path_EGREP="$ac_path_EGREP"
13595      ac_path_EGREP_max=$ac_count
13596    fi
13597    # 10*(2^10) chars as input seems more than enough
13598    test $ac_count -gt 10 && break
13599  done
13600  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13601esac
13602
13603      $ac_path_EGREP_found && break 3
13604    done
13605  done
13606  done
13607IFS=$as_save_IFS
13608  if test -z "$ac_cv_path_EGREP"; then
13609    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13610  fi
13611else
13612  ac_cv_path_EGREP=$EGREP
13613fi
13614
13615   fi
13616fi
13617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13618$as_echo "$ac_cv_path_EGREP" >&6; }
13619 EGREP="$ac_cv_path_EGREP"
13620
13621
13622  else
13623    # The variable is set, but is it from the command line or the environment?
13624
13625    # Try to remove the string !EGREP! from our list.
13626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13628      # If it failed, the variable was not from the command line. Ignore it,
13629      # but warn the user (except for BASH, which is always set by the calling BASH).
13630      if test "xEGREP" != xBASH; then
13631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13632$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13633      fi
13634      # Try to locate tool using the code snippet
13635      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13636$as_echo_n "checking for egrep... " >&6; }
13637if ${ac_cv_path_EGREP+:} false; then :
13638  $as_echo_n "(cached) " >&6
13639else
13640  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13641   then ac_cv_path_EGREP="$GREP -E"
13642   else
13643     if test -z "$EGREP"; then
13644  ac_path_EGREP_found=false
13645  # Loop through the user's path and test for each of PROGNAME-LIST
13646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13647for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13648do
13649  IFS=$as_save_IFS
13650  test -z "$as_dir" && as_dir=.
13651    for ac_prog in egrep; do
13652    for ac_exec_ext in '' $ac_executable_extensions; do
13653      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13654      as_fn_executable_p "$ac_path_EGREP" || continue
13655# Check for GNU ac_path_EGREP and select it if it is found.
13656  # Check for GNU $ac_path_EGREP
13657case `"$ac_path_EGREP" --version 2>&1` in
13658*GNU*)
13659  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13660*)
13661  ac_count=0
13662  $as_echo_n 0123456789 >"conftest.in"
13663  while :
13664  do
13665    cat "conftest.in" "conftest.in" >"conftest.tmp"
13666    mv "conftest.tmp" "conftest.in"
13667    cp "conftest.in" "conftest.nl"
13668    $as_echo 'EGREP' >> "conftest.nl"
13669    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13670    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13671    as_fn_arith $ac_count + 1 && ac_count=$as_val
13672    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13673      # Best one so far, save it but keep looking for a better one
13674      ac_cv_path_EGREP="$ac_path_EGREP"
13675      ac_path_EGREP_max=$ac_count
13676    fi
13677    # 10*(2^10) chars as input seems more than enough
13678    test $ac_count -gt 10 && break
13679  done
13680  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13681esac
13682
13683      $ac_path_EGREP_found && break 3
13684    done
13685  done
13686  done
13687IFS=$as_save_IFS
13688  if test -z "$ac_cv_path_EGREP"; then
13689    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13690  fi
13691else
13692  ac_cv_path_EGREP=$EGREP
13693fi
13694
13695   fi
13696fi
13697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13698$as_echo "$ac_cv_path_EGREP" >&6; }
13699 EGREP="$ac_cv_path_EGREP"
13700
13701
13702    else
13703      # If it succeeded, then it was overridden by the user. We will use it
13704      # for the tool.
13705
13706      # First remove it from the list of overridden variables, so we can test
13707      # for unknown variables in the end.
13708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13709
13710      # Check if we try to supply an empty value
13711      if test "x$EGREP" = x; then
13712        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13713$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13715$as_echo_n "checking for EGREP... " >&6; }
13716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13717$as_echo "disabled" >&6; }
13718      else
13719        # Check if the provided tool contains a complete path.
13720        tool_specified="$EGREP"
13721        tool_basename="${tool_specified##*/}"
13722        if test "x$tool_basename" = "x$tool_specified"; then
13723          # A command without a complete path is provided, search $PATH.
13724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13725$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13726          # Extract the first word of "$tool_basename", so it can be a program name with args.
13727set dummy $tool_basename; ac_word=$2
13728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13729$as_echo_n "checking for $ac_word... " >&6; }
13730if ${ac_cv_path_EGREP+:} false; then :
13731  $as_echo_n "(cached) " >&6
13732else
13733  case $EGREP in
13734  [\\/]* | ?:[\\/]*)
13735  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13736  ;;
13737  *)
13738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13739for as_dir in $PATH
13740do
13741  IFS=$as_save_IFS
13742  test -z "$as_dir" && as_dir=.
13743    for ac_exec_ext in '' $ac_executable_extensions; do
13744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13745    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13747    break 2
13748  fi
13749done
13750  done
13751IFS=$as_save_IFS
13752
13753  ;;
13754esac
13755fi
13756EGREP=$ac_cv_path_EGREP
13757if test -n "$EGREP"; then
13758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13759$as_echo "$EGREP" >&6; }
13760else
13761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13762$as_echo "no" >&6; }
13763fi
13764
13765
13766          if test "x$EGREP" = x; then
13767            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13768          fi
13769        else
13770          # Otherwise we believe it is a complete path. Use it as it is.
13771          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13772$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13773          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13774$as_echo_n "checking for EGREP... " >&6; }
13775          if test ! -x "$tool_specified"; then
13776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13777$as_echo "not found" >&6; }
13778            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13779          fi
13780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13781$as_echo "$tool_specified" >&6; }
13782        fi
13783      fi
13784    fi
13785
13786  fi
13787
13788
13789  if test "x$EGREP" = x; then
13790    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13791  fi
13792
13793
13794
13795
13796  # Publish this variable in the help.
13797
13798
13799  if [ -z "${FGREP+x}" ]; then
13800    # The variable is not set by user, try to locate tool using the code snippet
13801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13802$as_echo_n "checking for fgrep... " >&6; }
13803if ${ac_cv_path_FGREP+:} false; then :
13804  $as_echo_n "(cached) " >&6
13805else
13806  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13807   then ac_cv_path_FGREP="$GREP -F"
13808   else
13809     if test -z "$FGREP"; then
13810  ac_path_FGREP_found=false
13811  # Loop through the user's path and test for each of PROGNAME-LIST
13812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13813for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13814do
13815  IFS=$as_save_IFS
13816  test -z "$as_dir" && as_dir=.
13817    for ac_prog in fgrep; do
13818    for ac_exec_ext in '' $ac_executable_extensions; do
13819      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13820      as_fn_executable_p "$ac_path_FGREP" || continue
13821# Check for GNU ac_path_FGREP and select it if it is found.
13822  # Check for GNU $ac_path_FGREP
13823case `"$ac_path_FGREP" --version 2>&1` in
13824*GNU*)
13825  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13826*)
13827  ac_count=0
13828  $as_echo_n 0123456789 >"conftest.in"
13829  while :
13830  do
13831    cat "conftest.in" "conftest.in" >"conftest.tmp"
13832    mv "conftest.tmp" "conftest.in"
13833    cp "conftest.in" "conftest.nl"
13834    $as_echo 'FGREP' >> "conftest.nl"
13835    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13836    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13837    as_fn_arith $ac_count + 1 && ac_count=$as_val
13838    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13839      # Best one so far, save it but keep looking for a better one
13840      ac_cv_path_FGREP="$ac_path_FGREP"
13841      ac_path_FGREP_max=$ac_count
13842    fi
13843    # 10*(2^10) chars as input seems more than enough
13844    test $ac_count -gt 10 && break
13845  done
13846  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13847esac
13848
13849      $ac_path_FGREP_found && break 3
13850    done
13851  done
13852  done
13853IFS=$as_save_IFS
13854  if test -z "$ac_cv_path_FGREP"; then
13855    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13856  fi
13857else
13858  ac_cv_path_FGREP=$FGREP
13859fi
13860
13861   fi
13862fi
13863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13864$as_echo "$ac_cv_path_FGREP" >&6; }
13865 FGREP="$ac_cv_path_FGREP"
13866
13867
13868  else
13869    # The variable is set, but is it from the command line or the environment?
13870
13871    # Try to remove the string !FGREP! from our list.
13872    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13873    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13874      # If it failed, the variable was not from the command line. Ignore it,
13875      # but warn the user (except for BASH, which is always set by the calling BASH).
13876      if test "xFGREP" != xBASH; then
13877        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13878$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13879      fi
13880      # Try to locate tool using the code snippet
13881      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13882$as_echo_n "checking for fgrep... " >&6; }
13883if ${ac_cv_path_FGREP+:} false; then :
13884  $as_echo_n "(cached) " >&6
13885else
13886  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13887   then ac_cv_path_FGREP="$GREP -F"
13888   else
13889     if test -z "$FGREP"; then
13890  ac_path_FGREP_found=false
13891  # Loop through the user's path and test for each of PROGNAME-LIST
13892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13893for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13894do
13895  IFS=$as_save_IFS
13896  test -z "$as_dir" && as_dir=.
13897    for ac_prog in fgrep; do
13898    for ac_exec_ext in '' $ac_executable_extensions; do
13899      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13900      as_fn_executable_p "$ac_path_FGREP" || continue
13901# Check for GNU ac_path_FGREP and select it if it is found.
13902  # Check for GNU $ac_path_FGREP
13903case `"$ac_path_FGREP" --version 2>&1` in
13904*GNU*)
13905  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13906*)
13907  ac_count=0
13908  $as_echo_n 0123456789 >"conftest.in"
13909  while :
13910  do
13911    cat "conftest.in" "conftest.in" >"conftest.tmp"
13912    mv "conftest.tmp" "conftest.in"
13913    cp "conftest.in" "conftest.nl"
13914    $as_echo 'FGREP' >> "conftest.nl"
13915    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13916    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13917    as_fn_arith $ac_count + 1 && ac_count=$as_val
13918    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13919      # Best one so far, save it but keep looking for a better one
13920      ac_cv_path_FGREP="$ac_path_FGREP"
13921      ac_path_FGREP_max=$ac_count
13922    fi
13923    # 10*(2^10) chars as input seems more than enough
13924    test $ac_count -gt 10 && break
13925  done
13926  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13927esac
13928
13929      $ac_path_FGREP_found && break 3
13930    done
13931  done
13932  done
13933IFS=$as_save_IFS
13934  if test -z "$ac_cv_path_FGREP"; then
13935    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13936  fi
13937else
13938  ac_cv_path_FGREP=$FGREP
13939fi
13940
13941   fi
13942fi
13943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13944$as_echo "$ac_cv_path_FGREP" >&6; }
13945 FGREP="$ac_cv_path_FGREP"
13946
13947
13948    else
13949      # If it succeeded, then it was overridden by the user. We will use it
13950      # for the tool.
13951
13952      # First remove it from the list of overridden variables, so we can test
13953      # for unknown variables in the end.
13954      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13955
13956      # Check if we try to supply an empty value
13957      if test "x$FGREP" = x; then
13958        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13959$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13961$as_echo_n "checking for FGREP... " >&6; }
13962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13963$as_echo "disabled" >&6; }
13964      else
13965        # Check if the provided tool contains a complete path.
13966        tool_specified="$FGREP"
13967        tool_basename="${tool_specified##*/}"
13968        if test "x$tool_basename" = "x$tool_specified"; then
13969          # A command without a complete path is provided, search $PATH.
13970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13971$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13972          # Extract the first word of "$tool_basename", so it can be a program name with args.
13973set dummy $tool_basename; ac_word=$2
13974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13975$as_echo_n "checking for $ac_word... " >&6; }
13976if ${ac_cv_path_FGREP+:} false; then :
13977  $as_echo_n "(cached) " >&6
13978else
13979  case $FGREP in
13980  [\\/]* | ?:[\\/]*)
13981  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13982  ;;
13983  *)
13984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13985for as_dir in $PATH
13986do
13987  IFS=$as_save_IFS
13988  test -z "$as_dir" && as_dir=.
13989    for ac_exec_ext in '' $ac_executable_extensions; do
13990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13991    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13993    break 2
13994  fi
13995done
13996  done
13997IFS=$as_save_IFS
13998
13999  ;;
14000esac
14001fi
14002FGREP=$ac_cv_path_FGREP
14003if test -n "$FGREP"; then
14004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14005$as_echo "$FGREP" >&6; }
14006else
14007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14008$as_echo "no" >&6; }
14009fi
14010
14011
14012          if test "x$FGREP" = x; then
14013            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14014          fi
14015        else
14016          # Otherwise we believe it is a complete path. Use it as it is.
14017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14018$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14019          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14020$as_echo_n "checking for FGREP... " >&6; }
14021          if test ! -x "$tool_specified"; then
14022            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14023$as_echo "not found" >&6; }
14024            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14025          fi
14026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14027$as_echo "$tool_specified" >&6; }
14028        fi
14029      fi
14030    fi
14031
14032  fi
14033
14034
14035  if test "x$FGREP" = x; then
14036    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14037  fi
14038
14039
14040
14041
14042  # Publish this variable in the help.
14043
14044
14045  if [ -z "${SED+x}" ]; then
14046    # The variable is not set by user, try to locate tool using the code snippet
14047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14048$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14049if ${ac_cv_path_SED+:} false; then :
14050  $as_echo_n "(cached) " >&6
14051else
14052            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14053     for ac_i in 1 2 3 4 5 6 7; do
14054       ac_script="$ac_script$as_nl$ac_script"
14055     done
14056     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14057     { ac_script=; unset ac_script;}
14058     if test -z "$SED"; then
14059  ac_path_SED_found=false
14060  # Loop through the user's path and test for each of PROGNAME-LIST
14061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14062for as_dir in $PATH
14063do
14064  IFS=$as_save_IFS
14065  test -z "$as_dir" && as_dir=.
14066    for ac_prog in sed gsed; do
14067    for ac_exec_ext in '' $ac_executable_extensions; do
14068      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14069      as_fn_executable_p "$ac_path_SED" || continue
14070# Check for GNU ac_path_SED and select it if it is found.
14071  # Check for GNU $ac_path_SED
14072case `"$ac_path_SED" --version 2>&1` in
14073*GNU*)
14074  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14075*)
14076  ac_count=0
14077  $as_echo_n 0123456789 >"conftest.in"
14078  while :
14079  do
14080    cat "conftest.in" "conftest.in" >"conftest.tmp"
14081    mv "conftest.tmp" "conftest.in"
14082    cp "conftest.in" "conftest.nl"
14083    $as_echo '' >> "conftest.nl"
14084    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14085    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14086    as_fn_arith $ac_count + 1 && ac_count=$as_val
14087    if test $ac_count -gt ${ac_path_SED_max-0}; then
14088      # Best one so far, save it but keep looking for a better one
14089      ac_cv_path_SED="$ac_path_SED"
14090      ac_path_SED_max=$ac_count
14091    fi
14092    # 10*(2^10) chars as input seems more than enough
14093    test $ac_count -gt 10 && break
14094  done
14095  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14096esac
14097
14098      $ac_path_SED_found && break 3
14099    done
14100  done
14101  done
14102IFS=$as_save_IFS
14103  if test -z "$ac_cv_path_SED"; then
14104    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14105  fi
14106else
14107  ac_cv_path_SED=$SED
14108fi
14109
14110fi
14111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14112$as_echo "$ac_cv_path_SED" >&6; }
14113 SED="$ac_cv_path_SED"
14114  rm -f conftest.sed
14115
14116  else
14117    # The variable is set, but is it from the command line or the environment?
14118
14119    # Try to remove the string !SED! from our list.
14120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14122      # If it failed, the variable was not from the command line. Ignore it,
14123      # but warn the user (except for BASH, which is always set by the calling BASH).
14124      if test "xSED" != xBASH; then
14125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14126$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14127      fi
14128      # Try to locate tool using the code snippet
14129      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14130$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14131if ${ac_cv_path_SED+:} false; then :
14132  $as_echo_n "(cached) " >&6
14133else
14134            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14135     for ac_i in 1 2 3 4 5 6 7; do
14136       ac_script="$ac_script$as_nl$ac_script"
14137     done
14138     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14139     { ac_script=; unset ac_script;}
14140     if test -z "$SED"; then
14141  ac_path_SED_found=false
14142  # Loop through the user's path and test for each of PROGNAME-LIST
14143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14144for as_dir in $PATH
14145do
14146  IFS=$as_save_IFS
14147  test -z "$as_dir" && as_dir=.
14148    for ac_prog in sed gsed; do
14149    for ac_exec_ext in '' $ac_executable_extensions; do
14150      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14151      as_fn_executable_p "$ac_path_SED" || continue
14152# Check for GNU ac_path_SED and select it if it is found.
14153  # Check for GNU $ac_path_SED
14154case `"$ac_path_SED" --version 2>&1` in
14155*GNU*)
14156  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14157*)
14158  ac_count=0
14159  $as_echo_n 0123456789 >"conftest.in"
14160  while :
14161  do
14162    cat "conftest.in" "conftest.in" >"conftest.tmp"
14163    mv "conftest.tmp" "conftest.in"
14164    cp "conftest.in" "conftest.nl"
14165    $as_echo '' >> "conftest.nl"
14166    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14167    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14168    as_fn_arith $ac_count + 1 && ac_count=$as_val
14169    if test $ac_count -gt ${ac_path_SED_max-0}; then
14170      # Best one so far, save it but keep looking for a better one
14171      ac_cv_path_SED="$ac_path_SED"
14172      ac_path_SED_max=$ac_count
14173    fi
14174    # 10*(2^10) chars as input seems more than enough
14175    test $ac_count -gt 10 && break
14176  done
14177  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14178esac
14179
14180      $ac_path_SED_found && break 3
14181    done
14182  done
14183  done
14184IFS=$as_save_IFS
14185  if test -z "$ac_cv_path_SED"; then
14186    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14187  fi
14188else
14189  ac_cv_path_SED=$SED
14190fi
14191
14192fi
14193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14194$as_echo "$ac_cv_path_SED" >&6; }
14195 SED="$ac_cv_path_SED"
14196  rm -f conftest.sed
14197
14198    else
14199      # If it succeeded, then it was overridden by the user. We will use it
14200      # for the tool.
14201
14202      # First remove it from the list of overridden variables, so we can test
14203      # for unknown variables in the end.
14204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14205
14206      # Check if we try to supply an empty value
14207      if test "x$SED" = x; then
14208        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14209$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14210        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14211$as_echo_n "checking for SED... " >&6; }
14212        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14213$as_echo "disabled" >&6; }
14214      else
14215        # Check if the provided tool contains a complete path.
14216        tool_specified="$SED"
14217        tool_basename="${tool_specified##*/}"
14218        if test "x$tool_basename" = "x$tool_specified"; then
14219          # A command without a complete path is provided, search $PATH.
14220          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14221$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14222          # Extract the first word of "$tool_basename", so it can be a program name with args.
14223set dummy $tool_basename; ac_word=$2
14224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14225$as_echo_n "checking for $ac_word... " >&6; }
14226if ${ac_cv_path_SED+:} false; then :
14227  $as_echo_n "(cached) " >&6
14228else
14229  case $SED in
14230  [\\/]* | ?:[\\/]*)
14231  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14232  ;;
14233  *)
14234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14235for as_dir in $PATH
14236do
14237  IFS=$as_save_IFS
14238  test -z "$as_dir" && as_dir=.
14239    for ac_exec_ext in '' $ac_executable_extensions; do
14240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14241    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14243    break 2
14244  fi
14245done
14246  done
14247IFS=$as_save_IFS
14248
14249  ;;
14250esac
14251fi
14252SED=$ac_cv_path_SED
14253if test -n "$SED"; then
14254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14255$as_echo "$SED" >&6; }
14256else
14257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14258$as_echo "no" >&6; }
14259fi
14260
14261
14262          if test "x$SED" = x; then
14263            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14264          fi
14265        else
14266          # Otherwise we believe it is a complete path. Use it as it is.
14267          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14268$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14269          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14270$as_echo_n "checking for SED... " >&6; }
14271          if test ! -x "$tool_specified"; then
14272            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14273$as_echo "not found" >&6; }
14274            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14275          fi
14276          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14277$as_echo "$tool_specified" >&6; }
14278        fi
14279      fi
14280    fi
14281
14282  fi
14283
14284
14285  if test "x$SED" = x; then
14286    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14287  fi
14288
14289
14290
14291  # Always force rm.
14292  RM="$RM -f"
14293
14294  # pwd behaves differently on various platforms and some don't support the -L flag.
14295  # Always use the bash builtin pwd to get uniform behavior.
14296  THEPWDCMD=pwd
14297
14298  # These are not required on all platforms
14299
14300
14301  # Publish this variable in the help.
14302
14303
14304  if [ -z "${CYGPATH+x}" ]; then
14305    # The variable is not set by user, try to locate tool using the code snippet
14306    for ac_prog in cygpath
14307do
14308  # Extract the first word of "$ac_prog", so it can be a program name with args.
14309set dummy $ac_prog; ac_word=$2
14310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14311$as_echo_n "checking for $ac_word... " >&6; }
14312if ${ac_cv_path_CYGPATH+:} false; then :
14313  $as_echo_n "(cached) " >&6
14314else
14315  case $CYGPATH in
14316  [\\/]* | ?:[\\/]*)
14317  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14318  ;;
14319  *)
14320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14321for as_dir in $PATH
14322do
14323  IFS=$as_save_IFS
14324  test -z "$as_dir" && as_dir=.
14325    for ac_exec_ext in '' $ac_executable_extensions; do
14326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14327    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14329    break 2
14330  fi
14331done
14332  done
14333IFS=$as_save_IFS
14334
14335  ;;
14336esac
14337fi
14338CYGPATH=$ac_cv_path_CYGPATH
14339if test -n "$CYGPATH"; then
14340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14341$as_echo "$CYGPATH" >&6; }
14342else
14343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14344$as_echo "no" >&6; }
14345fi
14346
14347
14348  test -n "$CYGPATH" && break
14349done
14350
14351  else
14352    # The variable is set, but is it from the command line or the environment?
14353
14354    # Try to remove the string !CYGPATH! from our list.
14355    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14356    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14357      # If it failed, the variable was not from the command line. Ignore it,
14358      # but warn the user (except for BASH, which is always set by the calling BASH).
14359      if test "xCYGPATH" != xBASH; then
14360        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14361$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14362      fi
14363      # Try to locate tool using the code snippet
14364      for ac_prog in cygpath
14365do
14366  # Extract the first word of "$ac_prog", so it can be a program name with args.
14367set dummy $ac_prog; ac_word=$2
14368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14369$as_echo_n "checking for $ac_word... " >&6; }
14370if ${ac_cv_path_CYGPATH+:} false; then :
14371  $as_echo_n "(cached) " >&6
14372else
14373  case $CYGPATH in
14374  [\\/]* | ?:[\\/]*)
14375  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14376  ;;
14377  *)
14378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14379for as_dir in $PATH
14380do
14381  IFS=$as_save_IFS
14382  test -z "$as_dir" && as_dir=.
14383    for ac_exec_ext in '' $ac_executable_extensions; do
14384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14385    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14387    break 2
14388  fi
14389done
14390  done
14391IFS=$as_save_IFS
14392
14393  ;;
14394esac
14395fi
14396CYGPATH=$ac_cv_path_CYGPATH
14397if test -n "$CYGPATH"; then
14398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14399$as_echo "$CYGPATH" >&6; }
14400else
14401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14402$as_echo "no" >&6; }
14403fi
14404
14405
14406  test -n "$CYGPATH" && break
14407done
14408
14409    else
14410      # If it succeeded, then it was overridden by the user. We will use it
14411      # for the tool.
14412
14413      # First remove it from the list of overridden variables, so we can test
14414      # for unknown variables in the end.
14415      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14416
14417      # Check if we try to supply an empty value
14418      if test "x$CYGPATH" = x; then
14419        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14420$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14421        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14422$as_echo_n "checking for CYGPATH... " >&6; }
14423        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14424$as_echo "disabled" >&6; }
14425      else
14426        # Check if the provided tool contains a complete path.
14427        tool_specified="$CYGPATH"
14428        tool_basename="${tool_specified##*/}"
14429        if test "x$tool_basename" = "x$tool_specified"; then
14430          # A command without a complete path is provided, search $PATH.
14431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14432$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14433          # Extract the first word of "$tool_basename", so it can be a program name with args.
14434set dummy $tool_basename; ac_word=$2
14435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14436$as_echo_n "checking for $ac_word... " >&6; }
14437if ${ac_cv_path_CYGPATH+:} false; then :
14438  $as_echo_n "(cached) " >&6
14439else
14440  case $CYGPATH in
14441  [\\/]* | ?:[\\/]*)
14442  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14443  ;;
14444  *)
14445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14446for as_dir in $PATH
14447do
14448  IFS=$as_save_IFS
14449  test -z "$as_dir" && as_dir=.
14450    for ac_exec_ext in '' $ac_executable_extensions; do
14451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14452    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14454    break 2
14455  fi
14456done
14457  done
14458IFS=$as_save_IFS
14459
14460  ;;
14461esac
14462fi
14463CYGPATH=$ac_cv_path_CYGPATH
14464if test -n "$CYGPATH"; then
14465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14466$as_echo "$CYGPATH" >&6; }
14467else
14468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14469$as_echo "no" >&6; }
14470fi
14471
14472
14473          if test "x$CYGPATH" = x; then
14474            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14475          fi
14476        else
14477          # Otherwise we believe it is a complete path. Use it as it is.
14478          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14479$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14480          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14481$as_echo_n "checking for CYGPATH... " >&6; }
14482          if test ! -x "$tool_specified"; then
14483            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14484$as_echo "not found" >&6; }
14485            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14486          fi
14487          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14488$as_echo "$tool_specified" >&6; }
14489        fi
14490      fi
14491    fi
14492
14493  fi
14494
14495
14496
14497
14498  # Publish this variable in the help.
14499
14500
14501  if [ -z "${READLINK+x}" ]; then
14502    # The variable is not set by user, try to locate tool using the code snippet
14503    for ac_prog in greadlink readlink
14504do
14505  # Extract the first word of "$ac_prog", so it can be a program name with args.
14506set dummy $ac_prog; ac_word=$2
14507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14508$as_echo_n "checking for $ac_word... " >&6; }
14509if ${ac_cv_path_READLINK+:} false; then :
14510  $as_echo_n "(cached) " >&6
14511else
14512  case $READLINK in
14513  [\\/]* | ?:[\\/]*)
14514  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14515  ;;
14516  *)
14517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14518for as_dir in $PATH
14519do
14520  IFS=$as_save_IFS
14521  test -z "$as_dir" && as_dir=.
14522    for ac_exec_ext in '' $ac_executable_extensions; do
14523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14524    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14526    break 2
14527  fi
14528done
14529  done
14530IFS=$as_save_IFS
14531
14532  ;;
14533esac
14534fi
14535READLINK=$ac_cv_path_READLINK
14536if test -n "$READLINK"; then
14537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14538$as_echo "$READLINK" >&6; }
14539else
14540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14541$as_echo "no" >&6; }
14542fi
14543
14544
14545  test -n "$READLINK" && break
14546done
14547
14548  else
14549    # The variable is set, but is it from the command line or the environment?
14550
14551    # Try to remove the string !READLINK! from our list.
14552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14554      # If it failed, the variable was not from the command line. Ignore it,
14555      # but warn the user (except for BASH, which is always set by the calling BASH).
14556      if test "xREADLINK" != xBASH; then
14557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14558$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14559      fi
14560      # Try to locate tool using the code snippet
14561      for ac_prog in greadlink readlink
14562do
14563  # Extract the first word of "$ac_prog", so it can be a program name with args.
14564set dummy $ac_prog; ac_word=$2
14565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14566$as_echo_n "checking for $ac_word... " >&6; }
14567if ${ac_cv_path_READLINK+:} false; then :
14568  $as_echo_n "(cached) " >&6
14569else
14570  case $READLINK in
14571  [\\/]* | ?:[\\/]*)
14572  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14573  ;;
14574  *)
14575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14576for as_dir in $PATH
14577do
14578  IFS=$as_save_IFS
14579  test -z "$as_dir" && as_dir=.
14580    for ac_exec_ext in '' $ac_executable_extensions; do
14581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14582    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14584    break 2
14585  fi
14586done
14587  done
14588IFS=$as_save_IFS
14589
14590  ;;
14591esac
14592fi
14593READLINK=$ac_cv_path_READLINK
14594if test -n "$READLINK"; then
14595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14596$as_echo "$READLINK" >&6; }
14597else
14598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14599$as_echo "no" >&6; }
14600fi
14601
14602
14603  test -n "$READLINK" && break
14604done
14605
14606    else
14607      # If it succeeded, then it was overridden by the user. We will use it
14608      # for the tool.
14609
14610      # First remove it from the list of overridden variables, so we can test
14611      # for unknown variables in the end.
14612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14613
14614      # Check if we try to supply an empty value
14615      if test "x$READLINK" = x; then
14616        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14617$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14618        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14619$as_echo_n "checking for READLINK... " >&6; }
14620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14621$as_echo "disabled" >&6; }
14622      else
14623        # Check if the provided tool contains a complete path.
14624        tool_specified="$READLINK"
14625        tool_basename="${tool_specified##*/}"
14626        if test "x$tool_basename" = "x$tool_specified"; then
14627          # A command without a complete path is provided, search $PATH.
14628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14629$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14630          # Extract the first word of "$tool_basename", so it can be a program name with args.
14631set dummy $tool_basename; ac_word=$2
14632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14633$as_echo_n "checking for $ac_word... " >&6; }
14634if ${ac_cv_path_READLINK+:} false; then :
14635  $as_echo_n "(cached) " >&6
14636else
14637  case $READLINK in
14638  [\\/]* | ?:[\\/]*)
14639  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14640  ;;
14641  *)
14642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14643for as_dir in $PATH
14644do
14645  IFS=$as_save_IFS
14646  test -z "$as_dir" && as_dir=.
14647    for ac_exec_ext in '' $ac_executable_extensions; do
14648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14649    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14651    break 2
14652  fi
14653done
14654  done
14655IFS=$as_save_IFS
14656
14657  ;;
14658esac
14659fi
14660READLINK=$ac_cv_path_READLINK
14661if test -n "$READLINK"; then
14662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14663$as_echo "$READLINK" >&6; }
14664else
14665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14666$as_echo "no" >&6; }
14667fi
14668
14669
14670          if test "x$READLINK" = x; then
14671            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14672          fi
14673        else
14674          # Otherwise we believe it is a complete path. Use it as it is.
14675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14676$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14677          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14678$as_echo_n "checking for READLINK... " >&6; }
14679          if test ! -x "$tool_specified"; then
14680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14681$as_echo "not found" >&6; }
14682            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14683          fi
14684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14685$as_echo "$tool_specified" >&6; }
14686        fi
14687      fi
14688    fi
14689
14690  fi
14691
14692
14693
14694
14695  # Publish this variable in the help.
14696
14697
14698  if [ -z "${DF+x}" ]; then
14699    # The variable is not set by user, try to locate tool using the code snippet
14700    for ac_prog in df
14701do
14702  # Extract the first word of "$ac_prog", so it can be a program name with args.
14703set dummy $ac_prog; ac_word=$2
14704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14705$as_echo_n "checking for $ac_word... " >&6; }
14706if ${ac_cv_path_DF+:} false; then :
14707  $as_echo_n "(cached) " >&6
14708else
14709  case $DF in
14710  [\\/]* | ?:[\\/]*)
14711  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14712  ;;
14713  *)
14714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14715for as_dir in $PATH
14716do
14717  IFS=$as_save_IFS
14718  test -z "$as_dir" && as_dir=.
14719    for ac_exec_ext in '' $ac_executable_extensions; do
14720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14721    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14723    break 2
14724  fi
14725done
14726  done
14727IFS=$as_save_IFS
14728
14729  ;;
14730esac
14731fi
14732DF=$ac_cv_path_DF
14733if test -n "$DF"; then
14734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14735$as_echo "$DF" >&6; }
14736else
14737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14738$as_echo "no" >&6; }
14739fi
14740
14741
14742  test -n "$DF" && break
14743done
14744
14745  else
14746    # The variable is set, but is it from the command line or the environment?
14747
14748    # Try to remove the string !DF! from our list.
14749    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14750    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14751      # If it failed, the variable was not from the command line. Ignore it,
14752      # but warn the user (except for BASH, which is always set by the calling BASH).
14753      if test "xDF" != xBASH; then
14754        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14755$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14756      fi
14757      # Try to locate tool using the code snippet
14758      for ac_prog in df
14759do
14760  # Extract the first word of "$ac_prog", so it can be a program name with args.
14761set dummy $ac_prog; ac_word=$2
14762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14763$as_echo_n "checking for $ac_word... " >&6; }
14764if ${ac_cv_path_DF+:} false; then :
14765  $as_echo_n "(cached) " >&6
14766else
14767  case $DF in
14768  [\\/]* | ?:[\\/]*)
14769  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14770  ;;
14771  *)
14772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14773for as_dir in $PATH
14774do
14775  IFS=$as_save_IFS
14776  test -z "$as_dir" && as_dir=.
14777    for ac_exec_ext in '' $ac_executable_extensions; do
14778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14779    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14781    break 2
14782  fi
14783done
14784  done
14785IFS=$as_save_IFS
14786
14787  ;;
14788esac
14789fi
14790DF=$ac_cv_path_DF
14791if test -n "$DF"; then
14792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14793$as_echo "$DF" >&6; }
14794else
14795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14796$as_echo "no" >&6; }
14797fi
14798
14799
14800  test -n "$DF" && break
14801done
14802
14803    else
14804      # If it succeeded, then it was overridden by the user. We will use it
14805      # for the tool.
14806
14807      # First remove it from the list of overridden variables, so we can test
14808      # for unknown variables in the end.
14809      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14810
14811      # Check if we try to supply an empty value
14812      if test "x$DF" = x; then
14813        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14814$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14816$as_echo_n "checking for DF... " >&6; }
14817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14818$as_echo "disabled" >&6; }
14819      else
14820        # Check if the provided tool contains a complete path.
14821        tool_specified="$DF"
14822        tool_basename="${tool_specified##*/}"
14823        if test "x$tool_basename" = "x$tool_specified"; then
14824          # A command without a complete path is provided, search $PATH.
14825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14826$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14827          # Extract the first word of "$tool_basename", so it can be a program name with args.
14828set dummy $tool_basename; ac_word=$2
14829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14830$as_echo_n "checking for $ac_word... " >&6; }
14831if ${ac_cv_path_DF+:} false; then :
14832  $as_echo_n "(cached) " >&6
14833else
14834  case $DF in
14835  [\\/]* | ?:[\\/]*)
14836  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14837  ;;
14838  *)
14839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14840for as_dir in $PATH
14841do
14842  IFS=$as_save_IFS
14843  test -z "$as_dir" && as_dir=.
14844    for ac_exec_ext in '' $ac_executable_extensions; do
14845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14846    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14848    break 2
14849  fi
14850done
14851  done
14852IFS=$as_save_IFS
14853
14854  ;;
14855esac
14856fi
14857DF=$ac_cv_path_DF
14858if test -n "$DF"; then
14859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14860$as_echo "$DF" >&6; }
14861else
14862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14863$as_echo "no" >&6; }
14864fi
14865
14866
14867          if test "x$DF" = x; then
14868            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14869          fi
14870        else
14871          # Otherwise we believe it is a complete path. Use it as it is.
14872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14873$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14874          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14875$as_echo_n "checking for DF... " >&6; }
14876          if test ! -x "$tool_specified"; then
14877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14878$as_echo "not found" >&6; }
14879            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14880          fi
14881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14882$as_echo "$tool_specified" >&6; }
14883        fi
14884      fi
14885    fi
14886
14887  fi
14888
14889
14890
14891
14892  # Publish this variable in the help.
14893
14894
14895  if [ -z "${CPIO+x}" ]; then
14896    # The variable is not set by user, try to locate tool using the code snippet
14897    for ac_prog in cpio bsdcpio
14898do
14899  # Extract the first word of "$ac_prog", so it can be a program name with args.
14900set dummy $ac_prog; ac_word=$2
14901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14902$as_echo_n "checking for $ac_word... " >&6; }
14903if ${ac_cv_path_CPIO+:} false; then :
14904  $as_echo_n "(cached) " >&6
14905else
14906  case $CPIO in
14907  [\\/]* | ?:[\\/]*)
14908  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14909  ;;
14910  *)
14911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14912for as_dir in $PATH
14913do
14914  IFS=$as_save_IFS
14915  test -z "$as_dir" && as_dir=.
14916    for ac_exec_ext in '' $ac_executable_extensions; do
14917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14918    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14920    break 2
14921  fi
14922done
14923  done
14924IFS=$as_save_IFS
14925
14926  ;;
14927esac
14928fi
14929CPIO=$ac_cv_path_CPIO
14930if test -n "$CPIO"; then
14931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14932$as_echo "$CPIO" >&6; }
14933else
14934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14935$as_echo "no" >&6; }
14936fi
14937
14938
14939  test -n "$CPIO" && break
14940done
14941
14942  else
14943    # The variable is set, but is it from the command line or the environment?
14944
14945    # Try to remove the string !CPIO! from our list.
14946    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14947    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14948      # If it failed, the variable was not from the command line. Ignore it,
14949      # but warn the user (except for BASH, which is always set by the calling BASH).
14950      if test "xCPIO" != xBASH; then
14951        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14952$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14953      fi
14954      # Try to locate tool using the code snippet
14955      for ac_prog in cpio bsdcpio
14956do
14957  # Extract the first word of "$ac_prog", so it can be a program name with args.
14958set dummy $ac_prog; ac_word=$2
14959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14960$as_echo_n "checking for $ac_word... " >&6; }
14961if ${ac_cv_path_CPIO+:} false; then :
14962  $as_echo_n "(cached) " >&6
14963else
14964  case $CPIO in
14965  [\\/]* | ?:[\\/]*)
14966  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14967  ;;
14968  *)
14969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14970for as_dir in $PATH
14971do
14972  IFS=$as_save_IFS
14973  test -z "$as_dir" && as_dir=.
14974    for ac_exec_ext in '' $ac_executable_extensions; do
14975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14976    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14978    break 2
14979  fi
14980done
14981  done
14982IFS=$as_save_IFS
14983
14984  ;;
14985esac
14986fi
14987CPIO=$ac_cv_path_CPIO
14988if test -n "$CPIO"; then
14989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14990$as_echo "$CPIO" >&6; }
14991else
14992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14993$as_echo "no" >&6; }
14994fi
14995
14996
14997  test -n "$CPIO" && break
14998done
14999
15000    else
15001      # If it succeeded, then it was overridden by the user. We will use it
15002      # for the tool.
15003
15004      # First remove it from the list of overridden variables, so we can test
15005      # for unknown variables in the end.
15006      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15007
15008      # Check if we try to supply an empty value
15009      if test "x$CPIO" = x; then
15010        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15011$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15012        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15013$as_echo_n "checking for CPIO... " >&6; }
15014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15015$as_echo "disabled" >&6; }
15016      else
15017        # Check if the provided tool contains a complete path.
15018        tool_specified="$CPIO"
15019        tool_basename="${tool_specified##*/}"
15020        if test "x$tool_basename" = "x$tool_specified"; then
15021          # A command without a complete path is provided, search $PATH.
15022          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15023$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15024          # Extract the first word of "$tool_basename", so it can be a program name with args.
15025set dummy $tool_basename; ac_word=$2
15026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15027$as_echo_n "checking for $ac_word... " >&6; }
15028if ${ac_cv_path_CPIO+:} false; then :
15029  $as_echo_n "(cached) " >&6
15030else
15031  case $CPIO in
15032  [\\/]* | ?:[\\/]*)
15033  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15034  ;;
15035  *)
15036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15037for as_dir in $PATH
15038do
15039  IFS=$as_save_IFS
15040  test -z "$as_dir" && as_dir=.
15041    for ac_exec_ext in '' $ac_executable_extensions; do
15042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15043    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15045    break 2
15046  fi
15047done
15048  done
15049IFS=$as_save_IFS
15050
15051  ;;
15052esac
15053fi
15054CPIO=$ac_cv_path_CPIO
15055if test -n "$CPIO"; then
15056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15057$as_echo "$CPIO" >&6; }
15058else
15059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15060$as_echo "no" >&6; }
15061fi
15062
15063
15064          if test "x$CPIO" = x; then
15065            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15066          fi
15067        else
15068          # Otherwise we believe it is a complete path. Use it as it is.
15069          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15070$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15071          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15072$as_echo_n "checking for CPIO... " >&6; }
15073          if test ! -x "$tool_specified"; then
15074            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15075$as_echo "not found" >&6; }
15076            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15077          fi
15078          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15079$as_echo "$tool_specified" >&6; }
15080        fi
15081      fi
15082    fi
15083
15084  fi
15085
15086
15087
15088
15089  # Publish this variable in the help.
15090
15091
15092  if [ -z "${NICE+x}" ]; then
15093    # The variable is not set by user, try to locate tool using the code snippet
15094    for ac_prog in nice
15095do
15096  # Extract the first word of "$ac_prog", so it can be a program name with args.
15097set dummy $ac_prog; ac_word=$2
15098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15099$as_echo_n "checking for $ac_word... " >&6; }
15100if ${ac_cv_path_NICE+:} false; then :
15101  $as_echo_n "(cached) " >&6
15102else
15103  case $NICE in
15104  [\\/]* | ?:[\\/]*)
15105  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15106  ;;
15107  *)
15108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15109for as_dir in $PATH
15110do
15111  IFS=$as_save_IFS
15112  test -z "$as_dir" && as_dir=.
15113    for ac_exec_ext in '' $ac_executable_extensions; do
15114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15115    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15117    break 2
15118  fi
15119done
15120  done
15121IFS=$as_save_IFS
15122
15123  ;;
15124esac
15125fi
15126NICE=$ac_cv_path_NICE
15127if test -n "$NICE"; then
15128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15129$as_echo "$NICE" >&6; }
15130else
15131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15132$as_echo "no" >&6; }
15133fi
15134
15135
15136  test -n "$NICE" && break
15137done
15138
15139  else
15140    # The variable is set, but is it from the command line or the environment?
15141
15142    # Try to remove the string !NICE! from our list.
15143    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15144    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15145      # If it failed, the variable was not from the command line. Ignore it,
15146      # but warn the user (except for BASH, which is always set by the calling BASH).
15147      if test "xNICE" != xBASH; then
15148        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15149$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15150      fi
15151      # Try to locate tool using the code snippet
15152      for ac_prog in nice
15153do
15154  # Extract the first word of "$ac_prog", so it can be a program name with args.
15155set dummy $ac_prog; ac_word=$2
15156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15157$as_echo_n "checking for $ac_word... " >&6; }
15158if ${ac_cv_path_NICE+:} false; then :
15159  $as_echo_n "(cached) " >&6
15160else
15161  case $NICE in
15162  [\\/]* | ?:[\\/]*)
15163  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15164  ;;
15165  *)
15166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15167for as_dir in $PATH
15168do
15169  IFS=$as_save_IFS
15170  test -z "$as_dir" && as_dir=.
15171    for ac_exec_ext in '' $ac_executable_extensions; do
15172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15173    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15175    break 2
15176  fi
15177done
15178  done
15179IFS=$as_save_IFS
15180
15181  ;;
15182esac
15183fi
15184NICE=$ac_cv_path_NICE
15185if test -n "$NICE"; then
15186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15187$as_echo "$NICE" >&6; }
15188else
15189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15190$as_echo "no" >&6; }
15191fi
15192
15193
15194  test -n "$NICE" && break
15195done
15196
15197    else
15198      # If it succeeded, then it was overridden by the user. We will use it
15199      # for the tool.
15200
15201      # First remove it from the list of overridden variables, so we can test
15202      # for unknown variables in the end.
15203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15204
15205      # Check if we try to supply an empty value
15206      if test "x$NICE" = x; then
15207        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15208$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15210$as_echo_n "checking for NICE... " >&6; }
15211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15212$as_echo "disabled" >&6; }
15213      else
15214        # Check if the provided tool contains a complete path.
15215        tool_specified="$NICE"
15216        tool_basename="${tool_specified##*/}"
15217        if test "x$tool_basename" = "x$tool_specified"; then
15218          # A command without a complete path is provided, search $PATH.
15219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15220$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15221          # Extract the first word of "$tool_basename", so it can be a program name with args.
15222set dummy $tool_basename; ac_word=$2
15223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15224$as_echo_n "checking for $ac_word... " >&6; }
15225if ${ac_cv_path_NICE+:} false; then :
15226  $as_echo_n "(cached) " >&6
15227else
15228  case $NICE in
15229  [\\/]* | ?:[\\/]*)
15230  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15231  ;;
15232  *)
15233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15234for as_dir in $PATH
15235do
15236  IFS=$as_save_IFS
15237  test -z "$as_dir" && as_dir=.
15238    for ac_exec_ext in '' $ac_executable_extensions; do
15239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15240    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15242    break 2
15243  fi
15244done
15245  done
15246IFS=$as_save_IFS
15247
15248  ;;
15249esac
15250fi
15251NICE=$ac_cv_path_NICE
15252if test -n "$NICE"; then
15253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15254$as_echo "$NICE" >&6; }
15255else
15256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15257$as_echo "no" >&6; }
15258fi
15259
15260
15261          if test "x$NICE" = x; then
15262            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15263          fi
15264        else
15265          # Otherwise we believe it is a complete path. Use it as it is.
15266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15267$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15268          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15269$as_echo_n "checking for NICE... " >&6; }
15270          if test ! -x "$tool_specified"; then
15271            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15272$as_echo "not found" >&6; }
15273            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15274          fi
15275          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15276$as_echo "$tool_specified" >&6; }
15277        fi
15278      fi
15279    fi
15280
15281  fi
15282
15283
15284
15285
15286# Now we can determine OpenJDK build and target platforms. This is required to
15287# have early on.
15288# Make sure we can run config.sub.
15289$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15290  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15291
15292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15293$as_echo_n "checking build system type... " >&6; }
15294if ${ac_cv_build+:} false; then :
15295  $as_echo_n "(cached) " >&6
15296else
15297  ac_build_alias=$build_alias
15298test "x$ac_build_alias" = x &&
15299  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15300test "x$ac_build_alias" = x &&
15301  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15302ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15303  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15304
15305fi
15306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15307$as_echo "$ac_cv_build" >&6; }
15308case $ac_cv_build in
15309*-*-*) ;;
15310*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15311esac
15312build=$ac_cv_build
15313ac_save_IFS=$IFS; IFS='-'
15314set x $ac_cv_build
15315shift
15316build_cpu=$1
15317build_vendor=$2
15318shift; shift
15319# Remember, the first character of IFS is used to create $*,
15320# except with old shells:
15321build_os=$*
15322IFS=$ac_save_IFS
15323case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15324
15325
15326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15327$as_echo_n "checking host system type... " >&6; }
15328if ${ac_cv_host+:} false; then :
15329  $as_echo_n "(cached) " >&6
15330else
15331  if test "x$host_alias" = x; then
15332  ac_cv_host=$ac_cv_build
15333else
15334  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15335    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15336fi
15337
15338fi
15339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15340$as_echo "$ac_cv_host" >&6; }
15341case $ac_cv_host in
15342*-*-*) ;;
15343*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15344esac
15345host=$ac_cv_host
15346ac_save_IFS=$IFS; IFS='-'
15347set x $ac_cv_host
15348shift
15349host_cpu=$1
15350host_vendor=$2
15351shift; shift
15352# Remember, the first character of IFS is used to create $*,
15353# except with old shells:
15354host_os=$*
15355IFS=$ac_save_IFS
15356case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15357
15358
15359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15360$as_echo_n "checking target system type... " >&6; }
15361if ${ac_cv_target+:} false; then :
15362  $as_echo_n "(cached) " >&6
15363else
15364  if test "x$target_alias" = x; then
15365  ac_cv_target=$ac_cv_host
15366else
15367  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15368    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15369fi
15370
15371fi
15372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15373$as_echo "$ac_cv_target" >&6; }
15374case $ac_cv_target in
15375*-*-*) ;;
15376*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15377esac
15378target=$ac_cv_target
15379ac_save_IFS=$IFS; IFS='-'
15380set x $ac_cv_target
15381shift
15382target_cpu=$1
15383target_vendor=$2
15384shift; shift
15385# Remember, the first character of IFS is used to create $*,
15386# except with old shells:
15387target_os=$*
15388IFS=$ac_save_IFS
15389case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15390
15391
15392# The aliases save the names the user supplied, while $host etc.
15393# will get canonicalized.
15394test -n "$target_alias" &&
15395  test "$program_prefix$program_suffix$program_transform_name" = \
15396    NONENONEs,x,x, &&
15397  program_prefix=${target_alias}-
15398
15399  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15400  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15401  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15402  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15403  # to use the configure naming style.
15404
15405
15406
15407
15408
15409  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15410  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15411  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15412  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15413  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15414  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15415
15416
15417
15418  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15419
15420  case "$build_os" in
15421    *linux*)
15422      VAR_OS=linux
15423      VAR_OS_TYPE=unix
15424      ;;
15425    *solaris*)
15426      VAR_OS=solaris
15427      VAR_OS_TYPE=unix
15428      ;;
15429    *darwin*)
15430      VAR_OS=macosx
15431      VAR_OS_TYPE=unix
15432      ;;
15433    *bsd*)
15434      VAR_OS=bsd
15435      VAR_OS_TYPE=unix
15436      ;;
15437    *cygwin*)
15438      VAR_OS=windows
15439      VAR_OS_ENV=windows.cygwin
15440      ;;
15441    *mingw*)
15442      VAR_OS=windows
15443      VAR_OS_ENV=windows.msys
15444      ;;
15445    *aix*)
15446      VAR_OS=aix
15447      VAR_OS_TYPE=unix
15448      ;;
15449    *)
15450      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15451      ;;
15452  esac
15453
15454
15455  # First argument is the cpu name from the trip/quad
15456  case "$build_cpu" in
15457    x86_64)
15458      VAR_CPU=x86_64
15459      VAR_CPU_ARCH=x86
15460      VAR_CPU_BITS=64
15461      VAR_CPU_ENDIAN=little
15462      ;;
15463    i?86)
15464      VAR_CPU=x86
15465      VAR_CPU_ARCH=x86
15466      VAR_CPU_BITS=32
15467      VAR_CPU_ENDIAN=little
15468      ;;
15469    arm*)
15470      VAR_CPU=arm
15471      VAR_CPU_ARCH=arm
15472      VAR_CPU_BITS=32
15473      VAR_CPU_ENDIAN=little
15474      ;;
15475    aarch64)
15476      VAR_CPU=aarch64
15477      VAR_CPU_ARCH=aarch64
15478      VAR_CPU_BITS=64
15479      VAR_CPU_ENDIAN=little
15480      ;;
15481    powerpc)
15482      VAR_CPU=ppc
15483      VAR_CPU_ARCH=ppc
15484      VAR_CPU_BITS=32
15485      VAR_CPU_ENDIAN=big
15486      ;;
15487    powerpc64)
15488      VAR_CPU=ppc64
15489      VAR_CPU_ARCH=ppc
15490      VAR_CPU_BITS=64
15491      VAR_CPU_ENDIAN=big
15492      ;;
15493    powerpc64le)
15494      VAR_CPU=ppc64le
15495      VAR_CPU_ARCH=ppc
15496      VAR_CPU_BITS=64
15497      VAR_CPU_ENDIAN=little
15498      ;;
15499    s390)
15500      VAR_CPU=s390
15501      VAR_CPU_ARCH=s390
15502      VAR_CPU_BITS=32
15503      VAR_CPU_ENDIAN=big
15504      ;;
15505    s390x)
15506      VAR_CPU=s390x
15507      VAR_CPU_ARCH=s390
15508      VAR_CPU_BITS=64
15509      VAR_CPU_ENDIAN=big
15510      ;;
15511    sparc)
15512      VAR_CPU=sparc
15513      VAR_CPU_ARCH=sparc
15514      VAR_CPU_BITS=32
15515      VAR_CPU_ENDIAN=big
15516      ;;
15517    sparcv9|sparc64)
15518      VAR_CPU=sparcv9
15519      VAR_CPU_ARCH=sparc
15520      VAR_CPU_BITS=64
15521      VAR_CPU_ENDIAN=big
15522      ;;
15523    *)
15524      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15525      ;;
15526  esac
15527
15528  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15529  OPENJDK_BUILD_OS="$VAR_OS"
15530  if test "x$VAR_OS_TYPE" != x; then
15531    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15532  else
15533    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15534  fi
15535  if test "x$VAR_OS_ENV" != x; then
15536    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15537  else
15538    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15539  fi
15540  OPENJDK_BUILD_CPU="$VAR_CPU"
15541  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15542  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15543  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15544
15545
15546
15547
15548
15549
15550
15551
15552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15553$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15555$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15556
15557  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15558
15559  case "$host_os" in
15560    *linux*)
15561      VAR_OS=linux
15562      VAR_OS_TYPE=unix
15563      ;;
15564    *solaris*)
15565      VAR_OS=solaris
15566      VAR_OS_TYPE=unix
15567      ;;
15568    *darwin*)
15569      VAR_OS=macosx
15570      VAR_OS_TYPE=unix
15571      ;;
15572    *bsd*)
15573      VAR_OS=bsd
15574      VAR_OS_TYPE=unix
15575      ;;
15576    *cygwin*)
15577      VAR_OS=windows
15578      VAR_OS_ENV=windows.cygwin
15579      ;;
15580    *mingw*)
15581      VAR_OS=windows
15582      VAR_OS_ENV=windows.msys
15583      ;;
15584    *aix*)
15585      VAR_OS=aix
15586      VAR_OS_TYPE=unix
15587      ;;
15588    *)
15589      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15590      ;;
15591  esac
15592
15593
15594  # First argument is the cpu name from the trip/quad
15595  case "$host_cpu" in
15596    x86_64)
15597      VAR_CPU=x86_64
15598      VAR_CPU_ARCH=x86
15599      VAR_CPU_BITS=64
15600      VAR_CPU_ENDIAN=little
15601      ;;
15602    i?86)
15603      VAR_CPU=x86
15604      VAR_CPU_ARCH=x86
15605      VAR_CPU_BITS=32
15606      VAR_CPU_ENDIAN=little
15607      ;;
15608    arm*)
15609      VAR_CPU=arm
15610      VAR_CPU_ARCH=arm
15611      VAR_CPU_BITS=32
15612      VAR_CPU_ENDIAN=little
15613      ;;
15614    aarch64)
15615      VAR_CPU=aarch64
15616      VAR_CPU_ARCH=aarch64
15617      VAR_CPU_BITS=64
15618      VAR_CPU_ENDIAN=little
15619      ;;
15620    powerpc)
15621      VAR_CPU=ppc
15622      VAR_CPU_ARCH=ppc
15623      VAR_CPU_BITS=32
15624      VAR_CPU_ENDIAN=big
15625      ;;
15626    powerpc64)
15627      VAR_CPU=ppc64
15628      VAR_CPU_ARCH=ppc
15629      VAR_CPU_BITS=64
15630      VAR_CPU_ENDIAN=big
15631      ;;
15632    powerpc64le)
15633      VAR_CPU=ppc64le
15634      VAR_CPU_ARCH=ppc
15635      VAR_CPU_BITS=64
15636      VAR_CPU_ENDIAN=little
15637      ;;
15638    s390)
15639      VAR_CPU=s390
15640      VAR_CPU_ARCH=s390
15641      VAR_CPU_BITS=32
15642      VAR_CPU_ENDIAN=big
15643      ;;
15644    s390x)
15645      VAR_CPU=s390x
15646      VAR_CPU_ARCH=s390
15647      VAR_CPU_BITS=64
15648      VAR_CPU_ENDIAN=big
15649      ;;
15650    sparc)
15651      VAR_CPU=sparc
15652      VAR_CPU_ARCH=sparc
15653      VAR_CPU_BITS=32
15654      VAR_CPU_ENDIAN=big
15655      ;;
15656    sparcv9|sparc64)
15657      VAR_CPU=sparcv9
15658      VAR_CPU_ARCH=sparc
15659      VAR_CPU_BITS=64
15660      VAR_CPU_ENDIAN=big
15661      ;;
15662    *)
15663      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15664      ;;
15665  esac
15666
15667  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15668  OPENJDK_TARGET_OS="$VAR_OS"
15669  if test "x$VAR_OS_TYPE" != x; then
15670    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15671  else
15672    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15673  fi
15674  if test "x$VAR_OS_ENV" != x; then
15675    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15676  else
15677    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15678  fi
15679  OPENJDK_TARGET_CPU="$VAR_CPU"
15680  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15681  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15682  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15683
15684
15685
15686
15687
15688
15689
15690
15691  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15692$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15694$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15695
15696
15697
15698# Check whether --with-target-bits was given.
15699if test "${with_target_bits+set}" = set; then :
15700  withval=$with_target_bits;
15701fi
15702
15703
15704  # We have three types of compiles:
15705  # native  == normal compilation, target system == build system
15706  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15707  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15708  #
15709  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15710    # We're doing a proper cross-compilation
15711    COMPILE_TYPE="cross"
15712  else
15713    COMPILE_TYPE="native"
15714  fi
15715
15716  if test "x$with_target_bits" != x; then
15717    if test "x$COMPILE_TYPE" = "xcross"; then
15718      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15719    fi
15720
15721    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15722      # A reduced build is requested
15723      COMPILE_TYPE="reduced"
15724      OPENJDK_TARGET_CPU_BITS=32
15725      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15726        OPENJDK_TARGET_CPU=x86
15727      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15728        OPENJDK_TARGET_CPU=sparc
15729      else
15730        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15731      fi
15732    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15733      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
15734    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15735      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15736$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15737    else
15738      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15739    fi
15740  fi
15741
15742
15743  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15744$as_echo_n "checking compilation type... " >&6; }
15745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15746$as_echo "$COMPILE_TYPE" >&6; }
15747
15748
15749  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15750    REQUIRED_OS_NAME=SunOS
15751    REQUIRED_OS_VERSION=5.10
15752  fi
15753  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15754    REQUIRED_OS_NAME=Linux
15755    REQUIRED_OS_VERSION=2.6
15756  fi
15757  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15758    REQUIRED_OS_NAME=Windows
15759    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15760      REQUIRED_OS_VERSION=5.2
15761    else
15762      REQUIRED_OS_VERSION=5.1
15763    fi
15764  fi
15765  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15766    REQUIRED_OS_NAME=Darwin
15767    REQUIRED_OS_VERSION=11.2
15768  fi
15769  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15770    REQUIRED_OS_NAME=AIX
15771    REQUIRED_OS_VERSION=7.1
15772  fi
15773
15774
15775
15776
15777
15778
15779  # Also store the legacy naming of the cpu.
15780  # Ie i586 and amd64 instead of x86 and x86_64
15781  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15782  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15783    OPENJDK_TARGET_CPU_LEGACY="i586"
15784  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15785    # On all platforms except MacOSX replace x86_64 with amd64.
15786    OPENJDK_TARGET_CPU_LEGACY="amd64"
15787  fi
15788
15789
15790  # And the second legacy naming of the cpu.
15791  # Ie i386 and amd64 instead of x86 and x86_64.
15792  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15793  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15794    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15795  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15796    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15797  fi
15798
15799
15800  # This is the name of the cpu (but using i386 and amd64 instead of
15801  # x86 and x86_64, respectively), preceeded by a /, to be used when
15802  # locating libraries. On macosx, it's empty, though.
15803  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15804  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15805    OPENJDK_TARGET_CPU_LIBDIR=""
15806  fi
15807
15808
15809  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15810  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15811  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15812  OPENJDK_TARGET_CPU_ISADIR=""
15813  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15814    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15815      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15816    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15817      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15818    fi
15819  fi
15820
15821
15822  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15823  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15824  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15825    # On linux only, we replace x86 with i386.
15826    OPENJDK_TARGET_CPU_OSARCH="i386"
15827  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15828    # On all platforms except macosx, we replace x86_64 with amd64.
15829    OPENJDK_TARGET_CPU_OSARCH="amd64"
15830  fi
15831
15832
15833  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15834  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15835    OPENJDK_TARGET_CPU_JLI="i386"
15836  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15837    # On all platforms except macosx, we replace x86_64 with amd64.
15838    OPENJDK_TARGET_CPU_JLI="amd64"
15839  fi
15840  # Now setup the -D flags for building libjli.
15841  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15842  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15843    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15844      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15845    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15846      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15847    fi
15848  fi
15849
15850
15851  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15852      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15853  else
15854      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15855  fi
15856
15857
15858  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15859  # Macosx is osx and x86_64 is x64
15860  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15861    OPENJDK_TARGET_OS_BUNDLE="osx"
15862  else
15863    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15864  fi
15865  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15866    OPENJDK_TARGET_CPU_BUNDLE="x64"
15867  else
15868    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15869  fi
15870  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15871
15872
15873
15874
15875  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15876    A_LP64="LP64:="
15877    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15878    # unpack200.exe
15879    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15880      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15881    fi
15882  fi
15883  LP64=$A_LP64
15884
15885
15886  if test "x$COMPILE_TYPE" = "xcross"; then
15887    # FIXME: ... or should this include reduced builds..?
15888    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15889  else
15890    DEFINE_CROSS_COMPILE_ARCH=""
15891  fi
15892
15893
15894  # Convert openjdk platform names to hotspot names
15895
15896  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15897  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15898    HOTSPOT_TARGET_OS=bsd
15899  fi
15900
15901
15902  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15903  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15904    HOTSPOT_TARGET_OS_TYPE=posix
15905  fi
15906
15907
15908  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15909  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15910    HOTSPOT_TARGET_CPU=x86_32
15911  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15912    HOTSPOT_TARGET_CPU=sparc
15913  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15914    HOTSPOT_TARGET_CPU=ppc_64
15915  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15916    HOTSPOT_TARGET_CPU=ppc_64
15917  fi
15918
15919
15920  # This is identical with OPENJDK_*, but define anyway for consistency.
15921  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15922
15923
15924  # Setup HOTSPOT_TARGET_CPU_DEFINE
15925  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15926    HOTSPOT_TARGET_CPU_DEFINE=IA32
15927  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15928    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15929  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15930    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15931  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15932    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15933  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15934    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15935  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15936    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15937
15938  # The cpu defines below are for zero, we don't support them directly.
15939  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15940    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15941  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15942    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15943  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15944    HOTSPOT_TARGET_CPU_DEFINE=S390
15945  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15946    HOTSPOT_TARGET_CPU_DEFINE=S390
15947  elif test "x$OPENJDK_TARGET_CPU" != x; then
15948    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15949  fi
15950
15951
15952
15953
15954  # Also store the legacy naming of the cpu.
15955  # Ie i586 and amd64 instead of x86 and x86_64
15956  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15957  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15958    OPENJDK_BUILD_CPU_LEGACY="i586"
15959  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15960    # On all platforms except MacOSX replace x86_64 with amd64.
15961    OPENJDK_BUILD_CPU_LEGACY="amd64"
15962  fi
15963
15964
15965  # And the second legacy naming of the cpu.
15966  # Ie i386 and amd64 instead of x86 and x86_64.
15967  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15968  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15969    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15970  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15971    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15972  fi
15973
15974
15975  # This is the name of the cpu (but using i386 and amd64 instead of
15976  # x86 and x86_64, respectively), preceeded by a /, to be used when
15977  # locating libraries. On macosx, it's empty, though.
15978  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15979  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15980    OPENJDK_BUILD_CPU_LIBDIR=""
15981  fi
15982
15983
15984  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15985  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15986  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15987  OPENJDK_BUILD_CPU_ISADIR=""
15988  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15989    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15990      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15991    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15992      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15993    fi
15994  fi
15995
15996
15997  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15998  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15999  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16000    # On linux only, we replace x86 with i386.
16001    OPENJDK_BUILD_CPU_OSARCH="i386"
16002  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16003    # On all platforms except macosx, we replace x86_64 with amd64.
16004    OPENJDK_BUILD_CPU_OSARCH="amd64"
16005  fi
16006
16007
16008  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16009  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16010    OPENJDK_BUILD_CPU_JLI="i386"
16011  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16012    # On all platforms except macosx, we replace x86_64 with amd64.
16013    OPENJDK_BUILD_CPU_JLI="amd64"
16014  fi
16015  # Now setup the -D flags for building libjli.
16016  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16017  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16018    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16019      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16020    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16021      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16022    fi
16023  fi
16024
16025
16026  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16027      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16028  else
16029      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16030  fi
16031
16032
16033  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16034  # Macosx is osx and x86_64 is x64
16035  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16036    OPENJDK_BUILD_OS_BUNDLE="osx"
16037  else
16038    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16039  fi
16040  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16041    OPENJDK_BUILD_CPU_BUNDLE="x64"
16042  else
16043    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16044  fi
16045  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16046
16047
16048
16049
16050  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16051    A_LP64="LP64:="
16052    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16053    # unpack200.exe
16054    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16055      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16056    fi
16057  fi
16058  LP64=$A_LP64
16059
16060
16061  if test "x$COMPILE_TYPE" = "xcross"; then
16062    # FIXME: ... or should this include reduced builds..?
16063    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16064  else
16065    DEFINE_CROSS_COMPILE_ARCH=""
16066  fi
16067
16068
16069  # Convert openjdk platform names to hotspot names
16070
16071  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16072  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16073    HOTSPOT_BUILD_OS=bsd
16074  fi
16075
16076
16077  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16078  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16079    HOTSPOT_BUILD_OS_TYPE=posix
16080  fi
16081
16082
16083  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16084  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16085    HOTSPOT_BUILD_CPU=x86_32
16086  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16087    HOTSPOT_BUILD_CPU=sparc
16088  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16089    HOTSPOT_BUILD_CPU=ppc_64
16090  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16091    HOTSPOT_BUILD_CPU=ppc_64
16092  fi
16093
16094
16095  # This is identical with OPENJDK_*, but define anyway for consistency.
16096  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16097
16098
16099  # Setup HOTSPOT_BUILD_CPU_DEFINE
16100  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16101    HOTSPOT_BUILD_CPU_DEFINE=IA32
16102  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16103    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16104  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16105    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16106  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16107    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16108  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16109    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16110  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16111    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16112
16113  # The cpu defines below are for zero, we don't support them directly.
16114  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16115    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16116  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16117    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16118  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16119    HOTSPOT_BUILD_CPU_DEFINE=S390
16120  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16121    HOTSPOT_BUILD_CPU_DEFINE=S390
16122  elif test "x$OPENJDK_BUILD_CPU" != x; then
16123    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16124  fi
16125
16126
16127
16128
16129  # ZERO_ARCHDEF is used to enable architecture-specific code.
16130  # This is used in legacy hotspot build.
16131  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16132
16133
16134
16135
16136
16137# Continue setting up basic stuff. Most remaining code require fundamental tools.
16138
16139  # Save the current directory this script was started from
16140  CURDIR="$PWD"
16141
16142  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16143  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16144  # was not available at that time.
16145  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16146  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16147    ORIGINAL_PATH="$REWRITTEN_PATH"
16148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16149$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16150  fi
16151
16152  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16153    PATH_SEP=";"
16154
16155  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16156  if test $SRC_ROOT_LENGTH -gt 100; then
16157    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16158  fi
16159
16160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16162$as_echo_n "checking cygwin release... " >&6; }
16163    CYGWIN_VERSION=`$UNAME -r`
16164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16165$as_echo "$CYGWIN_VERSION" >&6; }
16166    WINDOWS_ENV_VENDOR='cygwin'
16167    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16168
16169    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16170    if test "x$CYGWIN_VERSION_OLD" != x; then
16171      { $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
16172$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;}
16173      as_fn_error $? "Cannot continue" "$LINENO" 5
16174    fi
16175    if test "x$CYGPATH" = x; then
16176      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16177    fi
16178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16179$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16180    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16181    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16182    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16183    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16185$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16186    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16187    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16188    if test "x$test_cygdrive_prefix" = x; then
16189      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16190    fi
16191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16193$as_echo_n "checking msys release... " >&6; }
16194    MSYS_VERSION=`$UNAME -r`
16195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16196$as_echo "$MSYS_VERSION" >&6; }
16197
16198    WINDOWS_ENV_VENDOR='msys'
16199    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16200
16201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16202$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16203    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16204    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16205
16206  windows_path="$MSYS_ROOT_PATH"
16207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16208    unix_path=`$CYGPATH -u "$windows_path"`
16209    MSYS_ROOT_PATH="$unix_path"
16210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16212    MSYS_ROOT_PATH="$unix_path"
16213  fi
16214
16215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16216$as_echo "$MSYS_ROOT_PATH" >&6; }
16217    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16218  else
16219    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16220  fi
16221
16222  # Test if windows or unix (cygwin/msys) find is first in path.
16223  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16224$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16225  FIND_BINARY_OUTPUT=`find --version 2>&1`
16226  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16228$as_echo "unix style" >&6; }
16229  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16231$as_echo "Windows" >&6; }
16232    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16233$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16234    { $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
16235$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16236    as_fn_error $? "Cannot continue" "$LINENO" 5
16237  else
16238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16239$as_echo "unknown" >&6; }
16240    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16241$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16242  fi
16243
16244  else
16245    PATH_SEP=":"
16246  fi
16247
16248
16249  # We get the top-level directory from the supporting wrappers.
16250  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16251$as_echo_n "checking for top-level directory... " >&6; }
16252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16253$as_echo "$TOPDIR" >&6; }
16254
16255
16256  # Save the original version of TOPDIR for string comparisons
16257  ORIGINAL_TOPDIR="$TOPDIR"
16258
16259
16260  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16261
16262  # Only process if variable expands to non-empty
16263
16264  if test "x$CURDIR" != x; then
16265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16266
16267  # Input might be given as Windows format, start by converting to
16268  # unix format.
16269  path="$CURDIR"
16270  new_path=`$CYGPATH -u "$path"`
16271
16272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16275  # "foo.exe" is OK but "foo" is an error.
16276  #
16277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16278  # It is also a way to make sure we got the proper file name for the real test later on.
16279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16280  if test "x$test_shortpath" = x; then
16281    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16282$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16283    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16284  fi
16285
16286  # Call helper function which possibly converts this using DOS-style short mode.
16287  # If so, the updated path is stored in $new_path.
16288
16289  input_path="$new_path"
16290  # Check if we need to convert this using DOS-style short mode. If the path
16291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16292  # take no chances and rewrite it.
16293  # Note: m4 eats our [], so we need to use [ and ] instead.
16294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16295  if test "x$has_forbidden_chars" != x; then
16296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16300      # Going to short mode and back again did indeed matter. Since short mode is
16301      # case insensitive, let's make it lowercase to improve readability.
16302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16303      # Now convert it back to Unix-style (cygpath)
16304      input_path=`$CYGPATH -u "$shortmode_path"`
16305      new_path="$input_path"
16306    fi
16307  fi
16308
16309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16310  if test "x$test_cygdrive_prefix" = x; then
16311    # As a simple fix, exclude /usr/bin since it's not a real path.
16312    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16314      # a path prefixed by /cygdrive for fixpath to work.
16315      new_path="$CYGWIN_ROOT_PATH$input_path"
16316    fi
16317  fi
16318
16319
16320  if test "x$path" != "x$new_path"; then
16321    CURDIR="$new_path"
16322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16323$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16324  fi
16325
16326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16327
16328  path="$CURDIR"
16329  has_colon=`$ECHO $path | $GREP ^.:`
16330  new_path="$path"
16331  if test "x$has_colon" = x; then
16332    # Not in mixed or Windows style, start by that.
16333    new_path=`cmd //c echo $path`
16334  fi
16335
16336
16337  input_path="$new_path"
16338  # Check if we need to convert this using DOS-style short mode. If the path
16339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16340  # take no chances and rewrite it.
16341  # Note: m4 eats our [], so we need to use [ and ] instead.
16342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16343  if test "x$has_forbidden_chars" != x; then
16344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16346  fi
16347
16348
16349  windows_path="$new_path"
16350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16351    unix_path=`$CYGPATH -u "$windows_path"`
16352    new_path="$unix_path"
16353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16355    new_path="$unix_path"
16356  fi
16357
16358  if test "x$path" != "x$new_path"; then
16359    CURDIR="$new_path"
16360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16361$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16362  fi
16363
16364  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16365  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16366
16367    else
16368      # We're on a unix platform. Hooray! :)
16369      path="$CURDIR"
16370      has_space=`$ECHO "$path" | $GREP " "`
16371      if test "x$has_space" != x; then
16372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16373$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16374        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16375      fi
16376
16377      # Use eval to expand a potential ~
16378      eval path="$path"
16379      if test ! -f "$path" && test ! -d "$path"; then
16380        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16381      fi
16382
16383      if test -d "$path"; then
16384        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16385      else
16386        dir="`$DIRNAME "$path"`"
16387        base="`$BASENAME "$path"`"
16388        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16389      fi
16390    fi
16391  fi
16392
16393
16394  # Only process if variable expands to non-empty
16395
16396  if test "x$TOPDIR" != x; then
16397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16398
16399  # Input might be given as Windows format, start by converting to
16400  # unix format.
16401  path="$TOPDIR"
16402  new_path=`$CYGPATH -u "$path"`
16403
16404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16407  # "foo.exe" is OK but "foo" is an error.
16408  #
16409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16410  # It is also a way to make sure we got the proper file name for the real test later on.
16411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16412  if test "x$test_shortpath" = x; then
16413    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16414$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16415    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16416  fi
16417
16418  # Call helper function which possibly converts this using DOS-style short mode.
16419  # If so, the updated path is stored in $new_path.
16420
16421  input_path="$new_path"
16422  # Check if we need to convert this using DOS-style short mode. If the path
16423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16424  # take no chances and rewrite it.
16425  # Note: m4 eats our [], so we need to use [ and ] instead.
16426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16427  if test "x$has_forbidden_chars" != x; then
16428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16432      # Going to short mode and back again did indeed matter. Since short mode is
16433      # case insensitive, let's make it lowercase to improve readability.
16434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16435      # Now convert it back to Unix-style (cygpath)
16436      input_path=`$CYGPATH -u "$shortmode_path"`
16437      new_path="$input_path"
16438    fi
16439  fi
16440
16441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16442  if test "x$test_cygdrive_prefix" = x; then
16443    # As a simple fix, exclude /usr/bin since it's not a real path.
16444    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16446      # a path prefixed by /cygdrive for fixpath to work.
16447      new_path="$CYGWIN_ROOT_PATH$input_path"
16448    fi
16449  fi
16450
16451
16452  if test "x$path" != "x$new_path"; then
16453    TOPDIR="$new_path"
16454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16455$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16456  fi
16457
16458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16459
16460  path="$TOPDIR"
16461  has_colon=`$ECHO $path | $GREP ^.:`
16462  new_path="$path"
16463  if test "x$has_colon" = x; then
16464    # Not in mixed or Windows style, start by that.
16465    new_path=`cmd //c echo $path`
16466  fi
16467
16468
16469  input_path="$new_path"
16470  # Check if we need to convert this using DOS-style short mode. If the path
16471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16472  # take no chances and rewrite it.
16473  # Note: m4 eats our [], so we need to use [ and ] instead.
16474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16475  if test "x$has_forbidden_chars" != x; then
16476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16478  fi
16479
16480
16481  windows_path="$new_path"
16482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16483    unix_path=`$CYGPATH -u "$windows_path"`
16484    new_path="$unix_path"
16485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16487    new_path="$unix_path"
16488  fi
16489
16490  if test "x$path" != "x$new_path"; then
16491    TOPDIR="$new_path"
16492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16493$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16494  fi
16495
16496  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16497  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16498
16499    else
16500      # We're on a unix platform. Hooray! :)
16501      path="$TOPDIR"
16502      has_space=`$ECHO "$path" | $GREP " "`
16503      if test "x$has_space" != x; then
16504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16505$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16506        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16507      fi
16508
16509      # Use eval to expand a potential ~
16510      eval path="$path"
16511      if test ! -f "$path" && test ! -d "$path"; then
16512        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16513      fi
16514
16515      if test -d "$path"; then
16516        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16517      else
16518        dir="`$DIRNAME "$path"`"
16519        base="`$BASENAME "$path"`"
16520        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16521      fi
16522    fi
16523  fi
16524
16525  # SRC_ROOT is a traditional alias for TOPDIR.
16526  SRC_ROOT=$TOPDIR
16527
16528  # Calculate a canonical version of TOPDIR for string comparisons
16529  CANONICAL_TOPDIR=$TOPDIR
16530
16531  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16532    # Follow a chain of symbolic links. Use readlink
16533    # where it exists, else fall back to horribly
16534    # complicated shell code.
16535    if test "x$READLINK_TESTED" != yes; then
16536      # On MacOSX there is a readlink tool with a different
16537      # purpose than the GNU readlink tool. Check the found readlink.
16538      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16539      if test "x$ISGNU" = x; then
16540        # A readlink that we do not know how to use.
16541        # Are there other non-GNU readlinks out there?
16542        READLINK_TESTED=yes
16543        READLINK=
16544      fi
16545    fi
16546
16547    if test "x$READLINK" != x; then
16548      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16549    else
16550      # Save the current directory for restoring afterwards
16551      STARTDIR=$PWD
16552      COUNTER=0
16553      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16554      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16555      cd $sym_link_dir
16556      # Use -P flag to resolve symlinks in directories.
16557      cd `$THEPWDCMD -P`
16558      sym_link_dir=`$THEPWDCMD -P`
16559      # Resolve file symlinks
16560      while test $COUNTER -lt 20; do
16561        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16562        if test "x$ISLINK" == x; then
16563          # This is not a symbolic link! We are done!
16564          break
16565        fi
16566        # Again resolve directory symlinks since the target of the just found
16567        # link could be in a different directory
16568        cd `$DIRNAME $ISLINK`
16569        sym_link_dir=`$THEPWDCMD -P`
16570        sym_link_file=`$BASENAME $ISLINK`
16571        let COUNTER=COUNTER+1
16572      done
16573      cd $STARTDIR
16574      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16575    fi
16576  fi
16577
16578
16579
16580  # Locate the directory of this script.
16581  AUTOCONF_DIR=$TOPDIR/common/autoconf
16582
16583  # Setup username (for use in adhoc version strings etc)
16584  # Outer [ ] to quote m4.
16585   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16586
16587
16588
16589# Check if it's a pure open build or if custom sources are to be used.
16590
16591  # Check whether --enable-openjdk-only was given.
16592if test "${enable_openjdk_only+set}" = set; then :
16593  enableval=$enable_openjdk_only;
16594else
16595  enable_openjdk_only="no"
16596fi
16597
16598
16599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16600$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16602$as_echo "$enable_openjdk_only" >&6; }
16603  if test "x$enable_openjdk_only" = "xyes"; then
16604    SUPPRESS_CUSTOM_EXTENSIONS="true"
16605  elif test "x$enable_openjdk_only" = "xno"; then
16606    SUPPRESS_CUSTOM_EXTENSIONS="false"
16607  else
16608    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16609  fi
16610
16611  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16612  # the IncludeCustomExtension macro.
16613
16614
16615# Check whether --with-custom-make-dir was given.
16616if test "${with_custom_make_dir+set}" = set; then :
16617  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
16618$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16619fi
16620
16621
16622
16623
16624# These are needed to be able to create a configuration name (and thus the output directory)
16625
16626  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16627$as_echo_n "checking which variant of the JDK to build... " >&6; }
16628
16629# Check whether --with-jdk-variant was given.
16630if test "${with_jdk_variant+set}" = set; then :
16631  withval=$with_jdk_variant;
16632fi
16633
16634
16635  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16636    JDK_VARIANT="normal"
16637  else
16638    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16639  fi
16640
16641
16642
16643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16644$as_echo "$JDK_VARIANT" >&6; }
16645
16646
16647  DEBUG_LEVEL="release"
16648  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16649$as_echo_n "checking which debug level to use... " >&6; }
16650  # Check whether --enable-debug was given.
16651if test "${enable_debug+set}" = set; then :
16652  enableval=$enable_debug;
16653        ENABLE_DEBUG="${enableval}"
16654        DEBUG_LEVEL="fastdebug"
16655
16656else
16657  ENABLE_DEBUG="no"
16658fi
16659
16660
16661
16662# Check whether --with-debug-level was given.
16663if test "${with_debug_level+set}" = set; then :
16664  withval=$with_debug_level;
16665        DEBUG_LEVEL="${withval}"
16666        if test "x$ENABLE_DEBUG" = xyes; then
16667          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16668        fi
16669
16670fi
16671
16672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16673$as_echo "$DEBUG_LEVEL" >&6; }
16674
16675  if test "x$DEBUG_LEVEL" != xrelease && \
16676      test "x$DEBUG_LEVEL" != xoptimized && \
16677      test "x$DEBUG_LEVEL" != xfastdebug && \
16678      test "x$DEBUG_LEVEL" != xslowdebug; then
16679    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16680  fi
16681
16682  # Translate DEBUG_LEVEL to debug level used by Hotspot
16683  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16684  if test "x$DEBUG_LEVEL" = xrelease; then
16685    HOTSPOT_DEBUG_LEVEL="product"
16686  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16687    HOTSPOT_DEBUG_LEVEL="debug"
16688  fi
16689
16690  if test "x$DEBUG_LEVEL" = xoptimized; then
16691    # The debug level 'optimized' is a little special because it is currently only
16692    # applicable to the HotSpot build where it means to build a completely
16693    # optimized version of the VM without any debugging code (like for the
16694    # 'release' debug level which is called 'product' in the HotSpot build) but
16695    # with the exception that it can contain additional code which is otherwise
16696    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16697    # test new and/or experimental features which are not intended for customer
16698    # shipment. Because these new features need to be tested and benchmarked in
16699    # real world scenarios, we want to build the containing JDK at the 'release'
16700    # debug level.
16701    DEBUG_LEVEL="release"
16702  fi
16703
16704
16705
16706
16707
16708
16709# Check whether --with-jvm-variants was given.
16710if test "${with_jvm_variants+set}" = set; then :
16711  withval=$with_jvm_variants;
16712fi
16713
16714
16715  if test "x$with_jvm_variants" = x; then
16716    with_jvm_variants="server"
16717  fi
16718  JVM_VARIANTS_OPT="$with_jvm_variants"
16719
16720  # Has the user listed more than one variant?
16721  # Additional [] needed to keep m4 from mangling shell constructs.
16722  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16723    BUILDING_MULTIPLE_JVM_VARIANTS=true
16724  else
16725    BUILDING_MULTIPLE_JVM_VARIANTS=false
16726  fi
16727  # Replace the commas with AND for use in the build directory name.
16728  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16729
16730  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16731$as_echo_n "checking which variants of the JVM to build... " >&6; }
16732  # JVM_VARIANTS is a space-separated list.
16733  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16734  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16736$as_echo "$JVM_VARIANTS" >&6; }
16737
16738  # Check that the selected variants are valid
16739
16740  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16741  # Notice that the original variant failes on SLES 10 and 11
16742  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16743  STACK=${JVM_VARIANTS// /$'\n'}
16744  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16745  if test "x$INVALID_VARIANTS" != x; then
16746    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16747$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16748    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16749  fi
16750
16751  # All "special" variants share the same output directory ("server")
16752  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16753  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16754  STACK=${JVM_VARIANTS// /$'\n'}
16755  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16756  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16757    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16758  fi
16759
16760
16761
16762
16763  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16764    # zero behaves as a platform and rewrites these values. This is really weird. :(
16765    # We are guaranteed that we do not build any other variants when building zero.
16766    HOTSPOT_TARGET_CPU=zero
16767    HOTSPOT_TARGET_CPU_ARCH=zero
16768  fi
16769
16770
16771# With basic setup done, call the custom early hook.
16772
16773
16774# Check if we have devkits, extra paths or sysroot set.
16775
16776
16777# Check whether --with-devkit was given.
16778if test "${with_devkit+set}" = set; then :
16779  withval=$with_devkit;
16780
16781  # Only process if variable expands to non-empty
16782
16783  if test "x$with_devkit" != x; then
16784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16785
16786  # Input might be given as Windows format, start by converting to
16787  # unix format.
16788  path="$with_devkit"
16789  new_path=`$CYGPATH -u "$path"`
16790
16791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16794  # "foo.exe" is OK but "foo" is an error.
16795  #
16796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16797  # It is also a way to make sure we got the proper file name for the real test later on.
16798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16799  if test "x$test_shortpath" = x; then
16800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16801$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16802    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16803  fi
16804
16805  # Call helper function which possibly converts this using DOS-style short mode.
16806  # If so, the updated path is stored in $new_path.
16807
16808  input_path="$new_path"
16809  # Check if we need to convert this using DOS-style short mode. If the path
16810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16811  # take no chances and rewrite it.
16812  # Note: m4 eats our [], so we need to use [ and ] instead.
16813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16814  if test "x$has_forbidden_chars" != x; then
16815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16819      # Going to short mode and back again did indeed matter. Since short mode is
16820      # case insensitive, let's make it lowercase to improve readability.
16821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16822      # Now convert it back to Unix-style (cygpath)
16823      input_path=`$CYGPATH -u "$shortmode_path"`
16824      new_path="$input_path"
16825    fi
16826  fi
16827
16828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16829  if test "x$test_cygdrive_prefix" = x; then
16830    # As a simple fix, exclude /usr/bin since it's not a real path.
16831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16833      # a path prefixed by /cygdrive for fixpath to work.
16834      new_path="$CYGWIN_ROOT_PATH$input_path"
16835    fi
16836  fi
16837
16838
16839  if test "x$path" != "x$new_path"; then
16840    with_devkit="$new_path"
16841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16842$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16843  fi
16844
16845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16846
16847  path="$with_devkit"
16848  has_colon=`$ECHO $path | $GREP ^.:`
16849  new_path="$path"
16850  if test "x$has_colon" = x; then
16851    # Not in mixed or Windows style, start by that.
16852    new_path=`cmd //c echo $path`
16853  fi
16854
16855
16856  input_path="$new_path"
16857  # Check if we need to convert this using DOS-style short mode. If the path
16858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16859  # take no chances and rewrite it.
16860  # Note: m4 eats our [], so we need to use [ and ] instead.
16861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16862  if test "x$has_forbidden_chars" != x; then
16863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16865  fi
16866
16867
16868  windows_path="$new_path"
16869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16870    unix_path=`$CYGPATH -u "$windows_path"`
16871    new_path="$unix_path"
16872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16874    new_path="$unix_path"
16875  fi
16876
16877  if test "x$path" != "x$new_path"; then
16878    with_devkit="$new_path"
16879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16880$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16881  fi
16882
16883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16885
16886    else
16887      # We're on a unix platform. Hooray! :)
16888      path="$with_devkit"
16889      has_space=`$ECHO "$path" | $GREP " "`
16890      if test "x$has_space" != x; then
16891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16892$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16893        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16894      fi
16895
16896      # Use eval to expand a potential ~
16897      eval path="$path"
16898      if test ! -f "$path" && test ! -d "$path"; then
16899        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16900      fi
16901
16902      if test -d "$path"; then
16903        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16904      else
16905        dir="`$DIRNAME "$path"`"
16906        base="`$BASENAME "$path"`"
16907        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16908      fi
16909    fi
16910  fi
16911
16912        DEVKIT_ROOT="$with_devkit"
16913        # Check for a meta data info file in the root of the devkit
16914        if test -f "$DEVKIT_ROOT/devkit.info"; then
16915          . $DEVKIT_ROOT/devkit.info
16916          # This potentially sets the following:
16917          # A descriptive name of the devkit
16918
16919  if test "x$DEVKIT_NAME" = x; then
16920    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16921  fi
16922
16923          # Corresponds to --with-extra-path
16924
16925  if test "x$DEVKIT_EXTRA_PATH" = x; then
16926    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16927  fi
16928
16929          # Corresponds to --with-toolchain-path
16930
16931  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16932    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16933  fi
16934
16935          # Corresponds to --with-sysroot
16936
16937  if test "x$DEVKIT_SYSROOT" = x; then
16938    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16939  fi
16940
16941
16942          # Identifies the Visual Studio version in the devkit
16943
16944  if test "x$DEVKIT_VS_VERSION" = x; then
16945    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16946  fi
16947
16948          # The Visual Studio include environment variable
16949
16950  if test "x$DEVKIT_VS_INCLUDE" = x; then
16951    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16952  fi
16953
16954          # The Visual Studio lib environment variable
16955
16956  if test "x$DEVKIT_VS_LIB" = x; then
16957    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16958  fi
16959
16960          # Corresponds to --with-msvcr-dll
16961
16962  if test "x$DEVKIT_MSVCR_DLL" = x; then
16963    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16964  fi
16965
16966          # Corresponds to --with-msvcp-dll
16967
16968  if test "x$DEVKIT_MSVCP_DLL" = x; then
16969    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16970  fi
16971
16972        fi
16973
16974        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16975$as_echo_n "checking for devkit... " >&6; }
16976        if test "x$DEVKIT_NAME" != x; then
16977          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16978$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16979        else
16980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16981$as_echo "$DEVKIT_ROOT" >&6; }
16982        fi
16983
16984
16985  if test "x$DEVKIT_EXTRA_PATH" != x; then
16986    if test "x$EXTRA_PATH" = x; then
16987      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16988    else
16989      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16990    fi
16991  fi
16992
16993
16994        # Fallback default of just /bin if DEVKIT_PATH is not defined
16995        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16996          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16997        fi
16998
16999  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17000    if test "x$TOOLCHAIN_PATH" = x; then
17001      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17002    else
17003      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17004    fi
17005  fi
17006
17007
17008        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17009        # places for backwards compatiblity.
17010        if test "x$DEVKIT_SYSROOT" != x; then
17011          SYSROOT="$DEVKIT_SYSROOT"
17012        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17013          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17014        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17015          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17016        fi
17017
17018
17019fi
17020
17021
17022  # You can force the sysroot if the sysroot encoded into the compiler tools
17023  # is not correct.
17024
17025# Check whether --with-sys-root was given.
17026if test "${with_sys_root+set}" = set; then :
17027  withval=$with_sys_root; SYSROOT=$with_sys_root
17028
17029fi
17030
17031
17032
17033# Check whether --with-sysroot was given.
17034if test "${with_sysroot+set}" = set; then :
17035  withval=$with_sysroot; SYSROOT=$with_sysroot
17036
17037fi
17038
17039
17040
17041# Check whether --with-tools-dir was given.
17042if test "${with_tools_dir+set}" = set; then :
17043  withval=$with_tools_dir;
17044  if test "x$with_tools_dir" != x; then
17045    if test "x$TOOLCHAIN_PATH" = x; then
17046      TOOLCHAIN_PATH="$with_tools_dir"
17047    else
17048      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17049    fi
17050  fi
17051
17052
17053fi
17054
17055
17056
17057# Check whether --with-toolchain-path was given.
17058if test "${with_toolchain_path+set}" = set; then :
17059  withval=$with_toolchain_path;
17060  if test "x$with_toolchain_path" != x; then
17061    if test "x$TOOLCHAIN_PATH" = x; then
17062      TOOLCHAIN_PATH="$with_toolchain_path"
17063    else
17064      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17065    fi
17066  fi
17067
17068
17069fi
17070
17071
17072
17073# Check whether --with-extra-path was given.
17074if test "${with_extra_path+set}" = set; then :
17075  withval=$with_extra_path;
17076  if test "x$with_extra_path" != x; then
17077    if test "x$EXTRA_PATH" = x; then
17078      EXTRA_PATH="$with_extra_path"
17079    else
17080      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17081    fi
17082  fi
17083
17084
17085fi
17086
17087
17088  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17089    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17090    # If not, detect if Xcode is installed by running xcodebuild -version
17091    # if no Xcode installed, xcodebuild exits with 1
17092    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17093    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17094      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17095      # fall back on the stub binary in /usr/bin/xcodebuild
17096      # Extract the first word of "xcodebuild", so it can be a program name with args.
17097set dummy xcodebuild; ac_word=$2
17098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17099$as_echo_n "checking for $ac_word... " >&6; }
17100if ${ac_cv_path_XCODEBUILD+:} false; then :
17101  $as_echo_n "(cached) " >&6
17102else
17103  case $XCODEBUILD in
17104  [\\/]* | ?:[\\/]*)
17105  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17106  ;;
17107  *)
17108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17109for as_dir in $TOOLCHAIN_PATH
17110do
17111  IFS=$as_save_IFS
17112  test -z "$as_dir" && as_dir=.
17113    for ac_exec_ext in '' $ac_executable_extensions; do
17114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17115    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17117    break 2
17118  fi
17119done
17120  done
17121IFS=$as_save_IFS
17122
17123  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17124  ;;
17125esac
17126fi
17127XCODEBUILD=$ac_cv_path_XCODEBUILD
17128if test -n "$XCODEBUILD"; then
17129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17130$as_echo "$XCODEBUILD" >&6; }
17131else
17132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17133$as_echo "no" >&6; }
17134fi
17135
17136
17137    else
17138      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17139      # when only the command line tools are installed there are no SDKs, so headers
17140      # are copied into the system frameworks
17141      XCODEBUILD=
17142
17143    fi
17144
17145    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17146$as_echo_n "checking for sdk name... " >&6; }
17147
17148# Check whether --with-sdk-name was given.
17149if test "${with_sdk_name+set}" = set; then :
17150  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17151
17152fi
17153
17154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17155$as_echo "$SDKNAME" >&6; }
17156
17157    # if toolchain path is specified then don't rely on system headers, they may not compile
17158    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17159    test -z "$TOOLCHAIN_PATH" && \
17160      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17161
17162    if test -z "$SYSROOT"; then
17163      if test -n "$XCODEBUILD"; then
17164        # if we don't have system headers, use default SDK name (last resort)
17165        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17166          SDKNAME=${SDKNAME:-macosx}
17167        fi
17168
17169        if test -n "$SDKNAME"; then
17170          # Call xcodebuild to determine SYSROOT
17171          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17172        fi
17173      else
17174        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17175          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
17176        fi
17177      fi
17178    else
17179      # warn user if --with-sdk-name was also set
17180      if test -n "$with_sdk_name"; then
17181        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17182$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17183      fi
17184    fi
17185
17186    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17187      # If no system framework headers, then SYSROOT must be set, or we won't build
17188      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
17189    fi
17190
17191    # Perform a basic sanity test
17192    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17193      if test -z "$SYSROOT"; then
17194        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
17195      else
17196        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17197      fi
17198    fi
17199
17200    # set SDKROOT too, Xcode tools will pick it up
17201    SDKROOT=$SYSROOT
17202
17203  fi
17204
17205  # Prepend the extra path to the global path
17206
17207  if test "x$EXTRA_PATH" != x; then
17208    if test "x$PATH" = x; then
17209      PATH="$EXTRA_PATH"
17210    else
17211      PATH="$EXTRA_PATH:$PATH"
17212    fi
17213  fi
17214
17215
17216  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
17217    # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
17218    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
17219  fi
17220
17221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17222$as_echo_n "checking for sysroot... " >&6; }
17223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17224$as_echo "$SYSROOT" >&6; }
17225  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17226$as_echo_n "checking for toolchain path... " >&6; }
17227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17228$as_echo "$TOOLCHAIN_PATH" >&6; }
17229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17230$as_echo_n "checking for extra path... " >&6; }
17231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17232$as_echo "$EXTRA_PATH" >&6; }
17233
17234
17235# To properly create a configuration name, we need to have the OpenJDK target
17236# and options (variants and debug level) parsed.
17237
17238
17239
17240# Check whether --with-conf-name was given.
17241if test "${with_conf_name+set}" = set; then :
17242  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17243fi
17244
17245
17246  # Test from where we are running configure, in or outside of src root.
17247  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17248$as_echo_n "checking where to store configuration... " >&6; }
17249  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17250      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17251      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17252    # We are running configure from the src root.
17253    # Create a default ./build/target-variant-debuglevel output root.
17254    if test "x${CONF_NAME}" = x; then
17255      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17256$as_echo "in default location" >&6; }
17257      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17258    else
17259      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17260$as_echo "in build directory with custom name" >&6; }
17261    fi
17262    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17263    $MKDIR -p "$OUTPUT_ROOT"
17264    if test ! -d "$OUTPUT_ROOT"; then
17265      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17266    fi
17267  else
17268    # We are running configure from outside of the src dir.
17269    # Then use the current directory as output dir!
17270    # If configuration is situated in normal build directory, just use the build
17271    # directory name as configuration name, otherwise use the complete path.
17272    if test "x${CONF_NAME}" = x; then
17273      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17274    fi
17275    OUTPUT_ROOT="$CURDIR"
17276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17277$as_echo "in current directory" >&6; }
17278
17279    # WARNING: This might be a bad thing to do. You need to be sure you want to
17280    # have a configuration in this directory. Do some sanity checks!
17281
17282    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17283      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17284      # other files
17285      files_present=`$LS $OUTPUT_ROOT`
17286      # Configure has already touched config.log and confdefs.h in the current dir when this check
17287      # is performed.
17288      filtered_files=`$ECHO "$files_present" \
17289          | $SED -e 's/config.log//g' \
17290              -e 's/configure.log//g' \
17291              -e 's/confdefs.h//g' \
17292              -e 's/ //g' \
17293          | $TR -d '\n'`
17294      if test "x$filtered_files" != x; then
17295        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17296$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17297        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17298$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17299        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17300$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17301        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17302$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17303        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17304$as_echo "$as_me: seriously mess up just about everything." >&6;}
17305        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17306$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17307        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17308$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17309        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17310      fi
17311    fi
17312  fi
17313  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17314$as_echo_n "checking what configuration name to use... " >&6; }
17315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17316$as_echo "$CONF_NAME" >&6; }
17317
17318
17319  # Only process if variable expands to non-empty
17320
17321  if test "x$OUTPUT_ROOT" != x; then
17322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17323
17324  # Input might be given as Windows format, start by converting to
17325  # unix format.
17326  path="$OUTPUT_ROOT"
17327  new_path=`$CYGPATH -u "$path"`
17328
17329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17332  # "foo.exe" is OK but "foo" is an error.
17333  #
17334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17335  # It is also a way to make sure we got the proper file name for the real test later on.
17336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17337  if test "x$test_shortpath" = x; then
17338    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17339$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17340    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17341  fi
17342
17343  # Call helper function which possibly converts this using DOS-style short mode.
17344  # If so, the updated path is stored in $new_path.
17345
17346  input_path="$new_path"
17347  # Check if we need to convert this using DOS-style short mode. If the path
17348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17349  # take no chances and rewrite it.
17350  # Note: m4 eats our [], so we need to use [ and ] instead.
17351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17352  if test "x$has_forbidden_chars" != x; then
17353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17357      # Going to short mode and back again did indeed matter. Since short mode is
17358      # case insensitive, let's make it lowercase to improve readability.
17359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17360      # Now convert it back to Unix-style (cygpath)
17361      input_path=`$CYGPATH -u "$shortmode_path"`
17362      new_path="$input_path"
17363    fi
17364  fi
17365
17366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17367  if test "x$test_cygdrive_prefix" = x; then
17368    # As a simple fix, exclude /usr/bin since it's not a real path.
17369    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17371      # a path prefixed by /cygdrive for fixpath to work.
17372      new_path="$CYGWIN_ROOT_PATH$input_path"
17373    fi
17374  fi
17375
17376
17377  if test "x$path" != "x$new_path"; then
17378    OUTPUT_ROOT="$new_path"
17379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17380$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17381  fi
17382
17383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17384
17385  path="$OUTPUT_ROOT"
17386  has_colon=`$ECHO $path | $GREP ^.:`
17387  new_path="$path"
17388  if test "x$has_colon" = x; then
17389    # Not in mixed or Windows style, start by that.
17390    new_path=`cmd //c echo $path`
17391  fi
17392
17393
17394  input_path="$new_path"
17395  # Check if we need to convert this using DOS-style short mode. If the path
17396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17397  # take no chances and rewrite it.
17398  # Note: m4 eats our [], so we need to use [ and ] instead.
17399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17400  if test "x$has_forbidden_chars" != x; then
17401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17403  fi
17404
17405
17406  windows_path="$new_path"
17407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17408    unix_path=`$CYGPATH -u "$windows_path"`
17409    new_path="$unix_path"
17410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17412    new_path="$unix_path"
17413  fi
17414
17415  if test "x$path" != "x$new_path"; then
17416    OUTPUT_ROOT="$new_path"
17417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17418$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17419  fi
17420
17421  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17422  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17423
17424    else
17425      # We're on a unix platform. Hooray! :)
17426      path="$OUTPUT_ROOT"
17427      has_space=`$ECHO "$path" | $GREP " "`
17428      if test "x$has_space" != x; then
17429        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17430$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17431        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17432      fi
17433
17434      # Use eval to expand a potential ~
17435      eval path="$path"
17436      if test ! -f "$path" && test ! -d "$path"; then
17437        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17438      fi
17439
17440      if test -d "$path"; then
17441        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17442      else
17443        dir="`$DIRNAME "$path"`"
17444        base="`$BASENAME "$path"`"
17445        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17446      fi
17447    fi
17448  fi
17449
17450
17451  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17452  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17453
17454  SPEC=$OUTPUT_ROOT/spec.gmk
17455
17456  CONF_NAME=$CONF_NAME
17457
17458  OUTPUT_ROOT=$OUTPUT_ROOT
17459
17460
17461
17462  # The spec.gmk file contains all variables for the make system.
17463  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17464
17465  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17466  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17467
17468  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17469  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17470
17471  # The compare.sh is used to compare the build output to other builds.
17472  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17473
17474  # The generated Makefile knows where the spec.gmk is and where the source is.
17475  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17476  # which will look for generated configurations
17477  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17478
17479
17480
17481# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17482
17483  for ac_prog in apt-get yum port pkgutil pkgadd
17484do
17485  # Extract the first word of "$ac_prog", so it can be a program name with args.
17486set dummy $ac_prog; ac_word=$2
17487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17488$as_echo_n "checking for $ac_word... " >&6; }
17489if ${ac_cv_prog_PKGHANDLER+:} false; then :
17490  $as_echo_n "(cached) " >&6
17491else
17492  if test -n "$PKGHANDLER"; then
17493  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17494else
17495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17496for as_dir in $PATH
17497do
17498  IFS=$as_save_IFS
17499  test -z "$as_dir" && as_dir=.
17500    for ac_exec_ext in '' $ac_executable_extensions; do
17501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17502    ac_cv_prog_PKGHANDLER="$ac_prog"
17503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17504    break 2
17505  fi
17506done
17507  done
17508IFS=$as_save_IFS
17509
17510fi
17511fi
17512PKGHANDLER=$ac_cv_prog_PKGHANDLER
17513if test -n "$PKGHANDLER"; then
17514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17515$as_echo "$PKGHANDLER" >&6; }
17516else
17517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17518$as_echo "no" >&6; }
17519fi
17520
17521
17522  test -n "$PKGHANDLER" && break
17523done
17524
17525
17526
17527# Setup tools that requires more complex handling, or that is not needed by the configure script.
17528
17529
17530
17531  # Publish this variable in the help.
17532
17533
17534  if [ -z "${MAKE+x}" ]; then
17535    # The variable is not set by user, try to locate tool using the code snippet
17536
17537    # Try our hardest to locate a correct version of GNU make
17538    for ac_prog in gmake
17539do
17540  # Extract the first word of "$ac_prog", so it can be a program name with args.
17541set dummy $ac_prog; ac_word=$2
17542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17543$as_echo_n "checking for $ac_word... " >&6; }
17544if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17545  $as_echo_n "(cached) " >&6
17546else
17547  case $CHECK_GMAKE in
17548  [\\/]* | ?:[\\/]*)
17549  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17550  ;;
17551  *)
17552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17553for as_dir in $PATH
17554do
17555  IFS=$as_save_IFS
17556  test -z "$as_dir" && as_dir=.
17557    for ac_exec_ext in '' $ac_executable_extensions; do
17558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17559    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17561    break 2
17562  fi
17563done
17564  done
17565IFS=$as_save_IFS
17566
17567  ;;
17568esac
17569fi
17570CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17571if test -n "$CHECK_GMAKE"; then
17572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17573$as_echo "$CHECK_GMAKE" >&6; }
17574else
17575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17576$as_echo "no" >&6; }
17577fi
17578
17579
17580  test -n "$CHECK_GMAKE" && break
17581done
17582
17583
17584  MAKE_CANDIDATE=""$CHECK_GMAKE""
17585  DESCRIPTION="gmake in PATH"
17586
17587  # On Cygwin, we require a newer version of make than on other platforms
17588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17589    MAKE_VERSION_EXPR="-e 4\."
17590    MAKE_REQUIRED_VERSION="4.0"
17591   else
17592    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17593    MAKE_REQUIRED_VERSION="3.81"
17594  fi
17595
17596  if test "x$MAKE_CANDIDATE" != x; then
17597    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17598$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17599    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17600    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17601    if test "x$IS_GNU_MAKE" = x; then
17602      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17603$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17604    else
17605      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17606      if test "x$IS_MODERN_MAKE" = x; then
17607        { $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
17608$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;}
17609      else
17610        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17611          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17612            MAKE_EXPECTED_ENV='cygwin'
17613          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17614            MAKE_EXPECTED_ENV='msys'
17615          else
17616            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17617          fi
17618          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17619          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17620        else
17621          # Not relevant for non-Windows
17622          IS_MAKE_CORRECT_ENV=true
17623        fi
17624        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17625          { $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
17626$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;}
17627        else
17628          FOUND_MAKE=$MAKE_CANDIDATE
17629
17630  # Only process if variable expands to non-empty
17631
17632  if test "x$FOUND_MAKE" != x; then
17633    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17634
17635  # First separate the path from the arguments. This will split at the first
17636  # space.
17637  complete="$FOUND_MAKE"
17638  path="${complete%% *}"
17639  tmp="$complete EOL"
17640  arguments="${tmp#* }"
17641
17642  # Input might be given as Windows format, start by converting to
17643  # unix format.
17644  new_path=`$CYGPATH -u "$path"`
17645
17646  # Now try to locate executable using which
17647  new_path=`$WHICH "$new_path" 2> /dev/null`
17648  # bat and cmd files are not always considered executable in cygwin causing which
17649  # to not find them
17650  if test "x$new_path" = x \
17651      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17652      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17653    new_path=`$CYGPATH -u "$path"`
17654  fi
17655  if test "x$new_path" = x; then
17656    # Oops. Which didn't find the executable.
17657    # The splitting of arguments from the executable at a space might have been incorrect,
17658    # since paths with space are more likely in Windows. Give it another try with the whole
17659    # argument.
17660    path="$complete"
17661    arguments="EOL"
17662    new_path=`$CYGPATH -u "$path"`
17663    new_path=`$WHICH "$new_path" 2> /dev/null`
17664    # bat and cmd files are not always considered executable in cygwin causing which
17665    # to not find them
17666    if test "x$new_path" = x \
17667        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17668        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17669      new_path=`$CYGPATH -u "$path"`
17670    fi
17671    if test "x$new_path" = x; then
17672      # It's still not found. Now this is an unrecoverable error.
17673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17674$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17675      has_space=`$ECHO "$complete" | $GREP " "`
17676      if test "x$has_space" != x; then
17677        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17678$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17679      fi
17680      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17681    fi
17682  fi
17683
17684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17687  # "foo.exe" is OK but "foo" is an error.
17688  #
17689  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17690  # It is also a way to make sure we got the proper file name for the real test later on.
17691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17692  if test "x$test_shortpath" = x; then
17693    # Short path failed, file does not exist as specified.
17694    # Try adding .exe or .cmd
17695    if test -f "${new_path}.exe"; then
17696      input_to_shortpath="${new_path}.exe"
17697    elif test -f "${new_path}.cmd"; then
17698      input_to_shortpath="${new_path}.cmd"
17699    else
17700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17701$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17702      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17703$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17704      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17705    fi
17706  else
17707    input_to_shortpath="$new_path"
17708  fi
17709
17710  # Call helper function which possibly converts this using DOS-style short mode.
17711  # If so, the updated path is stored in $new_path.
17712  new_path="$input_to_shortpath"
17713
17714  input_path="$input_to_shortpath"
17715  # Check if we need to convert this using DOS-style short mode. If the path
17716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17717  # take no chances and rewrite it.
17718  # Note: m4 eats our [], so we need to use [ and ] instead.
17719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17720  if test "x$has_forbidden_chars" != x; then
17721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17725      # Going to short mode and back again did indeed matter. Since short mode is
17726      # case insensitive, let's make it lowercase to improve readability.
17727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17728      # Now convert it back to Unix-style (cygpath)
17729      input_path=`$CYGPATH -u "$shortmode_path"`
17730      new_path="$input_path"
17731    fi
17732  fi
17733
17734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17735  if test "x$test_cygdrive_prefix" = x; then
17736    # As a simple fix, exclude /usr/bin since it's not a real path.
17737    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17739      # a path prefixed by /cygdrive for fixpath to work.
17740      new_path="$CYGWIN_ROOT_PATH$input_path"
17741    fi
17742  fi
17743
17744  # remove trailing .exe if any
17745  new_path="${new_path/%.exe/}"
17746
17747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17748
17749  # First separate the path from the arguments. This will split at the first
17750  # space.
17751  complete="$FOUND_MAKE"
17752  path="${complete%% *}"
17753  tmp="$complete EOL"
17754  arguments="${tmp#* }"
17755
17756  # Input might be given as Windows format, start by converting to
17757  # unix format.
17758  new_path="$path"
17759
17760  windows_path="$new_path"
17761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17762    unix_path=`$CYGPATH -u "$windows_path"`
17763    new_path="$unix_path"
17764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17766    new_path="$unix_path"
17767  fi
17768
17769
17770  # Now try to locate executable using which
17771  new_path=`$WHICH "$new_path" 2> /dev/null`
17772
17773  if test "x$new_path" = x; then
17774    # Oops. Which didn't find the executable.
17775    # The splitting of arguments from the executable at a space might have been incorrect,
17776    # since paths with space are more likely in Windows. Give it another try with the whole
17777    # argument.
17778    path="$complete"
17779    arguments="EOL"
17780    new_path="$path"
17781
17782  windows_path="$new_path"
17783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17784    unix_path=`$CYGPATH -u "$windows_path"`
17785    new_path="$unix_path"
17786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17788    new_path="$unix_path"
17789  fi
17790
17791
17792    new_path=`$WHICH "$new_path" 2> /dev/null`
17793    # bat and cmd files are not always considered executable in MSYS causing which
17794    # to not find them
17795    if test "x$new_path" = x \
17796        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17797        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17798      new_path="$path"
17799
17800  windows_path="$new_path"
17801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17802    unix_path=`$CYGPATH -u "$windows_path"`
17803    new_path="$unix_path"
17804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17806    new_path="$unix_path"
17807  fi
17808
17809    fi
17810
17811    if test "x$new_path" = x; then
17812      # It's still not found. Now this is an unrecoverable error.
17813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17814$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17815      has_space=`$ECHO "$complete" | $GREP " "`
17816      if test "x$has_space" != x; then
17817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17819      fi
17820      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17821    fi
17822  fi
17823
17824  # Now new_path has a complete unix path to the binary
17825  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17826    # Keep paths in /bin as-is, but remove trailing .exe if any
17827    new_path="${new_path/%.exe/}"
17828    # Do not save /bin paths to all_fixpath_prefixes!
17829  else
17830    # Not in mixed or Windows style, start by that.
17831    new_path=`cmd //c echo $new_path`
17832
17833  input_path="$new_path"
17834  # Check if we need to convert this using DOS-style short mode. If the path
17835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17836  # take no chances and rewrite it.
17837  # Note: m4 eats our [], so we need to use [ and ] instead.
17838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17839  if test "x$has_forbidden_chars" != x; then
17840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17842  fi
17843
17844    # Output is in $new_path
17845
17846  windows_path="$new_path"
17847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17848    unix_path=`$CYGPATH -u "$windows_path"`
17849    new_path="$unix_path"
17850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17852    new_path="$unix_path"
17853  fi
17854
17855    # remove trailing .exe if any
17856    new_path="${new_path/%.exe/}"
17857
17858    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17859    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17860  fi
17861
17862    else
17863      # We're on a unix platform. Hooray! :)
17864      # First separate the path from the arguments. This will split at the first
17865      # space.
17866      complete="$FOUND_MAKE"
17867      path="${complete%% *}"
17868      tmp="$complete EOL"
17869      arguments="${tmp#* }"
17870
17871      # Cannot rely on the command "which" here since it doesn't always work.
17872      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17873      if test -z "$is_absolute_path"; then
17874        # Path to executable is not absolute. Find it.
17875        IFS_save="$IFS"
17876        IFS=:
17877        for p in $PATH; do
17878          if test -f "$p/$path" && test -x "$p/$path"; then
17879            new_path="$p/$path"
17880            break
17881          fi
17882        done
17883        IFS="$IFS_save"
17884      else
17885        # This is an absolute path, we can use it without further modifications.
17886        new_path="$path"
17887      fi
17888
17889      if test "x$new_path" = x; then
17890        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17891$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17892        has_space=`$ECHO "$complete" | $GREP " "`
17893        if test "x$has_space" != x; then
17894          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17895$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17896        fi
17897        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17898      fi
17899    fi
17900
17901    # Now join together the path and the arguments once again
17902    if test "x$arguments" != xEOL; then
17903      new_complete="$new_path ${arguments% *}"
17904    else
17905      new_complete="$new_path"
17906    fi
17907
17908    if test "x$complete" != "x$new_complete"; then
17909      FOUND_MAKE="$new_complete"
17910      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17911$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17912    fi
17913  fi
17914
17915        fi
17916      fi
17917    fi
17918  fi
17919
17920
17921    if test "x$FOUND_MAKE" = x; then
17922      for ac_prog in make
17923do
17924  # Extract the first word of "$ac_prog", so it can be a program name with args.
17925set dummy $ac_prog; ac_word=$2
17926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17927$as_echo_n "checking for $ac_word... " >&6; }
17928if ${ac_cv_path_CHECK_MAKE+:} false; then :
17929  $as_echo_n "(cached) " >&6
17930else
17931  case $CHECK_MAKE in
17932  [\\/]* | ?:[\\/]*)
17933  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17934  ;;
17935  *)
17936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17937for as_dir in $PATH
17938do
17939  IFS=$as_save_IFS
17940  test -z "$as_dir" && as_dir=.
17941    for ac_exec_ext in '' $ac_executable_extensions; do
17942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17943    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17945    break 2
17946  fi
17947done
17948  done
17949IFS=$as_save_IFS
17950
17951  ;;
17952esac
17953fi
17954CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17955if test -n "$CHECK_MAKE"; then
17956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17957$as_echo "$CHECK_MAKE" >&6; }
17958else
17959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17960$as_echo "no" >&6; }
17961fi
17962
17963
17964  test -n "$CHECK_MAKE" && break
17965done
17966
17967
17968  MAKE_CANDIDATE=""$CHECK_MAKE""
17969  DESCRIPTION="make in PATH"
17970
17971  # On Cygwin, we require a newer version of make than on other platforms
17972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17973    MAKE_VERSION_EXPR="-e 4\."
17974    MAKE_REQUIRED_VERSION="4.0"
17975   else
17976    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17977    MAKE_REQUIRED_VERSION="3.81"
17978  fi
17979
17980  if test "x$MAKE_CANDIDATE" != x; then
17981    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17982$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17983    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17984    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17985    if test "x$IS_GNU_MAKE" = x; then
17986      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17987$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17988    else
17989      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17990      if test "x$IS_MODERN_MAKE" = x; then
17991        { $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
17992$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;}
17993      else
17994        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17995          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17996            MAKE_EXPECTED_ENV='cygwin'
17997          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17998            MAKE_EXPECTED_ENV='msys'
17999          else
18000            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18001          fi
18002          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18003          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18004        else
18005          # Not relevant for non-Windows
18006          IS_MAKE_CORRECT_ENV=true
18007        fi
18008        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18009          { $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
18010$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;}
18011        else
18012          FOUND_MAKE=$MAKE_CANDIDATE
18013
18014  # Only process if variable expands to non-empty
18015
18016  if test "x$FOUND_MAKE" != x; then
18017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18018
18019  # First separate the path from the arguments. This will split at the first
18020  # space.
18021  complete="$FOUND_MAKE"
18022  path="${complete%% *}"
18023  tmp="$complete EOL"
18024  arguments="${tmp#* }"
18025
18026  # Input might be given as Windows format, start by converting to
18027  # unix format.
18028  new_path=`$CYGPATH -u "$path"`
18029
18030  # Now try to locate executable using which
18031  new_path=`$WHICH "$new_path" 2> /dev/null`
18032  # bat and cmd files are not always considered executable in cygwin causing which
18033  # to not find them
18034  if test "x$new_path" = x \
18035      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18036      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18037    new_path=`$CYGPATH -u "$path"`
18038  fi
18039  if test "x$new_path" = x; then
18040    # Oops. Which didn't find the executable.
18041    # The splitting of arguments from the executable at a space might have been incorrect,
18042    # since paths with space are more likely in Windows. Give it another try with the whole
18043    # argument.
18044    path="$complete"
18045    arguments="EOL"
18046    new_path=`$CYGPATH -u "$path"`
18047    new_path=`$WHICH "$new_path" 2> /dev/null`
18048    # bat and cmd files are not always considered executable in cygwin causing which
18049    # to not find them
18050    if test "x$new_path" = x \
18051        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18052        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18053      new_path=`$CYGPATH -u "$path"`
18054    fi
18055    if test "x$new_path" = x; then
18056      # It's still not found. Now this is an unrecoverable error.
18057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18058$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18059      has_space=`$ECHO "$complete" | $GREP " "`
18060      if test "x$has_space" != x; then
18061        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18062$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18063      fi
18064      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18065    fi
18066  fi
18067
18068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18071  # "foo.exe" is OK but "foo" is an error.
18072  #
18073  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18074  # It is also a way to make sure we got the proper file name for the real test later on.
18075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18076  if test "x$test_shortpath" = x; then
18077    # Short path failed, file does not exist as specified.
18078    # Try adding .exe or .cmd
18079    if test -f "${new_path}.exe"; then
18080      input_to_shortpath="${new_path}.exe"
18081    elif test -f "${new_path}.cmd"; then
18082      input_to_shortpath="${new_path}.cmd"
18083    else
18084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18085$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18086      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18087$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18088      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18089    fi
18090  else
18091    input_to_shortpath="$new_path"
18092  fi
18093
18094  # Call helper function which possibly converts this using DOS-style short mode.
18095  # If so, the updated path is stored in $new_path.
18096  new_path="$input_to_shortpath"
18097
18098  input_path="$input_to_shortpath"
18099  # Check if we need to convert this using DOS-style short mode. If the path
18100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18101  # take no chances and rewrite it.
18102  # Note: m4 eats our [], so we need to use [ and ] instead.
18103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18104  if test "x$has_forbidden_chars" != x; then
18105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18109      # Going to short mode and back again did indeed matter. Since short mode is
18110      # case insensitive, let's make it lowercase to improve readability.
18111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18112      # Now convert it back to Unix-style (cygpath)
18113      input_path=`$CYGPATH -u "$shortmode_path"`
18114      new_path="$input_path"
18115    fi
18116  fi
18117
18118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18119  if test "x$test_cygdrive_prefix" = x; then
18120    # As a simple fix, exclude /usr/bin since it's not a real path.
18121    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18123      # a path prefixed by /cygdrive for fixpath to work.
18124      new_path="$CYGWIN_ROOT_PATH$input_path"
18125    fi
18126  fi
18127
18128  # remove trailing .exe if any
18129  new_path="${new_path/%.exe/}"
18130
18131    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18132
18133  # First separate the path from the arguments. This will split at the first
18134  # space.
18135  complete="$FOUND_MAKE"
18136  path="${complete%% *}"
18137  tmp="$complete EOL"
18138  arguments="${tmp#* }"
18139
18140  # Input might be given as Windows format, start by converting to
18141  # unix format.
18142  new_path="$path"
18143
18144  windows_path="$new_path"
18145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18146    unix_path=`$CYGPATH -u "$windows_path"`
18147    new_path="$unix_path"
18148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18150    new_path="$unix_path"
18151  fi
18152
18153
18154  # Now try to locate executable using which
18155  new_path=`$WHICH "$new_path" 2> /dev/null`
18156
18157  if test "x$new_path" = x; then
18158    # Oops. Which didn't find the executable.
18159    # The splitting of arguments from the executable at a space might have been incorrect,
18160    # since paths with space are more likely in Windows. Give it another try with the whole
18161    # argument.
18162    path="$complete"
18163    arguments="EOL"
18164    new_path="$path"
18165
18166  windows_path="$new_path"
18167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18168    unix_path=`$CYGPATH -u "$windows_path"`
18169    new_path="$unix_path"
18170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18172    new_path="$unix_path"
18173  fi
18174
18175
18176    new_path=`$WHICH "$new_path" 2> /dev/null`
18177    # bat and cmd files are not always considered executable in MSYS causing which
18178    # to not find them
18179    if test "x$new_path" = x \
18180        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18181        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18182      new_path="$path"
18183
18184  windows_path="$new_path"
18185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18186    unix_path=`$CYGPATH -u "$windows_path"`
18187    new_path="$unix_path"
18188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18190    new_path="$unix_path"
18191  fi
18192
18193    fi
18194
18195    if test "x$new_path" = x; then
18196      # It's still not found. Now this is an unrecoverable error.
18197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18198$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18199      has_space=`$ECHO "$complete" | $GREP " "`
18200      if test "x$has_space" != x; then
18201        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18202$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18203      fi
18204      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18205    fi
18206  fi
18207
18208  # Now new_path has a complete unix path to the binary
18209  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18210    # Keep paths in /bin as-is, but remove trailing .exe if any
18211    new_path="${new_path/%.exe/}"
18212    # Do not save /bin paths to all_fixpath_prefixes!
18213  else
18214    # Not in mixed or Windows style, start by that.
18215    new_path=`cmd //c echo $new_path`
18216
18217  input_path="$new_path"
18218  # Check if we need to convert this using DOS-style short mode. If the path
18219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18220  # take no chances and rewrite it.
18221  # Note: m4 eats our [], so we need to use [ and ] instead.
18222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18223  if test "x$has_forbidden_chars" != x; then
18224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18225    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18226  fi
18227
18228    # Output is in $new_path
18229
18230  windows_path="$new_path"
18231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18232    unix_path=`$CYGPATH -u "$windows_path"`
18233    new_path="$unix_path"
18234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18236    new_path="$unix_path"
18237  fi
18238
18239    # remove trailing .exe if any
18240    new_path="${new_path/%.exe/}"
18241
18242    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18243    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18244  fi
18245
18246    else
18247      # We're on a unix platform. Hooray! :)
18248      # First separate the path from the arguments. This will split at the first
18249      # space.
18250      complete="$FOUND_MAKE"
18251      path="${complete%% *}"
18252      tmp="$complete EOL"
18253      arguments="${tmp#* }"
18254
18255      # Cannot rely on the command "which" here since it doesn't always work.
18256      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18257      if test -z "$is_absolute_path"; then
18258        # Path to executable is not absolute. Find it.
18259        IFS_save="$IFS"
18260        IFS=:
18261        for p in $PATH; do
18262          if test -f "$p/$path" && test -x "$p/$path"; then
18263            new_path="$p/$path"
18264            break
18265          fi
18266        done
18267        IFS="$IFS_save"
18268      else
18269        # This is an absolute path, we can use it without further modifications.
18270        new_path="$path"
18271      fi
18272
18273      if test "x$new_path" = x; then
18274        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18275$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18276        has_space=`$ECHO "$complete" | $GREP " "`
18277        if test "x$has_space" != x; then
18278          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18279$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18280        fi
18281        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18282      fi
18283    fi
18284
18285    # Now join together the path and the arguments once again
18286    if test "x$arguments" != xEOL; then
18287      new_complete="$new_path ${arguments% *}"
18288    else
18289      new_complete="$new_path"
18290    fi
18291
18292    if test "x$complete" != "x$new_complete"; then
18293      FOUND_MAKE="$new_complete"
18294      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18295$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18296    fi
18297  fi
18298
18299        fi
18300      fi
18301    fi
18302  fi
18303
18304    fi
18305
18306    if test "x$FOUND_MAKE" = x; then
18307      if test "x$TOOLCHAIN_PATH" != x; then
18308        # We have a toolchain path, check that as well before giving up.
18309        OLD_PATH=$PATH
18310        PATH=$TOOLCHAIN_PATH:$PATH
18311        for ac_prog in gmake
18312do
18313  # Extract the first word of "$ac_prog", so it can be a program name with args.
18314set dummy $ac_prog; ac_word=$2
18315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18316$as_echo_n "checking for $ac_word... " >&6; }
18317if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18318  $as_echo_n "(cached) " >&6
18319else
18320  case $CHECK_TOOLSDIR_GMAKE in
18321  [\\/]* | ?:[\\/]*)
18322  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18323  ;;
18324  *)
18325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18326for as_dir in $PATH
18327do
18328  IFS=$as_save_IFS
18329  test -z "$as_dir" && as_dir=.
18330    for ac_exec_ext in '' $ac_executable_extensions; do
18331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18332    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18334    break 2
18335  fi
18336done
18337  done
18338IFS=$as_save_IFS
18339
18340  ;;
18341esac
18342fi
18343CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18344if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18346$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18347else
18348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18349$as_echo "no" >&6; }
18350fi
18351
18352
18353  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18354done
18355
18356
18357  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18358  DESCRIPTION="gmake in tools-dir"
18359
18360  # On Cygwin, we require a newer version of make than on other platforms
18361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18362    MAKE_VERSION_EXPR="-e 4\."
18363    MAKE_REQUIRED_VERSION="4.0"
18364   else
18365    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18366    MAKE_REQUIRED_VERSION="3.81"
18367  fi
18368
18369  if test "x$MAKE_CANDIDATE" != x; then
18370    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18371$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18372    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18373    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18374    if test "x$IS_GNU_MAKE" = x; then
18375      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18376$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18377    else
18378      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18379      if test "x$IS_MODERN_MAKE" = x; then
18380        { $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
18381$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;}
18382      else
18383        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18384          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18385            MAKE_EXPECTED_ENV='cygwin'
18386          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18387            MAKE_EXPECTED_ENV='msys'
18388          else
18389            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18390          fi
18391          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18392          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18393        else
18394          # Not relevant for non-Windows
18395          IS_MAKE_CORRECT_ENV=true
18396        fi
18397        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18398          { $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
18399$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;}
18400        else
18401          FOUND_MAKE=$MAKE_CANDIDATE
18402
18403  # Only process if variable expands to non-empty
18404
18405  if test "x$FOUND_MAKE" != x; then
18406    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18407
18408  # First separate the path from the arguments. This will split at the first
18409  # space.
18410  complete="$FOUND_MAKE"
18411  path="${complete%% *}"
18412  tmp="$complete EOL"
18413  arguments="${tmp#* }"
18414
18415  # Input might be given as Windows format, start by converting to
18416  # unix format.
18417  new_path=`$CYGPATH -u "$path"`
18418
18419  # Now try to locate executable using which
18420  new_path=`$WHICH "$new_path" 2> /dev/null`
18421  # bat and cmd files are not always considered executable in cygwin causing which
18422  # to not find them
18423  if test "x$new_path" = x \
18424      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18425      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18426    new_path=`$CYGPATH -u "$path"`
18427  fi
18428  if test "x$new_path" = x; then
18429    # Oops. Which didn't find the executable.
18430    # The splitting of arguments from the executable at a space might have been incorrect,
18431    # since paths with space are more likely in Windows. Give it another try with the whole
18432    # argument.
18433    path="$complete"
18434    arguments="EOL"
18435    new_path=`$CYGPATH -u "$path"`
18436    new_path=`$WHICH "$new_path" 2> /dev/null`
18437    # bat and cmd files are not always considered executable in cygwin causing which
18438    # to not find them
18439    if test "x$new_path" = x \
18440        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18441        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18442      new_path=`$CYGPATH -u "$path"`
18443    fi
18444    if test "x$new_path" = x; then
18445      # It's still not found. Now this is an unrecoverable error.
18446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18447$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18448      has_space=`$ECHO "$complete" | $GREP " "`
18449      if test "x$has_space" != x; then
18450        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18451$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18452      fi
18453      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18454    fi
18455  fi
18456
18457  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18458  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18459  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18460  # "foo.exe" is OK but "foo" is an error.
18461  #
18462  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18463  # It is also a way to make sure we got the proper file name for the real test later on.
18464  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18465  if test "x$test_shortpath" = x; then
18466    # Short path failed, file does not exist as specified.
18467    # Try adding .exe or .cmd
18468    if test -f "${new_path}.exe"; then
18469      input_to_shortpath="${new_path}.exe"
18470    elif test -f "${new_path}.cmd"; then
18471      input_to_shortpath="${new_path}.cmd"
18472    else
18473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18474$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18475      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18476$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18477      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18478    fi
18479  else
18480    input_to_shortpath="$new_path"
18481  fi
18482
18483  # Call helper function which possibly converts this using DOS-style short mode.
18484  # If so, the updated path is stored in $new_path.
18485  new_path="$input_to_shortpath"
18486
18487  input_path="$input_to_shortpath"
18488  # Check if we need to convert this using DOS-style short mode. If the path
18489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18490  # take no chances and rewrite it.
18491  # Note: m4 eats our [], so we need to use [ and ] instead.
18492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18493  if test "x$has_forbidden_chars" != x; then
18494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18495    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18496    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18497    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18498      # Going to short mode and back again did indeed matter. Since short mode is
18499      # case insensitive, let's make it lowercase to improve readability.
18500      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18501      # Now convert it back to Unix-style (cygpath)
18502      input_path=`$CYGPATH -u "$shortmode_path"`
18503      new_path="$input_path"
18504    fi
18505  fi
18506
18507  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18508  if test "x$test_cygdrive_prefix" = x; then
18509    # As a simple fix, exclude /usr/bin since it's not a real path.
18510    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18511      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18512      # a path prefixed by /cygdrive for fixpath to work.
18513      new_path="$CYGWIN_ROOT_PATH$input_path"
18514    fi
18515  fi
18516
18517  # remove trailing .exe if any
18518  new_path="${new_path/%.exe/}"
18519
18520    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18521
18522  # First separate the path from the arguments. This will split at the first
18523  # space.
18524  complete="$FOUND_MAKE"
18525  path="${complete%% *}"
18526  tmp="$complete EOL"
18527  arguments="${tmp#* }"
18528
18529  # Input might be given as Windows format, start by converting to
18530  # unix format.
18531  new_path="$path"
18532
18533  windows_path="$new_path"
18534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18535    unix_path=`$CYGPATH -u "$windows_path"`
18536    new_path="$unix_path"
18537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18539    new_path="$unix_path"
18540  fi
18541
18542
18543  # Now try to locate executable using which
18544  new_path=`$WHICH "$new_path" 2> /dev/null`
18545
18546  if test "x$new_path" = x; then
18547    # Oops. Which didn't find the executable.
18548    # The splitting of arguments from the executable at a space might have been incorrect,
18549    # since paths with space are more likely in Windows. Give it another try with the whole
18550    # argument.
18551    path="$complete"
18552    arguments="EOL"
18553    new_path="$path"
18554
18555  windows_path="$new_path"
18556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18557    unix_path=`$CYGPATH -u "$windows_path"`
18558    new_path="$unix_path"
18559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18561    new_path="$unix_path"
18562  fi
18563
18564
18565    new_path=`$WHICH "$new_path" 2> /dev/null`
18566    # bat and cmd files are not always considered executable in MSYS causing which
18567    # to not find them
18568    if test "x$new_path" = x \
18569        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18570        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18571      new_path="$path"
18572
18573  windows_path="$new_path"
18574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18575    unix_path=`$CYGPATH -u "$windows_path"`
18576    new_path="$unix_path"
18577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18579    new_path="$unix_path"
18580  fi
18581
18582    fi
18583
18584    if test "x$new_path" = x; then
18585      # It's still not found. Now this is an unrecoverable error.
18586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18587$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18588      has_space=`$ECHO "$complete" | $GREP " "`
18589      if test "x$has_space" != x; then
18590        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18591$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18592      fi
18593      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18594    fi
18595  fi
18596
18597  # Now new_path has a complete unix path to the binary
18598  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18599    # Keep paths in /bin as-is, but remove trailing .exe if any
18600    new_path="${new_path/%.exe/}"
18601    # Do not save /bin paths to all_fixpath_prefixes!
18602  else
18603    # Not in mixed or Windows style, start by that.
18604    new_path=`cmd //c echo $new_path`
18605
18606  input_path="$new_path"
18607  # Check if we need to convert this using DOS-style short mode. If the path
18608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18609  # take no chances and rewrite it.
18610  # Note: m4 eats our [], so we need to use [ and ] instead.
18611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18612  if test "x$has_forbidden_chars" != x; then
18613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18615  fi
18616
18617    # Output is in $new_path
18618
18619  windows_path="$new_path"
18620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18621    unix_path=`$CYGPATH -u "$windows_path"`
18622    new_path="$unix_path"
18623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18625    new_path="$unix_path"
18626  fi
18627
18628    # remove trailing .exe if any
18629    new_path="${new_path/%.exe/}"
18630
18631    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18632    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18633  fi
18634
18635    else
18636      # We're on a unix platform. Hooray! :)
18637      # First separate the path from the arguments. This will split at the first
18638      # space.
18639      complete="$FOUND_MAKE"
18640      path="${complete%% *}"
18641      tmp="$complete EOL"
18642      arguments="${tmp#* }"
18643
18644      # Cannot rely on the command "which" here since it doesn't always work.
18645      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18646      if test -z "$is_absolute_path"; then
18647        # Path to executable is not absolute. Find it.
18648        IFS_save="$IFS"
18649        IFS=:
18650        for p in $PATH; do
18651          if test -f "$p/$path" && test -x "$p/$path"; then
18652            new_path="$p/$path"
18653            break
18654          fi
18655        done
18656        IFS="$IFS_save"
18657      else
18658        # This is an absolute path, we can use it without further modifications.
18659        new_path="$path"
18660      fi
18661
18662      if test "x$new_path" = x; then
18663        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18664$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18665        has_space=`$ECHO "$complete" | $GREP " "`
18666        if test "x$has_space" != x; then
18667          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18668$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18669        fi
18670        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18671      fi
18672    fi
18673
18674    # Now join together the path and the arguments once again
18675    if test "x$arguments" != xEOL; then
18676      new_complete="$new_path ${arguments% *}"
18677    else
18678      new_complete="$new_path"
18679    fi
18680
18681    if test "x$complete" != "x$new_complete"; then
18682      FOUND_MAKE="$new_complete"
18683      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18684$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18685    fi
18686  fi
18687
18688        fi
18689      fi
18690    fi
18691  fi
18692
18693        if test "x$FOUND_MAKE" = x; then
18694          for ac_prog in make
18695do
18696  # Extract the first word of "$ac_prog", so it can be a program name with args.
18697set dummy $ac_prog; ac_word=$2
18698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18699$as_echo_n "checking for $ac_word... " >&6; }
18700if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18701  $as_echo_n "(cached) " >&6
18702else
18703  case $CHECK_TOOLSDIR_MAKE in
18704  [\\/]* | ?:[\\/]*)
18705  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18706  ;;
18707  *)
18708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18709for as_dir in $PATH
18710do
18711  IFS=$as_save_IFS
18712  test -z "$as_dir" && as_dir=.
18713    for ac_exec_ext in '' $ac_executable_extensions; do
18714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18715    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18717    break 2
18718  fi
18719done
18720  done
18721IFS=$as_save_IFS
18722
18723  ;;
18724esac
18725fi
18726CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18727if test -n "$CHECK_TOOLSDIR_MAKE"; then
18728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18729$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18730else
18731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18732$as_echo "no" >&6; }
18733fi
18734
18735
18736  test -n "$CHECK_TOOLSDIR_MAKE" && break
18737done
18738
18739
18740  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18741  DESCRIPTION="make in tools-dir"
18742
18743  # On Cygwin, we require a newer version of make than on other platforms
18744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18745    MAKE_VERSION_EXPR="-e 4\."
18746    MAKE_REQUIRED_VERSION="4.0"
18747   else
18748    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18749    MAKE_REQUIRED_VERSION="3.81"
18750  fi
18751
18752  if test "x$MAKE_CANDIDATE" != x; then
18753    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18754$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18755    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18756    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18757    if test "x$IS_GNU_MAKE" = x; then
18758      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18759$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18760    else
18761      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18762      if test "x$IS_MODERN_MAKE" = x; then
18763        { $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
18764$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;}
18765      else
18766        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18767          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18768            MAKE_EXPECTED_ENV='cygwin'
18769          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18770            MAKE_EXPECTED_ENV='msys'
18771          else
18772            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18773          fi
18774          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18775          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18776        else
18777          # Not relevant for non-Windows
18778          IS_MAKE_CORRECT_ENV=true
18779        fi
18780        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18781          { $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
18782$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;}
18783        else
18784          FOUND_MAKE=$MAKE_CANDIDATE
18785
18786  # Only process if variable expands to non-empty
18787
18788  if test "x$FOUND_MAKE" != x; then
18789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18790
18791  # First separate the path from the arguments. This will split at the first
18792  # space.
18793  complete="$FOUND_MAKE"
18794  path="${complete%% *}"
18795  tmp="$complete EOL"
18796  arguments="${tmp#* }"
18797
18798  # Input might be given as Windows format, start by converting to
18799  # unix format.
18800  new_path=`$CYGPATH -u "$path"`
18801
18802  # Now try to locate executable using which
18803  new_path=`$WHICH "$new_path" 2> /dev/null`
18804  # bat and cmd files are not always considered executable in cygwin causing which
18805  # to not find them
18806  if test "x$new_path" = x \
18807      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18808      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18809    new_path=`$CYGPATH -u "$path"`
18810  fi
18811  if test "x$new_path" = x; then
18812    # Oops. Which didn't find the executable.
18813    # The splitting of arguments from the executable at a space might have been incorrect,
18814    # since paths with space are more likely in Windows. Give it another try with the whole
18815    # argument.
18816    path="$complete"
18817    arguments="EOL"
18818    new_path=`$CYGPATH -u "$path"`
18819    new_path=`$WHICH "$new_path" 2> /dev/null`
18820    # bat and cmd files are not always considered executable in cygwin causing which
18821    # to not find them
18822    if test "x$new_path" = x \
18823        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18824        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18825      new_path=`$CYGPATH -u "$path"`
18826    fi
18827    if test "x$new_path" = x; then
18828      # It's still not found. Now this is an unrecoverable error.
18829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18830$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18831      has_space=`$ECHO "$complete" | $GREP " "`
18832      if test "x$has_space" != x; then
18833        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18834$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18835      fi
18836      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18837    fi
18838  fi
18839
18840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18843  # "foo.exe" is OK but "foo" is an error.
18844  #
18845  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18846  # It is also a way to make sure we got the proper file name for the real test later on.
18847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18848  if test "x$test_shortpath" = x; then
18849    # Short path failed, file does not exist as specified.
18850    # Try adding .exe or .cmd
18851    if test -f "${new_path}.exe"; then
18852      input_to_shortpath="${new_path}.exe"
18853    elif test -f "${new_path}.cmd"; then
18854      input_to_shortpath="${new_path}.cmd"
18855    else
18856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18857$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18858      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18859$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18860      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18861    fi
18862  else
18863    input_to_shortpath="$new_path"
18864  fi
18865
18866  # Call helper function which possibly converts this using DOS-style short mode.
18867  # If so, the updated path is stored in $new_path.
18868  new_path="$input_to_shortpath"
18869
18870  input_path="$input_to_shortpath"
18871  # Check if we need to convert this using DOS-style short mode. If the path
18872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18873  # take no chances and rewrite it.
18874  # Note: m4 eats our [], so we need to use [ and ] instead.
18875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18876  if test "x$has_forbidden_chars" != x; then
18877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18881      # Going to short mode and back again did indeed matter. Since short mode is
18882      # case insensitive, let's make it lowercase to improve readability.
18883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18884      # Now convert it back to Unix-style (cygpath)
18885      input_path=`$CYGPATH -u "$shortmode_path"`
18886      new_path="$input_path"
18887    fi
18888  fi
18889
18890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18891  if test "x$test_cygdrive_prefix" = x; then
18892    # As a simple fix, exclude /usr/bin since it's not a real path.
18893    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18895      # a path prefixed by /cygdrive for fixpath to work.
18896      new_path="$CYGWIN_ROOT_PATH$input_path"
18897    fi
18898  fi
18899
18900  # remove trailing .exe if any
18901  new_path="${new_path/%.exe/}"
18902
18903    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18904
18905  # First separate the path from the arguments. This will split at the first
18906  # space.
18907  complete="$FOUND_MAKE"
18908  path="${complete%% *}"
18909  tmp="$complete EOL"
18910  arguments="${tmp#* }"
18911
18912  # Input might be given as Windows format, start by converting to
18913  # unix format.
18914  new_path="$path"
18915
18916  windows_path="$new_path"
18917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18918    unix_path=`$CYGPATH -u "$windows_path"`
18919    new_path="$unix_path"
18920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18922    new_path="$unix_path"
18923  fi
18924
18925
18926  # Now try to locate executable using which
18927  new_path=`$WHICH "$new_path" 2> /dev/null`
18928
18929  if test "x$new_path" = x; then
18930    # Oops. Which didn't find the executable.
18931    # The splitting of arguments from the executable at a space might have been incorrect,
18932    # since paths with space are more likely in Windows. Give it another try with the whole
18933    # argument.
18934    path="$complete"
18935    arguments="EOL"
18936    new_path="$path"
18937
18938  windows_path="$new_path"
18939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18940    unix_path=`$CYGPATH -u "$windows_path"`
18941    new_path="$unix_path"
18942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18944    new_path="$unix_path"
18945  fi
18946
18947
18948    new_path=`$WHICH "$new_path" 2> /dev/null`
18949    # bat and cmd files are not always considered executable in MSYS causing which
18950    # to not find them
18951    if test "x$new_path" = x \
18952        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18953        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18954      new_path="$path"
18955
18956  windows_path="$new_path"
18957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18958    unix_path=`$CYGPATH -u "$windows_path"`
18959    new_path="$unix_path"
18960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18962    new_path="$unix_path"
18963  fi
18964
18965    fi
18966
18967    if test "x$new_path" = x; then
18968      # It's still not found. Now this is an unrecoverable error.
18969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18970$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18971      has_space=`$ECHO "$complete" | $GREP " "`
18972      if test "x$has_space" != x; then
18973        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18974$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18975      fi
18976      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18977    fi
18978  fi
18979
18980  # Now new_path has a complete unix path to the binary
18981  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18982    # Keep paths in /bin as-is, but remove trailing .exe if any
18983    new_path="${new_path/%.exe/}"
18984    # Do not save /bin paths to all_fixpath_prefixes!
18985  else
18986    # Not in mixed or Windows style, start by that.
18987    new_path=`cmd //c echo $new_path`
18988
18989  input_path="$new_path"
18990  # Check if we need to convert this using DOS-style short mode. If the path
18991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18992  # take no chances and rewrite it.
18993  # Note: m4 eats our [], so we need to use [ and ] instead.
18994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18995  if test "x$has_forbidden_chars" != x; then
18996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18998  fi
18999
19000    # Output is in $new_path
19001
19002  windows_path="$new_path"
19003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19004    unix_path=`$CYGPATH -u "$windows_path"`
19005    new_path="$unix_path"
19006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19008    new_path="$unix_path"
19009  fi
19010
19011    # remove trailing .exe if any
19012    new_path="${new_path/%.exe/}"
19013
19014    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19015    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19016  fi
19017
19018    else
19019      # We're on a unix platform. Hooray! :)
19020      # First separate the path from the arguments. This will split at the first
19021      # space.
19022      complete="$FOUND_MAKE"
19023      path="${complete%% *}"
19024      tmp="$complete EOL"
19025      arguments="${tmp#* }"
19026
19027      # Cannot rely on the command "which" here since it doesn't always work.
19028      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19029      if test -z "$is_absolute_path"; then
19030        # Path to executable is not absolute. Find it.
19031        IFS_save="$IFS"
19032        IFS=:
19033        for p in $PATH; do
19034          if test -f "$p/$path" && test -x "$p/$path"; then
19035            new_path="$p/$path"
19036            break
19037          fi
19038        done
19039        IFS="$IFS_save"
19040      else
19041        # This is an absolute path, we can use it without further modifications.
19042        new_path="$path"
19043      fi
19044
19045      if test "x$new_path" = x; then
19046        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19047$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19048        has_space=`$ECHO "$complete" | $GREP " "`
19049        if test "x$has_space" != x; then
19050          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19051$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19052        fi
19053        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19054      fi
19055    fi
19056
19057    # Now join together the path and the arguments once again
19058    if test "x$arguments" != xEOL; then
19059      new_complete="$new_path ${arguments% *}"
19060    else
19061      new_complete="$new_path"
19062    fi
19063
19064    if test "x$complete" != "x$new_complete"; then
19065      FOUND_MAKE="$new_complete"
19066      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19067$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19068    fi
19069  fi
19070
19071        fi
19072      fi
19073    fi
19074  fi
19075
19076        fi
19077        PATH=$OLD_PATH
19078      fi
19079    fi
19080
19081    if test "x$FOUND_MAKE" = x; then
19082      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
19083    fi
19084
19085  else
19086    # The variable is set, but is it from the command line or the environment?
19087
19088    # Try to remove the string !MAKE! from our list.
19089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19091      # If it failed, the variable was not from the command line. Ignore it,
19092      # but warn the user (except for BASH, which is always set by the calling BASH).
19093      if test "xMAKE" != xBASH; then
19094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19095$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19096      fi
19097      # Try to locate tool using the code snippet
19098
19099    # Try our hardest to locate a correct version of GNU make
19100    for ac_prog in gmake
19101do
19102  # Extract the first word of "$ac_prog", so it can be a program name with args.
19103set dummy $ac_prog; ac_word=$2
19104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19105$as_echo_n "checking for $ac_word... " >&6; }
19106if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19107  $as_echo_n "(cached) " >&6
19108else
19109  case $CHECK_GMAKE in
19110  [\\/]* | ?:[\\/]*)
19111  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19112  ;;
19113  *)
19114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19115for as_dir in $PATH
19116do
19117  IFS=$as_save_IFS
19118  test -z "$as_dir" && as_dir=.
19119    for ac_exec_ext in '' $ac_executable_extensions; do
19120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19121    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19123    break 2
19124  fi
19125done
19126  done
19127IFS=$as_save_IFS
19128
19129  ;;
19130esac
19131fi
19132CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19133if test -n "$CHECK_GMAKE"; then
19134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19135$as_echo "$CHECK_GMAKE" >&6; }
19136else
19137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19138$as_echo "no" >&6; }
19139fi
19140
19141
19142  test -n "$CHECK_GMAKE" && break
19143done
19144
19145
19146  MAKE_CANDIDATE=""$CHECK_GMAKE""
19147  DESCRIPTION="gmake in PATH"
19148
19149  # On Cygwin, we require a newer version of make than on other platforms
19150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19151    MAKE_VERSION_EXPR="-e 4\."
19152    MAKE_REQUIRED_VERSION="4.0"
19153   else
19154    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19155    MAKE_REQUIRED_VERSION="3.81"
19156  fi
19157
19158  if test "x$MAKE_CANDIDATE" != x; then
19159    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19160$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19161    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19162    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19163    if test "x$IS_GNU_MAKE" = x; then
19164      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19165$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19166    else
19167      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19168      if test "x$IS_MODERN_MAKE" = x; then
19169        { $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
19170$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;}
19171      else
19172        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19173          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19174            MAKE_EXPECTED_ENV='cygwin'
19175          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19176            MAKE_EXPECTED_ENV='msys'
19177          else
19178            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19179          fi
19180          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19181          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19182        else
19183          # Not relevant for non-Windows
19184          IS_MAKE_CORRECT_ENV=true
19185        fi
19186        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19187          { $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
19188$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;}
19189        else
19190          FOUND_MAKE=$MAKE_CANDIDATE
19191
19192  # Only process if variable expands to non-empty
19193
19194  if test "x$FOUND_MAKE" != x; then
19195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19196
19197  # First separate the path from the arguments. This will split at the first
19198  # space.
19199  complete="$FOUND_MAKE"
19200  path="${complete%% *}"
19201  tmp="$complete EOL"
19202  arguments="${tmp#* }"
19203
19204  # Input might be given as Windows format, start by converting to
19205  # unix format.
19206  new_path=`$CYGPATH -u "$path"`
19207
19208  # Now try to locate executable using which
19209  new_path=`$WHICH "$new_path" 2> /dev/null`
19210  # bat and cmd files are not always considered executable in cygwin causing which
19211  # to not find them
19212  if test "x$new_path" = x \
19213      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19214      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19215    new_path=`$CYGPATH -u "$path"`
19216  fi
19217  if test "x$new_path" = x; then
19218    # Oops. Which didn't find the executable.
19219    # The splitting of arguments from the executable at a space might have been incorrect,
19220    # since paths with space are more likely in Windows. Give it another try with the whole
19221    # argument.
19222    path="$complete"
19223    arguments="EOL"
19224    new_path=`$CYGPATH -u "$path"`
19225    new_path=`$WHICH "$new_path" 2> /dev/null`
19226    # bat and cmd files are not always considered executable in cygwin causing which
19227    # to not find them
19228    if test "x$new_path" = x \
19229        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19230        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19231      new_path=`$CYGPATH -u "$path"`
19232    fi
19233    if test "x$new_path" = x; then
19234      # It's still not found. Now this is an unrecoverable error.
19235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19236$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19237      has_space=`$ECHO "$complete" | $GREP " "`
19238      if test "x$has_space" != x; then
19239        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19240$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19241      fi
19242      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19243    fi
19244  fi
19245
19246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19249  # "foo.exe" is OK but "foo" is an error.
19250  #
19251  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19252  # It is also a way to make sure we got the proper file name for the real test later on.
19253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19254  if test "x$test_shortpath" = x; then
19255    # Short path failed, file does not exist as specified.
19256    # Try adding .exe or .cmd
19257    if test -f "${new_path}.exe"; then
19258      input_to_shortpath="${new_path}.exe"
19259    elif test -f "${new_path}.cmd"; then
19260      input_to_shortpath="${new_path}.cmd"
19261    else
19262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19263$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19264      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19265$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19266      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19267    fi
19268  else
19269    input_to_shortpath="$new_path"
19270  fi
19271
19272  # Call helper function which possibly converts this using DOS-style short mode.
19273  # If so, the updated path is stored in $new_path.
19274  new_path="$input_to_shortpath"
19275
19276  input_path="$input_to_shortpath"
19277  # Check if we need to convert this using DOS-style short mode. If the path
19278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19279  # take no chances and rewrite it.
19280  # Note: m4 eats our [], so we need to use [ and ] instead.
19281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19282  if test "x$has_forbidden_chars" != x; then
19283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19287      # Going to short mode and back again did indeed matter. Since short mode is
19288      # case insensitive, let's make it lowercase to improve readability.
19289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19290      # Now convert it back to Unix-style (cygpath)
19291      input_path=`$CYGPATH -u "$shortmode_path"`
19292      new_path="$input_path"
19293    fi
19294  fi
19295
19296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19297  if test "x$test_cygdrive_prefix" = x; then
19298    # As a simple fix, exclude /usr/bin since it's not a real path.
19299    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19301      # a path prefixed by /cygdrive for fixpath to work.
19302      new_path="$CYGWIN_ROOT_PATH$input_path"
19303    fi
19304  fi
19305
19306  # remove trailing .exe if any
19307  new_path="${new_path/%.exe/}"
19308
19309    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19310
19311  # First separate the path from the arguments. This will split at the first
19312  # space.
19313  complete="$FOUND_MAKE"
19314  path="${complete%% *}"
19315  tmp="$complete EOL"
19316  arguments="${tmp#* }"
19317
19318  # Input might be given as Windows format, start by converting to
19319  # unix format.
19320  new_path="$path"
19321
19322  windows_path="$new_path"
19323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19324    unix_path=`$CYGPATH -u "$windows_path"`
19325    new_path="$unix_path"
19326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19328    new_path="$unix_path"
19329  fi
19330
19331
19332  # Now try to locate executable using which
19333  new_path=`$WHICH "$new_path" 2> /dev/null`
19334
19335  if test "x$new_path" = x; then
19336    # Oops. Which didn't find the executable.
19337    # The splitting of arguments from the executable at a space might have been incorrect,
19338    # since paths with space are more likely in Windows. Give it another try with the whole
19339    # argument.
19340    path="$complete"
19341    arguments="EOL"
19342    new_path="$path"
19343
19344  windows_path="$new_path"
19345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19346    unix_path=`$CYGPATH -u "$windows_path"`
19347    new_path="$unix_path"
19348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19350    new_path="$unix_path"
19351  fi
19352
19353
19354    new_path=`$WHICH "$new_path" 2> /dev/null`
19355    # bat and cmd files are not always considered executable in MSYS causing which
19356    # to not find them
19357    if test "x$new_path" = x \
19358        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19359        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19360      new_path="$path"
19361
19362  windows_path="$new_path"
19363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19364    unix_path=`$CYGPATH -u "$windows_path"`
19365    new_path="$unix_path"
19366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19368    new_path="$unix_path"
19369  fi
19370
19371    fi
19372
19373    if test "x$new_path" = x; then
19374      # It's still not found. Now this is an unrecoverable error.
19375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19376$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19377      has_space=`$ECHO "$complete" | $GREP " "`
19378      if test "x$has_space" != x; then
19379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19381      fi
19382      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19383    fi
19384  fi
19385
19386  # Now new_path has a complete unix path to the binary
19387  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19388    # Keep paths in /bin as-is, but remove trailing .exe if any
19389    new_path="${new_path/%.exe/}"
19390    # Do not save /bin paths to all_fixpath_prefixes!
19391  else
19392    # Not in mixed or Windows style, start by that.
19393    new_path=`cmd //c echo $new_path`
19394
19395  input_path="$new_path"
19396  # Check if we need to convert this using DOS-style short mode. If the path
19397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19398  # take no chances and rewrite it.
19399  # Note: m4 eats our [], so we need to use [ and ] instead.
19400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19401  if test "x$has_forbidden_chars" != x; then
19402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19404  fi
19405
19406    # Output is in $new_path
19407
19408  windows_path="$new_path"
19409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19410    unix_path=`$CYGPATH -u "$windows_path"`
19411    new_path="$unix_path"
19412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19414    new_path="$unix_path"
19415  fi
19416
19417    # remove trailing .exe if any
19418    new_path="${new_path/%.exe/}"
19419
19420    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19421    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19422  fi
19423
19424    else
19425      # We're on a unix platform. Hooray! :)
19426      # First separate the path from the arguments. This will split at the first
19427      # space.
19428      complete="$FOUND_MAKE"
19429      path="${complete%% *}"
19430      tmp="$complete EOL"
19431      arguments="${tmp#* }"
19432
19433      # Cannot rely on the command "which" here since it doesn't always work.
19434      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19435      if test -z "$is_absolute_path"; then
19436        # Path to executable is not absolute. Find it.
19437        IFS_save="$IFS"
19438        IFS=:
19439        for p in $PATH; do
19440          if test -f "$p/$path" && test -x "$p/$path"; then
19441            new_path="$p/$path"
19442            break
19443          fi
19444        done
19445        IFS="$IFS_save"
19446      else
19447        # This is an absolute path, we can use it without further modifications.
19448        new_path="$path"
19449      fi
19450
19451      if test "x$new_path" = x; then
19452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19453$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19454        has_space=`$ECHO "$complete" | $GREP " "`
19455        if test "x$has_space" != x; then
19456          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19457$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19458        fi
19459        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19460      fi
19461    fi
19462
19463    # Now join together the path and the arguments once again
19464    if test "x$arguments" != xEOL; then
19465      new_complete="$new_path ${arguments% *}"
19466    else
19467      new_complete="$new_path"
19468    fi
19469
19470    if test "x$complete" != "x$new_complete"; then
19471      FOUND_MAKE="$new_complete"
19472      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19473$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19474    fi
19475  fi
19476
19477        fi
19478      fi
19479    fi
19480  fi
19481
19482
19483    if test "x$FOUND_MAKE" = x; then
19484      for ac_prog in make
19485do
19486  # Extract the first word of "$ac_prog", so it can be a program name with args.
19487set dummy $ac_prog; ac_word=$2
19488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19489$as_echo_n "checking for $ac_word... " >&6; }
19490if ${ac_cv_path_CHECK_MAKE+:} false; then :
19491  $as_echo_n "(cached) " >&6
19492else
19493  case $CHECK_MAKE in
19494  [\\/]* | ?:[\\/]*)
19495  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19496  ;;
19497  *)
19498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19499for as_dir in $PATH
19500do
19501  IFS=$as_save_IFS
19502  test -z "$as_dir" && as_dir=.
19503    for ac_exec_ext in '' $ac_executable_extensions; do
19504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19505    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19507    break 2
19508  fi
19509done
19510  done
19511IFS=$as_save_IFS
19512
19513  ;;
19514esac
19515fi
19516CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19517if test -n "$CHECK_MAKE"; then
19518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19519$as_echo "$CHECK_MAKE" >&6; }
19520else
19521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19522$as_echo "no" >&6; }
19523fi
19524
19525
19526  test -n "$CHECK_MAKE" && break
19527done
19528
19529
19530  MAKE_CANDIDATE=""$CHECK_MAKE""
19531  DESCRIPTION="make in PATH"
19532
19533  # On Cygwin, we require a newer version of make than on other platforms
19534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19535    MAKE_VERSION_EXPR="-e 4\."
19536    MAKE_REQUIRED_VERSION="4.0"
19537   else
19538    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19539    MAKE_REQUIRED_VERSION="3.81"
19540  fi
19541
19542  if test "x$MAKE_CANDIDATE" != x; then
19543    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19544$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19545    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19546    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19547    if test "x$IS_GNU_MAKE" = x; then
19548      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19549$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19550    else
19551      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19552      if test "x$IS_MODERN_MAKE" = x; then
19553        { $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
19554$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;}
19555      else
19556        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19557          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19558            MAKE_EXPECTED_ENV='cygwin'
19559          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19560            MAKE_EXPECTED_ENV='msys'
19561          else
19562            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19563          fi
19564          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19565          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19566        else
19567          # Not relevant for non-Windows
19568          IS_MAKE_CORRECT_ENV=true
19569        fi
19570        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19571          { $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
19572$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;}
19573        else
19574          FOUND_MAKE=$MAKE_CANDIDATE
19575
19576  # Only process if variable expands to non-empty
19577
19578  if test "x$FOUND_MAKE" != x; then
19579    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19580
19581  # First separate the path from the arguments. This will split at the first
19582  # space.
19583  complete="$FOUND_MAKE"
19584  path="${complete%% *}"
19585  tmp="$complete EOL"
19586  arguments="${tmp#* }"
19587
19588  # Input might be given as Windows format, start by converting to
19589  # unix format.
19590  new_path=`$CYGPATH -u "$path"`
19591
19592  # Now try to locate executable using which
19593  new_path=`$WHICH "$new_path" 2> /dev/null`
19594  # bat and cmd files are not always considered executable in cygwin causing which
19595  # to not find them
19596  if test "x$new_path" = x \
19597      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19598      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19599    new_path=`$CYGPATH -u "$path"`
19600  fi
19601  if test "x$new_path" = x; then
19602    # Oops. Which didn't find the executable.
19603    # The splitting of arguments from the executable at a space might have been incorrect,
19604    # since paths with space are more likely in Windows. Give it another try with the whole
19605    # argument.
19606    path="$complete"
19607    arguments="EOL"
19608    new_path=`$CYGPATH -u "$path"`
19609    new_path=`$WHICH "$new_path" 2> /dev/null`
19610    # bat and cmd files are not always considered executable in cygwin causing which
19611    # to not find them
19612    if test "x$new_path" = x \
19613        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19614        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19615      new_path=`$CYGPATH -u "$path"`
19616    fi
19617    if test "x$new_path" = x; then
19618      # It's still not found. Now this is an unrecoverable error.
19619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19620$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19621      has_space=`$ECHO "$complete" | $GREP " "`
19622      if test "x$has_space" != x; then
19623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19625      fi
19626      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19627    fi
19628  fi
19629
19630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19633  # "foo.exe" is OK but "foo" is an error.
19634  #
19635  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19636  # It is also a way to make sure we got the proper file name for the real test later on.
19637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19638  if test "x$test_shortpath" = x; then
19639    # Short path failed, file does not exist as specified.
19640    # Try adding .exe or .cmd
19641    if test -f "${new_path}.exe"; then
19642      input_to_shortpath="${new_path}.exe"
19643    elif test -f "${new_path}.cmd"; then
19644      input_to_shortpath="${new_path}.cmd"
19645    else
19646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19647$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19648      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19649$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19650      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19651    fi
19652  else
19653    input_to_shortpath="$new_path"
19654  fi
19655
19656  # Call helper function which possibly converts this using DOS-style short mode.
19657  # If so, the updated path is stored in $new_path.
19658  new_path="$input_to_shortpath"
19659
19660  input_path="$input_to_shortpath"
19661  # Check if we need to convert this using DOS-style short mode. If the path
19662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19663  # take no chances and rewrite it.
19664  # Note: m4 eats our [], so we need to use [ and ] instead.
19665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19666  if test "x$has_forbidden_chars" != x; then
19667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19671      # Going to short mode and back again did indeed matter. Since short mode is
19672      # case insensitive, let's make it lowercase to improve readability.
19673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19674      # Now convert it back to Unix-style (cygpath)
19675      input_path=`$CYGPATH -u "$shortmode_path"`
19676      new_path="$input_path"
19677    fi
19678  fi
19679
19680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19681  if test "x$test_cygdrive_prefix" = x; then
19682    # As a simple fix, exclude /usr/bin since it's not a real path.
19683    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19685      # a path prefixed by /cygdrive for fixpath to work.
19686      new_path="$CYGWIN_ROOT_PATH$input_path"
19687    fi
19688  fi
19689
19690  # remove trailing .exe if any
19691  new_path="${new_path/%.exe/}"
19692
19693    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19694
19695  # First separate the path from the arguments. This will split at the first
19696  # space.
19697  complete="$FOUND_MAKE"
19698  path="${complete%% *}"
19699  tmp="$complete EOL"
19700  arguments="${tmp#* }"
19701
19702  # Input might be given as Windows format, start by converting to
19703  # unix format.
19704  new_path="$path"
19705
19706  windows_path="$new_path"
19707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19708    unix_path=`$CYGPATH -u "$windows_path"`
19709    new_path="$unix_path"
19710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19712    new_path="$unix_path"
19713  fi
19714
19715
19716  # Now try to locate executable using which
19717  new_path=`$WHICH "$new_path" 2> /dev/null`
19718
19719  if test "x$new_path" = x; then
19720    # Oops. Which didn't find the executable.
19721    # The splitting of arguments from the executable at a space might have been incorrect,
19722    # since paths with space are more likely in Windows. Give it another try with the whole
19723    # argument.
19724    path="$complete"
19725    arguments="EOL"
19726    new_path="$path"
19727
19728  windows_path="$new_path"
19729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19730    unix_path=`$CYGPATH -u "$windows_path"`
19731    new_path="$unix_path"
19732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19734    new_path="$unix_path"
19735  fi
19736
19737
19738    new_path=`$WHICH "$new_path" 2> /dev/null`
19739    # bat and cmd files are not always considered executable in MSYS causing which
19740    # to not find them
19741    if test "x$new_path" = x \
19742        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19743        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19744      new_path="$path"
19745
19746  windows_path="$new_path"
19747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19748    unix_path=`$CYGPATH -u "$windows_path"`
19749    new_path="$unix_path"
19750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19752    new_path="$unix_path"
19753  fi
19754
19755    fi
19756
19757    if test "x$new_path" = x; then
19758      # It's still not found. Now this is an unrecoverable error.
19759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19760$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19761      has_space=`$ECHO "$complete" | $GREP " "`
19762      if test "x$has_space" != x; then
19763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19765      fi
19766      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19767    fi
19768  fi
19769
19770  # Now new_path has a complete unix path to the binary
19771  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19772    # Keep paths in /bin as-is, but remove trailing .exe if any
19773    new_path="${new_path/%.exe/}"
19774    # Do not save /bin paths to all_fixpath_prefixes!
19775  else
19776    # Not in mixed or Windows style, start by that.
19777    new_path=`cmd //c echo $new_path`
19778
19779  input_path="$new_path"
19780  # Check if we need to convert this using DOS-style short mode. If the path
19781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19782  # take no chances and rewrite it.
19783  # Note: m4 eats our [], so we need to use [ and ] instead.
19784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19785  if test "x$has_forbidden_chars" != x; then
19786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19788  fi
19789
19790    # Output is in $new_path
19791
19792  windows_path="$new_path"
19793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19794    unix_path=`$CYGPATH -u "$windows_path"`
19795    new_path="$unix_path"
19796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19798    new_path="$unix_path"
19799  fi
19800
19801    # remove trailing .exe if any
19802    new_path="${new_path/%.exe/}"
19803
19804    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19805    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19806  fi
19807
19808    else
19809      # We're on a unix platform. Hooray! :)
19810      # First separate the path from the arguments. This will split at the first
19811      # space.
19812      complete="$FOUND_MAKE"
19813      path="${complete%% *}"
19814      tmp="$complete EOL"
19815      arguments="${tmp#* }"
19816
19817      # Cannot rely on the command "which" here since it doesn't always work.
19818      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19819      if test -z "$is_absolute_path"; then
19820        # Path to executable is not absolute. Find it.
19821        IFS_save="$IFS"
19822        IFS=:
19823        for p in $PATH; do
19824          if test -f "$p/$path" && test -x "$p/$path"; then
19825            new_path="$p/$path"
19826            break
19827          fi
19828        done
19829        IFS="$IFS_save"
19830      else
19831        # This is an absolute path, we can use it without further modifications.
19832        new_path="$path"
19833      fi
19834
19835      if test "x$new_path" = x; then
19836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19837$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19838        has_space=`$ECHO "$complete" | $GREP " "`
19839        if test "x$has_space" != x; then
19840          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19841$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19842        fi
19843        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19844      fi
19845    fi
19846
19847    # Now join together the path and the arguments once again
19848    if test "x$arguments" != xEOL; then
19849      new_complete="$new_path ${arguments% *}"
19850    else
19851      new_complete="$new_path"
19852    fi
19853
19854    if test "x$complete" != "x$new_complete"; then
19855      FOUND_MAKE="$new_complete"
19856      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19857$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19858    fi
19859  fi
19860
19861        fi
19862      fi
19863    fi
19864  fi
19865
19866    fi
19867
19868    if test "x$FOUND_MAKE" = x; then
19869      if test "x$TOOLCHAIN_PATH" != x; then
19870        # We have a toolchain path, check that as well before giving up.
19871        OLD_PATH=$PATH
19872        PATH=$TOOLCHAIN_PATH:$PATH
19873        for ac_prog in gmake
19874do
19875  # Extract the first word of "$ac_prog", so it can be a program name with args.
19876set dummy $ac_prog; ac_word=$2
19877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19878$as_echo_n "checking for $ac_word... " >&6; }
19879if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19880  $as_echo_n "(cached) " >&6
19881else
19882  case $CHECK_TOOLSDIR_GMAKE in
19883  [\\/]* | ?:[\\/]*)
19884  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19885  ;;
19886  *)
19887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19888for as_dir in $PATH
19889do
19890  IFS=$as_save_IFS
19891  test -z "$as_dir" && as_dir=.
19892    for ac_exec_ext in '' $ac_executable_extensions; do
19893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19894    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19896    break 2
19897  fi
19898done
19899  done
19900IFS=$as_save_IFS
19901
19902  ;;
19903esac
19904fi
19905CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19906if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19908$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19909else
19910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19911$as_echo "no" >&6; }
19912fi
19913
19914
19915  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19916done
19917
19918
19919  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19920  DESCRIPTION="gmake in tools-dir"
19921
19922  # On Cygwin, we require a newer version of make than on other platforms
19923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19924    MAKE_VERSION_EXPR="-e 4\."
19925    MAKE_REQUIRED_VERSION="4.0"
19926   else
19927    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19928    MAKE_REQUIRED_VERSION="3.81"
19929  fi
19930
19931  if test "x$MAKE_CANDIDATE" != x; then
19932    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19933$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19934    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19935    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19936    if test "x$IS_GNU_MAKE" = x; then
19937      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19938$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19939    else
19940      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19941      if test "x$IS_MODERN_MAKE" = x; then
19942        { $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
19943$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;}
19944      else
19945        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19946          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19947            MAKE_EXPECTED_ENV='cygwin'
19948          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19949            MAKE_EXPECTED_ENV='msys'
19950          else
19951            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19952          fi
19953          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19954          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19955        else
19956          # Not relevant for non-Windows
19957          IS_MAKE_CORRECT_ENV=true
19958        fi
19959        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19960          { $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
19961$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;}
19962        else
19963          FOUND_MAKE=$MAKE_CANDIDATE
19964
19965  # Only process if variable expands to non-empty
19966
19967  if test "x$FOUND_MAKE" != x; then
19968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19969
19970  # First separate the path from the arguments. This will split at the first
19971  # space.
19972  complete="$FOUND_MAKE"
19973  path="${complete%% *}"
19974  tmp="$complete EOL"
19975  arguments="${tmp#* }"
19976
19977  # Input might be given as Windows format, start by converting to
19978  # unix format.
19979  new_path=`$CYGPATH -u "$path"`
19980
19981  # Now try to locate executable using which
19982  new_path=`$WHICH "$new_path" 2> /dev/null`
19983  # bat and cmd files are not always considered executable in cygwin causing which
19984  # to not find them
19985  if test "x$new_path" = x \
19986      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19987      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19988    new_path=`$CYGPATH -u "$path"`
19989  fi
19990  if test "x$new_path" = x; then
19991    # Oops. Which didn't find the executable.
19992    # The splitting of arguments from the executable at a space might have been incorrect,
19993    # since paths with space are more likely in Windows. Give it another try with the whole
19994    # argument.
19995    path="$complete"
19996    arguments="EOL"
19997    new_path=`$CYGPATH -u "$path"`
19998    new_path=`$WHICH "$new_path" 2> /dev/null`
19999    # bat and cmd files are not always considered executable in cygwin causing which
20000    # to not find them
20001    if test "x$new_path" = x \
20002        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20003        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20004      new_path=`$CYGPATH -u "$path"`
20005    fi
20006    if test "x$new_path" = x; then
20007      # It's still not found. Now this is an unrecoverable error.
20008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20009$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20010      has_space=`$ECHO "$complete" | $GREP " "`
20011      if test "x$has_space" != x; then
20012        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20013$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20014      fi
20015      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20016    fi
20017  fi
20018
20019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20022  # "foo.exe" is OK but "foo" is an error.
20023  #
20024  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20025  # It is also a way to make sure we got the proper file name for the real test later on.
20026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20027  if test "x$test_shortpath" = x; then
20028    # Short path failed, file does not exist as specified.
20029    # Try adding .exe or .cmd
20030    if test -f "${new_path}.exe"; then
20031      input_to_shortpath="${new_path}.exe"
20032    elif test -f "${new_path}.cmd"; then
20033      input_to_shortpath="${new_path}.cmd"
20034    else
20035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20036$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20037      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20038$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20039      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20040    fi
20041  else
20042    input_to_shortpath="$new_path"
20043  fi
20044
20045  # Call helper function which possibly converts this using DOS-style short mode.
20046  # If so, the updated path is stored in $new_path.
20047  new_path="$input_to_shortpath"
20048
20049  input_path="$input_to_shortpath"
20050  # Check if we need to convert this using DOS-style short mode. If the path
20051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20052  # take no chances and rewrite it.
20053  # Note: m4 eats our [], so we need to use [ and ] instead.
20054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20055  if test "x$has_forbidden_chars" != x; then
20056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20060      # Going to short mode and back again did indeed matter. Since short mode is
20061      # case insensitive, let's make it lowercase to improve readability.
20062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20063      # Now convert it back to Unix-style (cygpath)
20064      input_path=`$CYGPATH -u "$shortmode_path"`
20065      new_path="$input_path"
20066    fi
20067  fi
20068
20069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20070  if test "x$test_cygdrive_prefix" = x; then
20071    # As a simple fix, exclude /usr/bin since it's not a real path.
20072    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20074      # a path prefixed by /cygdrive for fixpath to work.
20075      new_path="$CYGWIN_ROOT_PATH$input_path"
20076    fi
20077  fi
20078
20079  # remove trailing .exe if any
20080  new_path="${new_path/%.exe/}"
20081
20082    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20083
20084  # First separate the path from the arguments. This will split at the first
20085  # space.
20086  complete="$FOUND_MAKE"
20087  path="${complete%% *}"
20088  tmp="$complete EOL"
20089  arguments="${tmp#* }"
20090
20091  # Input might be given as Windows format, start by converting to
20092  # unix format.
20093  new_path="$path"
20094
20095  windows_path="$new_path"
20096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20097    unix_path=`$CYGPATH -u "$windows_path"`
20098    new_path="$unix_path"
20099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20101    new_path="$unix_path"
20102  fi
20103
20104
20105  # Now try to locate executable using which
20106  new_path=`$WHICH "$new_path" 2> /dev/null`
20107
20108  if test "x$new_path" = x; then
20109    # Oops. Which didn't find the executable.
20110    # The splitting of arguments from the executable at a space might have been incorrect,
20111    # since paths with space are more likely in Windows. Give it another try with the whole
20112    # argument.
20113    path="$complete"
20114    arguments="EOL"
20115    new_path="$path"
20116
20117  windows_path="$new_path"
20118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20119    unix_path=`$CYGPATH -u "$windows_path"`
20120    new_path="$unix_path"
20121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20123    new_path="$unix_path"
20124  fi
20125
20126
20127    new_path=`$WHICH "$new_path" 2> /dev/null`
20128    # bat and cmd files are not always considered executable in MSYS causing which
20129    # to not find them
20130    if test "x$new_path" = x \
20131        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20132        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20133      new_path="$path"
20134
20135  windows_path="$new_path"
20136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20137    unix_path=`$CYGPATH -u "$windows_path"`
20138    new_path="$unix_path"
20139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20141    new_path="$unix_path"
20142  fi
20143
20144    fi
20145
20146    if test "x$new_path" = x; then
20147      # It's still not found. Now this is an unrecoverable error.
20148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20149$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20150      has_space=`$ECHO "$complete" | $GREP " "`
20151      if test "x$has_space" != x; then
20152        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20153$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20154      fi
20155      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20156    fi
20157  fi
20158
20159  # Now new_path has a complete unix path to the binary
20160  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20161    # Keep paths in /bin as-is, but remove trailing .exe if any
20162    new_path="${new_path/%.exe/}"
20163    # Do not save /bin paths to all_fixpath_prefixes!
20164  else
20165    # Not in mixed or Windows style, start by that.
20166    new_path=`cmd //c echo $new_path`
20167
20168  input_path="$new_path"
20169  # Check if we need to convert this using DOS-style short mode. If the path
20170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20171  # take no chances and rewrite it.
20172  # Note: m4 eats our [], so we need to use [ and ] instead.
20173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20174  if test "x$has_forbidden_chars" != x; then
20175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20177  fi
20178
20179    # Output is in $new_path
20180
20181  windows_path="$new_path"
20182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20183    unix_path=`$CYGPATH -u "$windows_path"`
20184    new_path="$unix_path"
20185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20187    new_path="$unix_path"
20188  fi
20189
20190    # remove trailing .exe if any
20191    new_path="${new_path/%.exe/}"
20192
20193    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20194    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20195  fi
20196
20197    else
20198      # We're on a unix platform. Hooray! :)
20199      # First separate the path from the arguments. This will split at the first
20200      # space.
20201      complete="$FOUND_MAKE"
20202      path="${complete%% *}"
20203      tmp="$complete EOL"
20204      arguments="${tmp#* }"
20205
20206      # Cannot rely on the command "which" here since it doesn't always work.
20207      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20208      if test -z "$is_absolute_path"; then
20209        # Path to executable is not absolute. Find it.
20210        IFS_save="$IFS"
20211        IFS=:
20212        for p in $PATH; do
20213          if test -f "$p/$path" && test -x "$p/$path"; then
20214            new_path="$p/$path"
20215            break
20216          fi
20217        done
20218        IFS="$IFS_save"
20219      else
20220        # This is an absolute path, we can use it without further modifications.
20221        new_path="$path"
20222      fi
20223
20224      if test "x$new_path" = x; then
20225        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20226$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20227        has_space=`$ECHO "$complete" | $GREP " "`
20228        if test "x$has_space" != x; then
20229          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20230$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20231        fi
20232        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20233      fi
20234    fi
20235
20236    # Now join together the path and the arguments once again
20237    if test "x$arguments" != xEOL; then
20238      new_complete="$new_path ${arguments% *}"
20239    else
20240      new_complete="$new_path"
20241    fi
20242
20243    if test "x$complete" != "x$new_complete"; then
20244      FOUND_MAKE="$new_complete"
20245      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20246$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20247    fi
20248  fi
20249
20250        fi
20251      fi
20252    fi
20253  fi
20254
20255        if test "x$FOUND_MAKE" = x; then
20256          for ac_prog in make
20257do
20258  # Extract the first word of "$ac_prog", so it can be a program name with args.
20259set dummy $ac_prog; ac_word=$2
20260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20261$as_echo_n "checking for $ac_word... " >&6; }
20262if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20263  $as_echo_n "(cached) " >&6
20264else
20265  case $CHECK_TOOLSDIR_MAKE in
20266  [\\/]* | ?:[\\/]*)
20267  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20268  ;;
20269  *)
20270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20271for as_dir in $PATH
20272do
20273  IFS=$as_save_IFS
20274  test -z "$as_dir" && as_dir=.
20275    for ac_exec_ext in '' $ac_executable_extensions; do
20276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20277    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20279    break 2
20280  fi
20281done
20282  done
20283IFS=$as_save_IFS
20284
20285  ;;
20286esac
20287fi
20288CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20289if test -n "$CHECK_TOOLSDIR_MAKE"; then
20290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20291$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20292else
20293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20294$as_echo "no" >&6; }
20295fi
20296
20297
20298  test -n "$CHECK_TOOLSDIR_MAKE" && break
20299done
20300
20301
20302  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20303  DESCRIPTION="make in tools-dir"
20304
20305  # On Cygwin, we require a newer version of make than on other platforms
20306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20307    MAKE_VERSION_EXPR="-e 4\."
20308    MAKE_REQUIRED_VERSION="4.0"
20309   else
20310    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20311    MAKE_REQUIRED_VERSION="3.81"
20312  fi
20313
20314  if test "x$MAKE_CANDIDATE" != x; then
20315    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20316$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20317    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20318    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20319    if test "x$IS_GNU_MAKE" = x; then
20320      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20321$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20322    else
20323      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20324      if test "x$IS_MODERN_MAKE" = x; then
20325        { $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
20326$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;}
20327      else
20328        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20329          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20330            MAKE_EXPECTED_ENV='cygwin'
20331          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20332            MAKE_EXPECTED_ENV='msys'
20333          else
20334            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20335          fi
20336          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20337          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20338        else
20339          # Not relevant for non-Windows
20340          IS_MAKE_CORRECT_ENV=true
20341        fi
20342        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20343          { $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
20344$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;}
20345        else
20346          FOUND_MAKE=$MAKE_CANDIDATE
20347
20348  # Only process if variable expands to non-empty
20349
20350  if test "x$FOUND_MAKE" != x; then
20351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20352
20353  # First separate the path from the arguments. This will split at the first
20354  # space.
20355  complete="$FOUND_MAKE"
20356  path="${complete%% *}"
20357  tmp="$complete EOL"
20358  arguments="${tmp#* }"
20359
20360  # Input might be given as Windows format, start by converting to
20361  # unix format.
20362  new_path=`$CYGPATH -u "$path"`
20363
20364  # Now try to locate executable using which
20365  new_path=`$WHICH "$new_path" 2> /dev/null`
20366  # bat and cmd files are not always considered executable in cygwin causing which
20367  # to not find them
20368  if test "x$new_path" = x \
20369      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20370      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20371    new_path=`$CYGPATH -u "$path"`
20372  fi
20373  if test "x$new_path" = x; then
20374    # Oops. Which didn't find the executable.
20375    # The splitting of arguments from the executable at a space might have been incorrect,
20376    # since paths with space are more likely in Windows. Give it another try with the whole
20377    # argument.
20378    path="$complete"
20379    arguments="EOL"
20380    new_path=`$CYGPATH -u "$path"`
20381    new_path=`$WHICH "$new_path" 2> /dev/null`
20382    # bat and cmd files are not always considered executable in cygwin causing which
20383    # to not find them
20384    if test "x$new_path" = x \
20385        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20386        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20387      new_path=`$CYGPATH -u "$path"`
20388    fi
20389    if test "x$new_path" = x; then
20390      # It's still not found. Now this is an unrecoverable error.
20391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20392$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20393      has_space=`$ECHO "$complete" | $GREP " "`
20394      if test "x$has_space" != x; then
20395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20397      fi
20398      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20399    fi
20400  fi
20401
20402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20405  # "foo.exe" is OK but "foo" is an error.
20406  #
20407  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20408  # It is also a way to make sure we got the proper file name for the real test later on.
20409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20410  if test "x$test_shortpath" = x; then
20411    # Short path failed, file does not exist as specified.
20412    # Try adding .exe or .cmd
20413    if test -f "${new_path}.exe"; then
20414      input_to_shortpath="${new_path}.exe"
20415    elif test -f "${new_path}.cmd"; then
20416      input_to_shortpath="${new_path}.cmd"
20417    else
20418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20419$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20420      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20421$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20422      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20423    fi
20424  else
20425    input_to_shortpath="$new_path"
20426  fi
20427
20428  # Call helper function which possibly converts this using DOS-style short mode.
20429  # If so, the updated path is stored in $new_path.
20430  new_path="$input_to_shortpath"
20431
20432  input_path="$input_to_shortpath"
20433  # Check if we need to convert this using DOS-style short mode. If the path
20434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20435  # take no chances and rewrite it.
20436  # Note: m4 eats our [], so we need to use [ and ] instead.
20437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20438  if test "x$has_forbidden_chars" != x; then
20439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20443      # Going to short mode and back again did indeed matter. Since short mode is
20444      # case insensitive, let's make it lowercase to improve readability.
20445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20446      # Now convert it back to Unix-style (cygpath)
20447      input_path=`$CYGPATH -u "$shortmode_path"`
20448      new_path="$input_path"
20449    fi
20450  fi
20451
20452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20453  if test "x$test_cygdrive_prefix" = x; then
20454    # As a simple fix, exclude /usr/bin since it's not a real path.
20455    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20457      # a path prefixed by /cygdrive for fixpath to work.
20458      new_path="$CYGWIN_ROOT_PATH$input_path"
20459    fi
20460  fi
20461
20462  # remove trailing .exe if any
20463  new_path="${new_path/%.exe/}"
20464
20465    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20466
20467  # First separate the path from the arguments. This will split at the first
20468  # space.
20469  complete="$FOUND_MAKE"
20470  path="${complete%% *}"
20471  tmp="$complete EOL"
20472  arguments="${tmp#* }"
20473
20474  # Input might be given as Windows format, start by converting to
20475  # unix format.
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
20488  # Now try to locate executable using which
20489  new_path=`$WHICH "$new_path" 2> /dev/null`
20490
20491  if test "x$new_path" = x; then
20492    # Oops. Which didn't find the executable.
20493    # The splitting of arguments from the executable at a space might have been incorrect,
20494    # since paths with space are more likely in Windows. Give it another try with the whole
20495    # argument.
20496    path="$complete"
20497    arguments="EOL"
20498    new_path="$path"
20499
20500  windows_path="$new_path"
20501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20502    unix_path=`$CYGPATH -u "$windows_path"`
20503    new_path="$unix_path"
20504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20506    new_path="$unix_path"
20507  fi
20508
20509
20510    new_path=`$WHICH "$new_path" 2> /dev/null`
20511    # bat and cmd files are not always considered executable in MSYS causing which
20512    # to not find them
20513    if test "x$new_path" = x \
20514        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20515        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20516      new_path="$path"
20517
20518  windows_path="$new_path"
20519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20520    unix_path=`$CYGPATH -u "$windows_path"`
20521    new_path="$unix_path"
20522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20524    new_path="$unix_path"
20525  fi
20526
20527    fi
20528
20529    if test "x$new_path" = x; then
20530      # It's still not found. Now this is an unrecoverable error.
20531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20532$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20533      has_space=`$ECHO "$complete" | $GREP " "`
20534      if test "x$has_space" != x; then
20535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20537      fi
20538      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20539    fi
20540  fi
20541
20542  # Now new_path has a complete unix path to the binary
20543  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20544    # Keep paths in /bin as-is, but remove trailing .exe if any
20545    new_path="${new_path/%.exe/}"
20546    # Do not save /bin paths to all_fixpath_prefixes!
20547  else
20548    # Not in mixed or Windows style, start by that.
20549    new_path=`cmd //c echo $new_path`
20550
20551  input_path="$new_path"
20552  # Check if we need to convert this using DOS-style short mode. If the path
20553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20554  # take no chances and rewrite it.
20555  # Note: m4 eats our [], so we need to use [ and ] instead.
20556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20557  if test "x$has_forbidden_chars" != x; then
20558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20560  fi
20561
20562    # Output is in $new_path
20563
20564  windows_path="$new_path"
20565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20566    unix_path=`$CYGPATH -u "$windows_path"`
20567    new_path="$unix_path"
20568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20570    new_path="$unix_path"
20571  fi
20572
20573    # remove trailing .exe if any
20574    new_path="${new_path/%.exe/}"
20575
20576    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20577    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20578  fi
20579
20580    else
20581      # We're on a unix platform. Hooray! :)
20582      # First separate the path from the arguments. This will split at the first
20583      # space.
20584      complete="$FOUND_MAKE"
20585      path="${complete%% *}"
20586      tmp="$complete EOL"
20587      arguments="${tmp#* }"
20588
20589      # Cannot rely on the command "which" here since it doesn't always work.
20590      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20591      if test -z "$is_absolute_path"; then
20592        # Path to executable is not absolute. Find it.
20593        IFS_save="$IFS"
20594        IFS=:
20595        for p in $PATH; do
20596          if test -f "$p/$path" && test -x "$p/$path"; then
20597            new_path="$p/$path"
20598            break
20599          fi
20600        done
20601        IFS="$IFS_save"
20602      else
20603        # This is an absolute path, we can use it without further modifications.
20604        new_path="$path"
20605      fi
20606
20607      if test "x$new_path" = x; then
20608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20609$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20610        has_space=`$ECHO "$complete" | $GREP " "`
20611        if test "x$has_space" != x; then
20612          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20613$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20614        fi
20615        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20616      fi
20617    fi
20618
20619    # Now join together the path and the arguments once again
20620    if test "x$arguments" != xEOL; then
20621      new_complete="$new_path ${arguments% *}"
20622    else
20623      new_complete="$new_path"
20624    fi
20625
20626    if test "x$complete" != "x$new_complete"; then
20627      FOUND_MAKE="$new_complete"
20628      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20629$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20630    fi
20631  fi
20632
20633        fi
20634      fi
20635    fi
20636  fi
20637
20638        fi
20639        PATH=$OLD_PATH
20640      fi
20641    fi
20642
20643    if test "x$FOUND_MAKE" = x; then
20644      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
20645    fi
20646
20647    else
20648      # If it succeeded, then it was overridden by the user. We will use it
20649      # for the tool.
20650
20651      # First remove it from the list of overridden variables, so we can test
20652      # for unknown variables in the end.
20653      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20654
20655      # Check if we try to supply an empty value
20656      if test "x$MAKE" = x; then
20657        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20658$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20659        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20660$as_echo_n "checking for MAKE... " >&6; }
20661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20662$as_echo "disabled" >&6; }
20663      else
20664        # Check if the provided tool contains a complete path.
20665        tool_specified="$MAKE"
20666        tool_basename="${tool_specified##*/}"
20667        if test "x$tool_basename" = "x$tool_specified"; then
20668          # A command without a complete path is provided, search $PATH.
20669          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20670$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20671          # Extract the first word of "$tool_basename", so it can be a program name with args.
20672set dummy $tool_basename; ac_word=$2
20673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20674$as_echo_n "checking for $ac_word... " >&6; }
20675if ${ac_cv_path_MAKE+:} false; then :
20676  $as_echo_n "(cached) " >&6
20677else
20678  case $MAKE in
20679  [\\/]* | ?:[\\/]*)
20680  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20681  ;;
20682  *)
20683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20684for as_dir in $PATH
20685do
20686  IFS=$as_save_IFS
20687  test -z "$as_dir" && as_dir=.
20688    for ac_exec_ext in '' $ac_executable_extensions; do
20689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20690    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20692    break 2
20693  fi
20694done
20695  done
20696IFS=$as_save_IFS
20697
20698  ;;
20699esac
20700fi
20701MAKE=$ac_cv_path_MAKE
20702if test -n "$MAKE"; then
20703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20704$as_echo "$MAKE" >&6; }
20705else
20706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20707$as_echo "no" >&6; }
20708fi
20709
20710
20711          if test "x$MAKE" = x; then
20712            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20713          fi
20714        else
20715          # Otherwise we believe it is a complete path. Use it as it is.
20716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20717$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20718          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20719$as_echo_n "checking for MAKE... " >&6; }
20720          if test ! -x "$tool_specified"; then
20721            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20722$as_echo "not found" >&6; }
20723            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20724          fi
20725          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20726$as_echo "$tool_specified" >&6; }
20727        fi
20728      fi
20729    fi
20730
20731    # If MAKE was set by user, verify the version
20732
20733  MAKE_CANDIDATE=""$MAKE""
20734  DESCRIPTION="user supplied MAKE=$MAKE"
20735
20736  # On Cygwin, we require a newer version of make than on other platforms
20737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20738    MAKE_VERSION_EXPR="-e 4\."
20739    MAKE_REQUIRED_VERSION="4.0"
20740   else
20741    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20742    MAKE_REQUIRED_VERSION="3.81"
20743  fi
20744
20745  if test "x$MAKE_CANDIDATE" != x; then
20746    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20747$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20748    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20749    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20750    if test "x$IS_GNU_MAKE" = x; then
20751      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20752$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20753    else
20754      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20755      if test "x$IS_MODERN_MAKE" = x; then
20756        { $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
20757$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;}
20758      else
20759        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20760          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20761            MAKE_EXPECTED_ENV='cygwin'
20762          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20763            MAKE_EXPECTED_ENV='msys'
20764          else
20765            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20766          fi
20767          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20768          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20769        else
20770          # Not relevant for non-Windows
20771          IS_MAKE_CORRECT_ENV=true
20772        fi
20773        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20774          { $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
20775$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;}
20776        else
20777          FOUND_MAKE=$MAKE_CANDIDATE
20778
20779  # Only process if variable expands to non-empty
20780
20781  if test "x$FOUND_MAKE" != x; then
20782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20783
20784  # First separate the path from the arguments. This will split at the first
20785  # space.
20786  complete="$FOUND_MAKE"
20787  path="${complete%% *}"
20788  tmp="$complete EOL"
20789  arguments="${tmp#* }"
20790
20791  # Input might be given as Windows format, start by converting to
20792  # unix format.
20793  new_path=`$CYGPATH -u "$path"`
20794
20795  # Now try to locate executable using which
20796  new_path=`$WHICH "$new_path" 2> /dev/null`
20797  # bat and cmd files are not always considered executable in cygwin causing which
20798  # to not find them
20799  if test "x$new_path" = x \
20800      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20801      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20802    new_path=`$CYGPATH -u "$path"`
20803  fi
20804  if test "x$new_path" = x; then
20805    # Oops. Which didn't find the executable.
20806    # The splitting of arguments from the executable at a space might have been incorrect,
20807    # since paths with space are more likely in Windows. Give it another try with the whole
20808    # argument.
20809    path="$complete"
20810    arguments="EOL"
20811    new_path=`$CYGPATH -u "$path"`
20812    new_path=`$WHICH "$new_path" 2> /dev/null`
20813    # bat and cmd files are not always considered executable in cygwin causing which
20814    # to not find them
20815    if test "x$new_path" = x \
20816        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20817        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20818      new_path=`$CYGPATH -u "$path"`
20819    fi
20820    if test "x$new_path" = x; then
20821      # It's still not found. Now this is an unrecoverable error.
20822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20823$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20824      has_space=`$ECHO "$complete" | $GREP " "`
20825      if test "x$has_space" != x; then
20826        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20827$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20828      fi
20829      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20830    fi
20831  fi
20832
20833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20836  # "foo.exe" is OK but "foo" is an error.
20837  #
20838  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20839  # It is also a way to make sure we got the proper file name for the real test later on.
20840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20841  if test "x$test_shortpath" = x; then
20842    # Short path failed, file does not exist as specified.
20843    # Try adding .exe or .cmd
20844    if test -f "${new_path}.exe"; then
20845      input_to_shortpath="${new_path}.exe"
20846    elif test -f "${new_path}.cmd"; then
20847      input_to_shortpath="${new_path}.cmd"
20848    else
20849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20850$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20851      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20852$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20853      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20854    fi
20855  else
20856    input_to_shortpath="$new_path"
20857  fi
20858
20859  # Call helper function which possibly converts this using DOS-style short mode.
20860  # If so, the updated path is stored in $new_path.
20861  new_path="$input_to_shortpath"
20862
20863  input_path="$input_to_shortpath"
20864  # Check if we need to convert this using DOS-style short mode. If the path
20865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20866  # take no chances and rewrite it.
20867  # Note: m4 eats our [], so we need to use [ and ] instead.
20868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20869  if test "x$has_forbidden_chars" != x; then
20870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20874      # Going to short mode and back again did indeed matter. Since short mode is
20875      # case insensitive, let's make it lowercase to improve readability.
20876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20877      # Now convert it back to Unix-style (cygpath)
20878      input_path=`$CYGPATH -u "$shortmode_path"`
20879      new_path="$input_path"
20880    fi
20881  fi
20882
20883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20884  if test "x$test_cygdrive_prefix" = x; then
20885    # As a simple fix, exclude /usr/bin since it's not a real path.
20886    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20888      # a path prefixed by /cygdrive for fixpath to work.
20889      new_path="$CYGWIN_ROOT_PATH$input_path"
20890    fi
20891  fi
20892
20893  # remove trailing .exe if any
20894  new_path="${new_path/%.exe/}"
20895
20896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20897
20898  # First separate the path from the arguments. This will split at the first
20899  # space.
20900  complete="$FOUND_MAKE"
20901  path="${complete%% *}"
20902  tmp="$complete EOL"
20903  arguments="${tmp#* }"
20904
20905  # Input might be given as Windows format, start by converting to
20906  # unix format.
20907  new_path="$path"
20908
20909  windows_path="$new_path"
20910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20911    unix_path=`$CYGPATH -u "$windows_path"`
20912    new_path="$unix_path"
20913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20915    new_path="$unix_path"
20916  fi
20917
20918
20919  # Now try to locate executable using which
20920  new_path=`$WHICH "$new_path" 2> /dev/null`
20921
20922  if test "x$new_path" = x; then
20923    # Oops. Which didn't find the executable.
20924    # The splitting of arguments from the executable at a space might have been incorrect,
20925    # since paths with space are more likely in Windows. Give it another try with the whole
20926    # argument.
20927    path="$complete"
20928    arguments="EOL"
20929    new_path="$path"
20930
20931  windows_path="$new_path"
20932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20933    unix_path=`$CYGPATH -u "$windows_path"`
20934    new_path="$unix_path"
20935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20937    new_path="$unix_path"
20938  fi
20939
20940
20941    new_path=`$WHICH "$new_path" 2> /dev/null`
20942    # bat and cmd files are not always considered executable in MSYS causing which
20943    # to not find them
20944    if test "x$new_path" = x \
20945        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20946        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20947      new_path="$path"
20948
20949  windows_path="$new_path"
20950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20951    unix_path=`$CYGPATH -u "$windows_path"`
20952    new_path="$unix_path"
20953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20955    new_path="$unix_path"
20956  fi
20957
20958    fi
20959
20960    if test "x$new_path" = x; then
20961      # It's still not found. Now this is an unrecoverable error.
20962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20963$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20964      has_space=`$ECHO "$complete" | $GREP " "`
20965      if test "x$has_space" != x; then
20966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20968      fi
20969      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20970    fi
20971  fi
20972
20973  # Now new_path has a complete unix path to the binary
20974  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20975    # Keep paths in /bin as-is, but remove trailing .exe if any
20976    new_path="${new_path/%.exe/}"
20977    # Do not save /bin paths to all_fixpath_prefixes!
20978  else
20979    # Not in mixed or Windows style, start by that.
20980    new_path=`cmd //c echo $new_path`
20981
20982  input_path="$new_path"
20983  # Check if we need to convert this using DOS-style short mode. If the path
20984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20985  # take no chances and rewrite it.
20986  # Note: m4 eats our [], so we need to use [ and ] instead.
20987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20988  if test "x$has_forbidden_chars" != x; then
20989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20991  fi
20992
20993    # Output is in $new_path
20994
20995  windows_path="$new_path"
20996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20997    unix_path=`$CYGPATH -u "$windows_path"`
20998    new_path="$unix_path"
20999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21001    new_path="$unix_path"
21002  fi
21003
21004    # remove trailing .exe if any
21005    new_path="${new_path/%.exe/}"
21006
21007    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21008    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21009  fi
21010
21011    else
21012      # We're on a unix platform. Hooray! :)
21013      # First separate the path from the arguments. This will split at the first
21014      # space.
21015      complete="$FOUND_MAKE"
21016      path="${complete%% *}"
21017      tmp="$complete EOL"
21018      arguments="${tmp#* }"
21019
21020      # Cannot rely on the command "which" here since it doesn't always work.
21021      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21022      if test -z "$is_absolute_path"; then
21023        # Path to executable is not absolute. Find it.
21024        IFS_save="$IFS"
21025        IFS=:
21026        for p in $PATH; do
21027          if test -f "$p/$path" && test -x "$p/$path"; then
21028            new_path="$p/$path"
21029            break
21030          fi
21031        done
21032        IFS="$IFS_save"
21033      else
21034        # This is an absolute path, we can use it without further modifications.
21035        new_path="$path"
21036      fi
21037
21038      if test "x$new_path" = x; then
21039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21040$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21041        has_space=`$ECHO "$complete" | $GREP " "`
21042        if test "x$has_space" != x; then
21043          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21044$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21045        fi
21046        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21047      fi
21048    fi
21049
21050    # Now join together the path and the arguments once again
21051    if test "x$arguments" != xEOL; then
21052      new_complete="$new_path ${arguments% *}"
21053    else
21054      new_complete="$new_path"
21055    fi
21056
21057    if test "x$complete" != "x$new_complete"; then
21058      FOUND_MAKE="$new_complete"
21059      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21060$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21061    fi
21062  fi
21063
21064        fi
21065      fi
21066    fi
21067  fi
21068
21069    if test "x$FOUND_MAKE" = x; then
21070      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21071    fi
21072
21073  fi
21074
21075
21076  MAKE=$FOUND_MAKE
21077
21078  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21079$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21080
21081
21082  # Check if make supports the output sync option and if so, setup using it.
21083  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21084$as_echo_n "checking if make --output-sync is supported... " >&6; }
21085  if $MAKE --version -O > /dev/null 2>&1; then
21086    OUTPUT_SYNC_SUPPORTED=true
21087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21088$as_echo "yes" >&6; }
21089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21090$as_echo_n "checking for output-sync value... " >&6; }
21091
21092# Check whether --with-output-sync was given.
21093if test "${with_output_sync+set}" = set; then :
21094  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21095fi
21096
21097    if test "x$OUTPUT_SYNC" = "x"; then
21098      OUTPUT_SYNC=none
21099    fi
21100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21101$as_echo "$OUTPUT_SYNC" >&6; }
21102    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21103      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21104    fi
21105  else
21106    OUTPUT_SYNC_SUPPORTED=false
21107    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21108$as_echo "no" >&6; }
21109  fi
21110
21111
21112
21113
21114
21115
21116  # Test if find supports -delete
21117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21118$as_echo_n "checking if find supports -delete... " >&6; }
21119  FIND_DELETE="-delete"
21120
21121  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21122
21123  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21124
21125  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21126  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21127    # No, it does not.
21128    $RM $DELETEDIR/TestIfFindSupportsDelete
21129    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21130      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21131      FIND_DELETE="-print | $XARGS $RM"
21132    else
21133      FIND_DELETE="-exec $RM \{\} \+"
21134    fi
21135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21136$as_echo "no" >&6; }
21137  else
21138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21139$as_echo "yes" >&6; }
21140  fi
21141  $RMDIR $DELETEDIR
21142
21143
21144
21145  # Test which kind of tar was found
21146  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21147    TAR_TYPE="gnu"
21148  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21149    TAR_TYPE="bsd"
21150  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21151    TAR_TYPE="solaris"
21152  fi
21153  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21154$as_echo_n "checking what type of tar was found... " >&6; }
21155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21156$as_echo "$TAR_TYPE" >&6; }
21157
21158  TAR_CREATE_FILE_PARAM=""
21159
21160  if test "x$TAR_TYPE" = "xgnu"; then
21161    TAR_INCLUDE_PARAM="T"
21162    TAR_SUPPORTS_TRANSFORM="true"
21163    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21164      # When using gnu tar for Solaris targets, need to use compatibility mode
21165      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21166    fi
21167  else
21168    TAR_INCLUDE_PARAM="I"
21169    TAR_SUPPORTS_TRANSFORM="false"
21170  fi
21171
21172
21173
21174
21175
21176
21177  # These tools might not be installed by default,
21178  # need hint on how to install them.
21179
21180
21181
21182  # Publish this variable in the help.
21183
21184
21185  if [ -z "${UNZIP+x}" ]; then
21186    # The variable is not set by user, try to locate tool using the code snippet
21187    for ac_prog in unzip
21188do
21189  # Extract the first word of "$ac_prog", so it can be a program name with args.
21190set dummy $ac_prog; ac_word=$2
21191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21192$as_echo_n "checking for $ac_word... " >&6; }
21193if ${ac_cv_path_UNZIP+:} false; then :
21194  $as_echo_n "(cached) " >&6
21195else
21196  case $UNZIP in
21197  [\\/]* | ?:[\\/]*)
21198  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21199  ;;
21200  *)
21201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21202for as_dir in $PATH
21203do
21204  IFS=$as_save_IFS
21205  test -z "$as_dir" && as_dir=.
21206    for ac_exec_ext in '' $ac_executable_extensions; do
21207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21208    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21210    break 2
21211  fi
21212done
21213  done
21214IFS=$as_save_IFS
21215
21216  ;;
21217esac
21218fi
21219UNZIP=$ac_cv_path_UNZIP
21220if test -n "$UNZIP"; then
21221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21222$as_echo "$UNZIP" >&6; }
21223else
21224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21225$as_echo "no" >&6; }
21226fi
21227
21228
21229  test -n "$UNZIP" && break
21230done
21231
21232  else
21233    # The variable is set, but is it from the command line or the environment?
21234
21235    # Try to remove the string !UNZIP! from our list.
21236    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21237    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21238      # If it failed, the variable was not from the command line. Ignore it,
21239      # but warn the user (except for BASH, which is always set by the calling BASH).
21240      if test "xUNZIP" != xBASH; then
21241        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21242$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21243      fi
21244      # Try to locate tool using the code snippet
21245      for ac_prog in unzip
21246do
21247  # Extract the first word of "$ac_prog", so it can be a program name with args.
21248set dummy $ac_prog; ac_word=$2
21249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21250$as_echo_n "checking for $ac_word... " >&6; }
21251if ${ac_cv_path_UNZIP+:} false; then :
21252  $as_echo_n "(cached) " >&6
21253else
21254  case $UNZIP in
21255  [\\/]* | ?:[\\/]*)
21256  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21257  ;;
21258  *)
21259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21260for as_dir in $PATH
21261do
21262  IFS=$as_save_IFS
21263  test -z "$as_dir" && as_dir=.
21264    for ac_exec_ext in '' $ac_executable_extensions; do
21265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21266    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21268    break 2
21269  fi
21270done
21271  done
21272IFS=$as_save_IFS
21273
21274  ;;
21275esac
21276fi
21277UNZIP=$ac_cv_path_UNZIP
21278if test -n "$UNZIP"; then
21279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21280$as_echo "$UNZIP" >&6; }
21281else
21282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21283$as_echo "no" >&6; }
21284fi
21285
21286
21287  test -n "$UNZIP" && break
21288done
21289
21290    else
21291      # If it succeeded, then it was overridden by the user. We will use it
21292      # for the tool.
21293
21294      # First remove it from the list of overridden variables, so we can test
21295      # for unknown variables in the end.
21296      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21297
21298      # Check if we try to supply an empty value
21299      if test "x$UNZIP" = x; then
21300        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21301$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21302        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21303$as_echo_n "checking for UNZIP... " >&6; }
21304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21305$as_echo "disabled" >&6; }
21306      else
21307        # Check if the provided tool contains a complete path.
21308        tool_specified="$UNZIP"
21309        tool_basename="${tool_specified##*/}"
21310        if test "x$tool_basename" = "x$tool_specified"; then
21311          # A command without a complete path is provided, search $PATH.
21312          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21313$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21314          # Extract the first word of "$tool_basename", so it can be a program name with args.
21315set dummy $tool_basename; ac_word=$2
21316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21317$as_echo_n "checking for $ac_word... " >&6; }
21318if ${ac_cv_path_UNZIP+:} false; then :
21319  $as_echo_n "(cached) " >&6
21320else
21321  case $UNZIP in
21322  [\\/]* | ?:[\\/]*)
21323  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21324  ;;
21325  *)
21326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21327for as_dir in $PATH
21328do
21329  IFS=$as_save_IFS
21330  test -z "$as_dir" && as_dir=.
21331    for ac_exec_ext in '' $ac_executable_extensions; do
21332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21333    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21335    break 2
21336  fi
21337done
21338  done
21339IFS=$as_save_IFS
21340
21341  ;;
21342esac
21343fi
21344UNZIP=$ac_cv_path_UNZIP
21345if test -n "$UNZIP"; then
21346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21347$as_echo "$UNZIP" >&6; }
21348else
21349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21350$as_echo "no" >&6; }
21351fi
21352
21353
21354          if test "x$UNZIP" = x; then
21355            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21356          fi
21357        else
21358          # Otherwise we believe it is a complete path. Use it as it is.
21359          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21360$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21361          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21362$as_echo_n "checking for UNZIP... " >&6; }
21363          if test ! -x "$tool_specified"; then
21364            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21365$as_echo "not found" >&6; }
21366            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21367          fi
21368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21369$as_echo "$tool_specified" >&6; }
21370        fi
21371      fi
21372    fi
21373
21374  fi
21375
21376
21377
21378  if test "x$UNZIP" = x; then
21379    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21380  fi
21381
21382
21383
21384
21385
21386  # Publish this variable in the help.
21387
21388
21389  if [ -z "${ZIP+x}" ]; then
21390    # The variable is not set by user, try to locate tool using the code snippet
21391    for ac_prog in zip
21392do
21393  # Extract the first word of "$ac_prog", so it can be a program name with args.
21394set dummy $ac_prog; ac_word=$2
21395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21396$as_echo_n "checking for $ac_word... " >&6; }
21397if ${ac_cv_path_ZIP+:} false; then :
21398  $as_echo_n "(cached) " >&6
21399else
21400  case $ZIP in
21401  [\\/]* | ?:[\\/]*)
21402  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21403  ;;
21404  *)
21405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21406for as_dir in $PATH
21407do
21408  IFS=$as_save_IFS
21409  test -z "$as_dir" && as_dir=.
21410    for ac_exec_ext in '' $ac_executable_extensions; do
21411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21412    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21414    break 2
21415  fi
21416done
21417  done
21418IFS=$as_save_IFS
21419
21420  ;;
21421esac
21422fi
21423ZIP=$ac_cv_path_ZIP
21424if test -n "$ZIP"; then
21425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21426$as_echo "$ZIP" >&6; }
21427else
21428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21429$as_echo "no" >&6; }
21430fi
21431
21432
21433  test -n "$ZIP" && break
21434done
21435
21436  else
21437    # The variable is set, but is it from the command line or the environment?
21438
21439    # Try to remove the string !ZIP! from our list.
21440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21442      # If it failed, the variable was not from the command line. Ignore it,
21443      # but warn the user (except for BASH, which is always set by the calling BASH).
21444      if test "xZIP" != xBASH; then
21445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21446$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21447      fi
21448      # Try to locate tool using the code snippet
21449      for ac_prog in zip
21450do
21451  # Extract the first word of "$ac_prog", so it can be a program name with args.
21452set dummy $ac_prog; ac_word=$2
21453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21454$as_echo_n "checking for $ac_word... " >&6; }
21455if ${ac_cv_path_ZIP+:} false; then :
21456  $as_echo_n "(cached) " >&6
21457else
21458  case $ZIP in
21459  [\\/]* | ?:[\\/]*)
21460  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21461  ;;
21462  *)
21463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21464for as_dir in $PATH
21465do
21466  IFS=$as_save_IFS
21467  test -z "$as_dir" && as_dir=.
21468    for ac_exec_ext in '' $ac_executable_extensions; do
21469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21470    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21472    break 2
21473  fi
21474done
21475  done
21476IFS=$as_save_IFS
21477
21478  ;;
21479esac
21480fi
21481ZIP=$ac_cv_path_ZIP
21482if test -n "$ZIP"; then
21483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21484$as_echo "$ZIP" >&6; }
21485else
21486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21487$as_echo "no" >&6; }
21488fi
21489
21490
21491  test -n "$ZIP" && break
21492done
21493
21494    else
21495      # If it succeeded, then it was overridden by the user. We will use it
21496      # for the tool.
21497
21498      # First remove it from the list of overridden variables, so we can test
21499      # for unknown variables in the end.
21500      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21501
21502      # Check if we try to supply an empty value
21503      if test "x$ZIP" = x; then
21504        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21505$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21506        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21507$as_echo_n "checking for ZIP... " >&6; }
21508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21509$as_echo "disabled" >&6; }
21510      else
21511        # Check if the provided tool contains a complete path.
21512        tool_specified="$ZIP"
21513        tool_basename="${tool_specified##*/}"
21514        if test "x$tool_basename" = "x$tool_specified"; then
21515          # A command without a complete path is provided, search $PATH.
21516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21517$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21518          # Extract the first word of "$tool_basename", so it can be a program name with args.
21519set dummy $tool_basename; ac_word=$2
21520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21521$as_echo_n "checking for $ac_word... " >&6; }
21522if ${ac_cv_path_ZIP+:} false; then :
21523  $as_echo_n "(cached) " >&6
21524else
21525  case $ZIP in
21526  [\\/]* | ?:[\\/]*)
21527  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21528  ;;
21529  *)
21530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21531for as_dir in $PATH
21532do
21533  IFS=$as_save_IFS
21534  test -z "$as_dir" && as_dir=.
21535    for ac_exec_ext in '' $ac_executable_extensions; do
21536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21537    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21539    break 2
21540  fi
21541done
21542  done
21543IFS=$as_save_IFS
21544
21545  ;;
21546esac
21547fi
21548ZIP=$ac_cv_path_ZIP
21549if test -n "$ZIP"; then
21550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21551$as_echo "$ZIP" >&6; }
21552else
21553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21554$as_echo "no" >&6; }
21555fi
21556
21557
21558          if test "x$ZIP" = x; then
21559            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21560          fi
21561        else
21562          # Otherwise we believe it is a complete path. Use it as it is.
21563          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21564$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21565          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21566$as_echo_n "checking for ZIP... " >&6; }
21567          if test ! -x "$tool_specified"; then
21568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21569$as_echo "not found" >&6; }
21570            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21571          fi
21572          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21573$as_echo "$tool_specified" >&6; }
21574        fi
21575      fi
21576    fi
21577
21578  fi
21579
21580
21581
21582  if test "x$ZIP" = x; then
21583    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21584  fi
21585
21586
21587
21588  # Non-required basic tools
21589
21590
21591
21592  # Publish this variable in the help.
21593
21594
21595  if [ -z "${LDD+x}" ]; then
21596    # The variable is not set by user, try to locate tool using the code snippet
21597    for ac_prog in ldd
21598do
21599  # Extract the first word of "$ac_prog", so it can be a program name with args.
21600set dummy $ac_prog; ac_word=$2
21601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21602$as_echo_n "checking for $ac_word... " >&6; }
21603if ${ac_cv_path_LDD+:} false; then :
21604  $as_echo_n "(cached) " >&6
21605else
21606  case $LDD in
21607  [\\/]* | ?:[\\/]*)
21608  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21609  ;;
21610  *)
21611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21612for as_dir in $PATH
21613do
21614  IFS=$as_save_IFS
21615  test -z "$as_dir" && as_dir=.
21616    for ac_exec_ext in '' $ac_executable_extensions; do
21617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21618    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21620    break 2
21621  fi
21622done
21623  done
21624IFS=$as_save_IFS
21625
21626  ;;
21627esac
21628fi
21629LDD=$ac_cv_path_LDD
21630if test -n "$LDD"; then
21631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21632$as_echo "$LDD" >&6; }
21633else
21634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21635$as_echo "no" >&6; }
21636fi
21637
21638
21639  test -n "$LDD" && break
21640done
21641
21642  else
21643    # The variable is set, but is it from the command line or the environment?
21644
21645    # Try to remove the string !LDD! from our list.
21646    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21647    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21648      # If it failed, the variable was not from the command line. Ignore it,
21649      # but warn the user (except for BASH, which is always set by the calling BASH).
21650      if test "xLDD" != xBASH; then
21651        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21652$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21653      fi
21654      # Try to locate tool using the code snippet
21655      for ac_prog in ldd
21656do
21657  # Extract the first word of "$ac_prog", so it can be a program name with args.
21658set dummy $ac_prog; ac_word=$2
21659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21660$as_echo_n "checking for $ac_word... " >&6; }
21661if ${ac_cv_path_LDD+:} false; then :
21662  $as_echo_n "(cached) " >&6
21663else
21664  case $LDD in
21665  [\\/]* | ?:[\\/]*)
21666  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21667  ;;
21668  *)
21669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21670for as_dir in $PATH
21671do
21672  IFS=$as_save_IFS
21673  test -z "$as_dir" && as_dir=.
21674    for ac_exec_ext in '' $ac_executable_extensions; do
21675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21676    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21678    break 2
21679  fi
21680done
21681  done
21682IFS=$as_save_IFS
21683
21684  ;;
21685esac
21686fi
21687LDD=$ac_cv_path_LDD
21688if test -n "$LDD"; then
21689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21690$as_echo "$LDD" >&6; }
21691else
21692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21693$as_echo "no" >&6; }
21694fi
21695
21696
21697  test -n "$LDD" && break
21698done
21699
21700    else
21701      # If it succeeded, then it was overridden by the user. We will use it
21702      # for the tool.
21703
21704      # First remove it from the list of overridden variables, so we can test
21705      # for unknown variables in the end.
21706      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21707
21708      # Check if we try to supply an empty value
21709      if test "x$LDD" = x; then
21710        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21711$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21712        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21713$as_echo_n "checking for LDD... " >&6; }
21714        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21715$as_echo "disabled" >&6; }
21716      else
21717        # Check if the provided tool contains a complete path.
21718        tool_specified="$LDD"
21719        tool_basename="${tool_specified##*/}"
21720        if test "x$tool_basename" = "x$tool_specified"; then
21721          # A command without a complete path is provided, search $PATH.
21722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21723$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21724          # Extract the first word of "$tool_basename", so it can be a program name with args.
21725set dummy $tool_basename; ac_word=$2
21726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21727$as_echo_n "checking for $ac_word... " >&6; }
21728if ${ac_cv_path_LDD+:} false; then :
21729  $as_echo_n "(cached) " >&6
21730else
21731  case $LDD in
21732  [\\/]* | ?:[\\/]*)
21733  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21734  ;;
21735  *)
21736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21737for as_dir in $PATH
21738do
21739  IFS=$as_save_IFS
21740  test -z "$as_dir" && as_dir=.
21741    for ac_exec_ext in '' $ac_executable_extensions; do
21742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21743    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21745    break 2
21746  fi
21747done
21748  done
21749IFS=$as_save_IFS
21750
21751  ;;
21752esac
21753fi
21754LDD=$ac_cv_path_LDD
21755if test -n "$LDD"; then
21756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21757$as_echo "$LDD" >&6; }
21758else
21759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21760$as_echo "no" >&6; }
21761fi
21762
21763
21764          if test "x$LDD" = x; then
21765            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21766          fi
21767        else
21768          # Otherwise we believe it is a complete path. Use it as it is.
21769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21770$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21771          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21772$as_echo_n "checking for LDD... " >&6; }
21773          if test ! -x "$tool_specified"; then
21774            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21775$as_echo "not found" >&6; }
21776            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21777          fi
21778          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21779$as_echo "$tool_specified" >&6; }
21780        fi
21781      fi
21782    fi
21783
21784  fi
21785
21786
21787  if test "x$LDD" = "x"; then
21788    # List shared lib dependencies is used for
21789    # debug output and checking for forbidden dependencies.
21790    # We can build without it.
21791    LDD="true"
21792  fi
21793
21794
21795  # Publish this variable in the help.
21796
21797
21798  if [ -z "${OTOOL+x}" ]; then
21799    # The variable is not set by user, try to locate tool using the code snippet
21800    for ac_prog in otool
21801do
21802  # Extract the first word of "$ac_prog", so it can be a program name with args.
21803set dummy $ac_prog; ac_word=$2
21804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21805$as_echo_n "checking for $ac_word... " >&6; }
21806if ${ac_cv_path_OTOOL+:} false; then :
21807  $as_echo_n "(cached) " >&6
21808else
21809  case $OTOOL in
21810  [\\/]* | ?:[\\/]*)
21811  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21812  ;;
21813  *)
21814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21815for as_dir in $PATH
21816do
21817  IFS=$as_save_IFS
21818  test -z "$as_dir" && as_dir=.
21819    for ac_exec_ext in '' $ac_executable_extensions; do
21820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21821    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21823    break 2
21824  fi
21825done
21826  done
21827IFS=$as_save_IFS
21828
21829  ;;
21830esac
21831fi
21832OTOOL=$ac_cv_path_OTOOL
21833if test -n "$OTOOL"; then
21834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21835$as_echo "$OTOOL" >&6; }
21836else
21837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21838$as_echo "no" >&6; }
21839fi
21840
21841
21842  test -n "$OTOOL" && break
21843done
21844
21845  else
21846    # The variable is set, but is it from the command line or the environment?
21847
21848    # Try to remove the string !OTOOL! from our list.
21849    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21850    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21851      # If it failed, the variable was not from the command line. Ignore it,
21852      # but warn the user (except for BASH, which is always set by the calling BASH).
21853      if test "xOTOOL" != xBASH; then
21854        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21855$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21856      fi
21857      # Try to locate tool using the code snippet
21858      for ac_prog in otool
21859do
21860  # Extract the first word of "$ac_prog", so it can be a program name with args.
21861set dummy $ac_prog; ac_word=$2
21862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21863$as_echo_n "checking for $ac_word... " >&6; }
21864if ${ac_cv_path_OTOOL+:} false; then :
21865  $as_echo_n "(cached) " >&6
21866else
21867  case $OTOOL in
21868  [\\/]* | ?:[\\/]*)
21869  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21870  ;;
21871  *)
21872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21873for as_dir in $PATH
21874do
21875  IFS=$as_save_IFS
21876  test -z "$as_dir" && as_dir=.
21877    for ac_exec_ext in '' $ac_executable_extensions; do
21878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21879    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21881    break 2
21882  fi
21883done
21884  done
21885IFS=$as_save_IFS
21886
21887  ;;
21888esac
21889fi
21890OTOOL=$ac_cv_path_OTOOL
21891if test -n "$OTOOL"; then
21892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21893$as_echo "$OTOOL" >&6; }
21894else
21895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21896$as_echo "no" >&6; }
21897fi
21898
21899
21900  test -n "$OTOOL" && break
21901done
21902
21903    else
21904      # If it succeeded, then it was overridden by the user. We will use it
21905      # for the tool.
21906
21907      # First remove it from the list of overridden variables, so we can test
21908      # for unknown variables in the end.
21909      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21910
21911      # Check if we try to supply an empty value
21912      if test "x$OTOOL" = x; then
21913        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21914$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21915        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21916$as_echo_n "checking for OTOOL... " >&6; }
21917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21918$as_echo "disabled" >&6; }
21919      else
21920        # Check if the provided tool contains a complete path.
21921        tool_specified="$OTOOL"
21922        tool_basename="${tool_specified##*/}"
21923        if test "x$tool_basename" = "x$tool_specified"; then
21924          # A command without a complete path is provided, search $PATH.
21925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21926$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21927          # Extract the first word of "$tool_basename", so it can be a program name with args.
21928set dummy $tool_basename; ac_word=$2
21929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21930$as_echo_n "checking for $ac_word... " >&6; }
21931if ${ac_cv_path_OTOOL+:} false; then :
21932  $as_echo_n "(cached) " >&6
21933else
21934  case $OTOOL in
21935  [\\/]* | ?:[\\/]*)
21936  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21937  ;;
21938  *)
21939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21940for as_dir in $PATH
21941do
21942  IFS=$as_save_IFS
21943  test -z "$as_dir" && as_dir=.
21944    for ac_exec_ext in '' $ac_executable_extensions; do
21945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21946    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21948    break 2
21949  fi
21950done
21951  done
21952IFS=$as_save_IFS
21953
21954  ;;
21955esac
21956fi
21957OTOOL=$ac_cv_path_OTOOL
21958if test -n "$OTOOL"; then
21959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21960$as_echo "$OTOOL" >&6; }
21961else
21962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21963$as_echo "no" >&6; }
21964fi
21965
21966
21967          if test "x$OTOOL" = x; then
21968            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21969          fi
21970        else
21971          # Otherwise we believe it is a complete path. Use it as it is.
21972          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21973$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21974          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21975$as_echo_n "checking for OTOOL... " >&6; }
21976          if test ! -x "$tool_specified"; then
21977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21978$as_echo "not found" >&6; }
21979            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21980          fi
21981          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21982$as_echo "$tool_specified" >&6; }
21983        fi
21984      fi
21985    fi
21986
21987  fi
21988
21989
21990  if test "x$OTOOL" = "x"; then
21991    OTOOL="true"
21992  fi
21993
21994
21995  # Publish this variable in the help.
21996
21997
21998  if [ -z "${READELF+x}" ]; then
21999    # The variable is not set by user, try to locate tool using the code snippet
22000    for ac_prog in greadelf readelf
22001do
22002  # Extract the first word of "$ac_prog", so it can be a program name with args.
22003set dummy $ac_prog; ac_word=$2
22004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22005$as_echo_n "checking for $ac_word... " >&6; }
22006if ${ac_cv_path_READELF+:} false; then :
22007  $as_echo_n "(cached) " >&6
22008else
22009  case $READELF in
22010  [\\/]* | ?:[\\/]*)
22011  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22012  ;;
22013  *)
22014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22015for as_dir in $PATH
22016do
22017  IFS=$as_save_IFS
22018  test -z "$as_dir" && as_dir=.
22019    for ac_exec_ext in '' $ac_executable_extensions; do
22020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22021    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22023    break 2
22024  fi
22025done
22026  done
22027IFS=$as_save_IFS
22028
22029  ;;
22030esac
22031fi
22032READELF=$ac_cv_path_READELF
22033if test -n "$READELF"; then
22034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22035$as_echo "$READELF" >&6; }
22036else
22037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22038$as_echo "no" >&6; }
22039fi
22040
22041
22042  test -n "$READELF" && break
22043done
22044
22045  else
22046    # The variable is set, but is it from the command line or the environment?
22047
22048    # Try to remove the string !READELF! from our list.
22049    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22050    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22051      # If it failed, the variable was not from the command line. Ignore it,
22052      # but warn the user (except for BASH, which is always set by the calling BASH).
22053      if test "xREADELF" != xBASH; then
22054        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22055$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22056      fi
22057      # Try to locate tool using the code snippet
22058      for ac_prog in greadelf readelf
22059do
22060  # Extract the first word of "$ac_prog", so it can be a program name with args.
22061set dummy $ac_prog; ac_word=$2
22062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22063$as_echo_n "checking for $ac_word... " >&6; }
22064if ${ac_cv_path_READELF+:} false; then :
22065  $as_echo_n "(cached) " >&6
22066else
22067  case $READELF in
22068  [\\/]* | ?:[\\/]*)
22069  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22070  ;;
22071  *)
22072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22073for as_dir in $PATH
22074do
22075  IFS=$as_save_IFS
22076  test -z "$as_dir" && as_dir=.
22077    for ac_exec_ext in '' $ac_executable_extensions; do
22078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22079    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22081    break 2
22082  fi
22083done
22084  done
22085IFS=$as_save_IFS
22086
22087  ;;
22088esac
22089fi
22090READELF=$ac_cv_path_READELF
22091if test -n "$READELF"; then
22092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22093$as_echo "$READELF" >&6; }
22094else
22095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22096$as_echo "no" >&6; }
22097fi
22098
22099
22100  test -n "$READELF" && break
22101done
22102
22103    else
22104      # If it succeeded, then it was overridden by the user. We will use it
22105      # for the tool.
22106
22107      # First remove it from the list of overridden variables, so we can test
22108      # for unknown variables in the end.
22109      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22110
22111      # Check if we try to supply an empty value
22112      if test "x$READELF" = x; then
22113        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22114$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22115        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22116$as_echo_n "checking for READELF... " >&6; }
22117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22118$as_echo "disabled" >&6; }
22119      else
22120        # Check if the provided tool contains a complete path.
22121        tool_specified="$READELF"
22122        tool_basename="${tool_specified##*/}"
22123        if test "x$tool_basename" = "x$tool_specified"; then
22124          # A command without a complete path is provided, search $PATH.
22125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22126$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22127          # Extract the first word of "$tool_basename", so it can be a program name with args.
22128set dummy $tool_basename; ac_word=$2
22129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22130$as_echo_n "checking for $ac_word... " >&6; }
22131if ${ac_cv_path_READELF+:} false; then :
22132  $as_echo_n "(cached) " >&6
22133else
22134  case $READELF in
22135  [\\/]* | ?:[\\/]*)
22136  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22137  ;;
22138  *)
22139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22140for as_dir in $PATH
22141do
22142  IFS=$as_save_IFS
22143  test -z "$as_dir" && as_dir=.
22144    for ac_exec_ext in '' $ac_executable_extensions; do
22145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22146    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22148    break 2
22149  fi
22150done
22151  done
22152IFS=$as_save_IFS
22153
22154  ;;
22155esac
22156fi
22157READELF=$ac_cv_path_READELF
22158if test -n "$READELF"; then
22159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22160$as_echo "$READELF" >&6; }
22161else
22162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22163$as_echo "no" >&6; }
22164fi
22165
22166
22167          if test "x$READELF" = x; then
22168            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22169          fi
22170        else
22171          # Otherwise we believe it is a complete path. Use it as it is.
22172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22173$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22174          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22175$as_echo_n "checking for READELF... " >&6; }
22176          if test ! -x "$tool_specified"; then
22177            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22178$as_echo "not found" >&6; }
22179            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22180          fi
22181          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22182$as_echo "$tool_specified" >&6; }
22183        fi
22184      fi
22185    fi
22186
22187  fi
22188
22189
22190
22191
22192  # Publish this variable in the help.
22193
22194
22195  if [ -z "${HG+x}" ]; then
22196    # The variable is not set by user, try to locate tool using the code snippet
22197    for ac_prog in hg
22198do
22199  # Extract the first word of "$ac_prog", so it can be a program name with args.
22200set dummy $ac_prog; ac_word=$2
22201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22202$as_echo_n "checking for $ac_word... " >&6; }
22203if ${ac_cv_path_HG+:} false; then :
22204  $as_echo_n "(cached) " >&6
22205else
22206  case $HG in
22207  [\\/]* | ?:[\\/]*)
22208  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22209  ;;
22210  *)
22211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22212for as_dir in $PATH
22213do
22214  IFS=$as_save_IFS
22215  test -z "$as_dir" && as_dir=.
22216    for ac_exec_ext in '' $ac_executable_extensions; do
22217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22218    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22220    break 2
22221  fi
22222done
22223  done
22224IFS=$as_save_IFS
22225
22226  ;;
22227esac
22228fi
22229HG=$ac_cv_path_HG
22230if test -n "$HG"; then
22231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22232$as_echo "$HG" >&6; }
22233else
22234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22235$as_echo "no" >&6; }
22236fi
22237
22238
22239  test -n "$HG" && break
22240done
22241
22242  else
22243    # The variable is set, but is it from the command line or the environment?
22244
22245    # Try to remove the string !HG! from our list.
22246    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22247    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22248      # If it failed, the variable was not from the command line. Ignore it,
22249      # but warn the user (except for BASH, which is always set by the calling BASH).
22250      if test "xHG" != xBASH; then
22251        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22252$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22253      fi
22254      # Try to locate tool using the code snippet
22255      for ac_prog in hg
22256do
22257  # Extract the first word of "$ac_prog", so it can be a program name with args.
22258set dummy $ac_prog; ac_word=$2
22259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22260$as_echo_n "checking for $ac_word... " >&6; }
22261if ${ac_cv_path_HG+:} false; then :
22262  $as_echo_n "(cached) " >&6
22263else
22264  case $HG in
22265  [\\/]* | ?:[\\/]*)
22266  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22267  ;;
22268  *)
22269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22270for as_dir in $PATH
22271do
22272  IFS=$as_save_IFS
22273  test -z "$as_dir" && as_dir=.
22274    for ac_exec_ext in '' $ac_executable_extensions; do
22275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22276    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22278    break 2
22279  fi
22280done
22281  done
22282IFS=$as_save_IFS
22283
22284  ;;
22285esac
22286fi
22287HG=$ac_cv_path_HG
22288if test -n "$HG"; then
22289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22290$as_echo "$HG" >&6; }
22291else
22292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22293$as_echo "no" >&6; }
22294fi
22295
22296
22297  test -n "$HG" && break
22298done
22299
22300    else
22301      # If it succeeded, then it was overridden by the user. We will use it
22302      # for the tool.
22303
22304      # First remove it from the list of overridden variables, so we can test
22305      # for unknown variables in the end.
22306      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22307
22308      # Check if we try to supply an empty value
22309      if test "x$HG" = x; then
22310        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22311$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22312        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22313$as_echo_n "checking for HG... " >&6; }
22314        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22315$as_echo "disabled" >&6; }
22316      else
22317        # Check if the provided tool contains a complete path.
22318        tool_specified="$HG"
22319        tool_basename="${tool_specified##*/}"
22320        if test "x$tool_basename" = "x$tool_specified"; then
22321          # A command without a complete path is provided, search $PATH.
22322          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22323$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22324          # Extract the first word of "$tool_basename", so it can be a program name with args.
22325set dummy $tool_basename; ac_word=$2
22326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22327$as_echo_n "checking for $ac_word... " >&6; }
22328if ${ac_cv_path_HG+:} false; then :
22329  $as_echo_n "(cached) " >&6
22330else
22331  case $HG in
22332  [\\/]* | ?:[\\/]*)
22333  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22334  ;;
22335  *)
22336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22337for as_dir in $PATH
22338do
22339  IFS=$as_save_IFS
22340  test -z "$as_dir" && as_dir=.
22341    for ac_exec_ext in '' $ac_executable_extensions; do
22342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22343    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22345    break 2
22346  fi
22347done
22348  done
22349IFS=$as_save_IFS
22350
22351  ;;
22352esac
22353fi
22354HG=$ac_cv_path_HG
22355if test -n "$HG"; then
22356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22357$as_echo "$HG" >&6; }
22358else
22359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22360$as_echo "no" >&6; }
22361fi
22362
22363
22364          if test "x$HG" = x; then
22365            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22366          fi
22367        else
22368          # Otherwise we believe it is a complete path. Use it as it is.
22369          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22370$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22371          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22372$as_echo_n "checking for HG... " >&6; }
22373          if test ! -x "$tool_specified"; then
22374            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22375$as_echo "not found" >&6; }
22376            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22377          fi
22378          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22379$as_echo "$tool_specified" >&6; }
22380        fi
22381      fi
22382    fi
22383
22384  fi
22385
22386
22387
22388
22389  # Publish this variable in the help.
22390
22391
22392  if [ -z "${STAT+x}" ]; then
22393    # The variable is not set by user, try to locate tool using the code snippet
22394    for ac_prog in stat
22395do
22396  # Extract the first word of "$ac_prog", so it can be a program name with args.
22397set dummy $ac_prog; ac_word=$2
22398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22399$as_echo_n "checking for $ac_word... " >&6; }
22400if ${ac_cv_path_STAT+:} false; then :
22401  $as_echo_n "(cached) " >&6
22402else
22403  case $STAT in
22404  [\\/]* | ?:[\\/]*)
22405  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22406  ;;
22407  *)
22408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22409for as_dir in $PATH
22410do
22411  IFS=$as_save_IFS
22412  test -z "$as_dir" && as_dir=.
22413    for ac_exec_ext in '' $ac_executable_extensions; do
22414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22415    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22417    break 2
22418  fi
22419done
22420  done
22421IFS=$as_save_IFS
22422
22423  ;;
22424esac
22425fi
22426STAT=$ac_cv_path_STAT
22427if test -n "$STAT"; then
22428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22429$as_echo "$STAT" >&6; }
22430else
22431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22432$as_echo "no" >&6; }
22433fi
22434
22435
22436  test -n "$STAT" && break
22437done
22438
22439  else
22440    # The variable is set, but is it from the command line or the environment?
22441
22442    # Try to remove the string !STAT! from our list.
22443    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22444    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22445      # If it failed, the variable was not from the command line. Ignore it,
22446      # but warn the user (except for BASH, which is always set by the calling BASH).
22447      if test "xSTAT" != xBASH; then
22448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22449$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22450      fi
22451      # Try to locate tool using the code snippet
22452      for ac_prog in stat
22453do
22454  # Extract the first word of "$ac_prog", so it can be a program name with args.
22455set dummy $ac_prog; ac_word=$2
22456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22457$as_echo_n "checking for $ac_word... " >&6; }
22458if ${ac_cv_path_STAT+:} false; then :
22459  $as_echo_n "(cached) " >&6
22460else
22461  case $STAT in
22462  [\\/]* | ?:[\\/]*)
22463  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22464  ;;
22465  *)
22466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22467for as_dir in $PATH
22468do
22469  IFS=$as_save_IFS
22470  test -z "$as_dir" && as_dir=.
22471    for ac_exec_ext in '' $ac_executable_extensions; do
22472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22473    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22475    break 2
22476  fi
22477done
22478  done
22479IFS=$as_save_IFS
22480
22481  ;;
22482esac
22483fi
22484STAT=$ac_cv_path_STAT
22485if test -n "$STAT"; then
22486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22487$as_echo "$STAT" >&6; }
22488else
22489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22490$as_echo "no" >&6; }
22491fi
22492
22493
22494  test -n "$STAT" && break
22495done
22496
22497    else
22498      # If it succeeded, then it was overridden by the user. We will use it
22499      # for the tool.
22500
22501      # First remove it from the list of overridden variables, so we can test
22502      # for unknown variables in the end.
22503      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22504
22505      # Check if we try to supply an empty value
22506      if test "x$STAT" = x; then
22507        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22508$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22509        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22510$as_echo_n "checking for STAT... " >&6; }
22511        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22512$as_echo "disabled" >&6; }
22513      else
22514        # Check if the provided tool contains a complete path.
22515        tool_specified="$STAT"
22516        tool_basename="${tool_specified##*/}"
22517        if test "x$tool_basename" = "x$tool_specified"; then
22518          # A command without a complete path is provided, search $PATH.
22519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22520$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22521          # Extract the first word of "$tool_basename", so it can be a program name with args.
22522set dummy $tool_basename; ac_word=$2
22523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22524$as_echo_n "checking for $ac_word... " >&6; }
22525if ${ac_cv_path_STAT+:} false; then :
22526  $as_echo_n "(cached) " >&6
22527else
22528  case $STAT in
22529  [\\/]* | ?:[\\/]*)
22530  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22531  ;;
22532  *)
22533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22534for as_dir in $PATH
22535do
22536  IFS=$as_save_IFS
22537  test -z "$as_dir" && as_dir=.
22538    for ac_exec_ext in '' $ac_executable_extensions; do
22539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22540    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22542    break 2
22543  fi
22544done
22545  done
22546IFS=$as_save_IFS
22547
22548  ;;
22549esac
22550fi
22551STAT=$ac_cv_path_STAT
22552if test -n "$STAT"; then
22553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22554$as_echo "$STAT" >&6; }
22555else
22556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22557$as_echo "no" >&6; }
22558fi
22559
22560
22561          if test "x$STAT" = x; then
22562            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22563          fi
22564        else
22565          # Otherwise we believe it is a complete path. Use it as it is.
22566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22567$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22568          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22569$as_echo_n "checking for STAT... " >&6; }
22570          if test ! -x "$tool_specified"; then
22571            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22572$as_echo "not found" >&6; }
22573            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22574          fi
22575          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22576$as_echo "$tool_specified" >&6; }
22577        fi
22578      fi
22579    fi
22580
22581  fi
22582
22583
22584
22585
22586  # Publish this variable in the help.
22587
22588
22589  if [ -z "${TIME+x}" ]; then
22590    # The variable is not set by user, try to locate tool using the code snippet
22591    for ac_prog in time
22592do
22593  # Extract the first word of "$ac_prog", so it can be a program name with args.
22594set dummy $ac_prog; ac_word=$2
22595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22596$as_echo_n "checking for $ac_word... " >&6; }
22597if ${ac_cv_path_TIME+:} false; then :
22598  $as_echo_n "(cached) " >&6
22599else
22600  case $TIME in
22601  [\\/]* | ?:[\\/]*)
22602  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22603  ;;
22604  *)
22605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22606for as_dir in $PATH
22607do
22608  IFS=$as_save_IFS
22609  test -z "$as_dir" && as_dir=.
22610    for ac_exec_ext in '' $ac_executable_extensions; do
22611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22612    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22614    break 2
22615  fi
22616done
22617  done
22618IFS=$as_save_IFS
22619
22620  ;;
22621esac
22622fi
22623TIME=$ac_cv_path_TIME
22624if test -n "$TIME"; then
22625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22626$as_echo "$TIME" >&6; }
22627else
22628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22629$as_echo "no" >&6; }
22630fi
22631
22632
22633  test -n "$TIME" && break
22634done
22635
22636  else
22637    # The variable is set, but is it from the command line or the environment?
22638
22639    # Try to remove the string !TIME! from our list.
22640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22642      # If it failed, the variable was not from the command line. Ignore it,
22643      # but warn the user (except for BASH, which is always set by the calling BASH).
22644      if test "xTIME" != xBASH; then
22645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22646$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22647      fi
22648      # Try to locate tool using the code snippet
22649      for ac_prog in time
22650do
22651  # Extract the first word of "$ac_prog", so it can be a program name with args.
22652set dummy $ac_prog; ac_word=$2
22653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22654$as_echo_n "checking for $ac_word... " >&6; }
22655if ${ac_cv_path_TIME+:} false; then :
22656  $as_echo_n "(cached) " >&6
22657else
22658  case $TIME in
22659  [\\/]* | ?:[\\/]*)
22660  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22661  ;;
22662  *)
22663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22664for as_dir in $PATH
22665do
22666  IFS=$as_save_IFS
22667  test -z "$as_dir" && as_dir=.
22668    for ac_exec_ext in '' $ac_executable_extensions; do
22669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22670    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22672    break 2
22673  fi
22674done
22675  done
22676IFS=$as_save_IFS
22677
22678  ;;
22679esac
22680fi
22681TIME=$ac_cv_path_TIME
22682if test -n "$TIME"; then
22683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22684$as_echo "$TIME" >&6; }
22685else
22686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22687$as_echo "no" >&6; }
22688fi
22689
22690
22691  test -n "$TIME" && break
22692done
22693
22694    else
22695      # If it succeeded, then it was overridden by the user. We will use it
22696      # for the tool.
22697
22698      # First remove it from the list of overridden variables, so we can test
22699      # for unknown variables in the end.
22700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22701
22702      # Check if we try to supply an empty value
22703      if test "x$TIME" = x; then
22704        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22705$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22706        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22707$as_echo_n "checking for TIME... " >&6; }
22708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22709$as_echo "disabled" >&6; }
22710      else
22711        # Check if the provided tool contains a complete path.
22712        tool_specified="$TIME"
22713        tool_basename="${tool_specified##*/}"
22714        if test "x$tool_basename" = "x$tool_specified"; then
22715          # A command without a complete path is provided, search $PATH.
22716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22717$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22718          # Extract the first word of "$tool_basename", so it can be a program name with args.
22719set dummy $tool_basename; ac_word=$2
22720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22721$as_echo_n "checking for $ac_word... " >&6; }
22722if ${ac_cv_path_TIME+:} false; then :
22723  $as_echo_n "(cached) " >&6
22724else
22725  case $TIME in
22726  [\\/]* | ?:[\\/]*)
22727  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22728  ;;
22729  *)
22730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22731for as_dir in $PATH
22732do
22733  IFS=$as_save_IFS
22734  test -z "$as_dir" && as_dir=.
22735    for ac_exec_ext in '' $ac_executable_extensions; do
22736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22737    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22739    break 2
22740  fi
22741done
22742  done
22743IFS=$as_save_IFS
22744
22745  ;;
22746esac
22747fi
22748TIME=$ac_cv_path_TIME
22749if test -n "$TIME"; then
22750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22751$as_echo "$TIME" >&6; }
22752else
22753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22754$as_echo "no" >&6; }
22755fi
22756
22757
22758          if test "x$TIME" = x; then
22759            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22760          fi
22761        else
22762          # Otherwise we believe it is a complete path. Use it as it is.
22763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22764$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22765          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22766$as_echo_n "checking for TIME... " >&6; }
22767          if test ! -x "$tool_specified"; then
22768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22769$as_echo "not found" >&6; }
22770            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22771          fi
22772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22773$as_echo "$tool_specified" >&6; }
22774        fi
22775      fi
22776    fi
22777
22778  fi
22779
22780
22781
22782
22783  # Publish this variable in the help.
22784
22785
22786  if [ -z "${DTRACE+x}" ]; then
22787    # The variable is not set by user, try to locate tool using the code snippet
22788    for ac_prog in dtrace
22789do
22790  # Extract the first word of "$ac_prog", so it can be a program name with args.
22791set dummy $ac_prog; ac_word=$2
22792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22793$as_echo_n "checking for $ac_word... " >&6; }
22794if ${ac_cv_path_DTRACE+:} false; then :
22795  $as_echo_n "(cached) " >&6
22796else
22797  case $DTRACE in
22798  [\\/]* | ?:[\\/]*)
22799  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22800  ;;
22801  *)
22802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22803for as_dir in $PATH
22804do
22805  IFS=$as_save_IFS
22806  test -z "$as_dir" && as_dir=.
22807    for ac_exec_ext in '' $ac_executable_extensions; do
22808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22809    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22811    break 2
22812  fi
22813done
22814  done
22815IFS=$as_save_IFS
22816
22817  ;;
22818esac
22819fi
22820DTRACE=$ac_cv_path_DTRACE
22821if test -n "$DTRACE"; then
22822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22823$as_echo "$DTRACE" >&6; }
22824else
22825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22826$as_echo "no" >&6; }
22827fi
22828
22829
22830  test -n "$DTRACE" && break
22831done
22832
22833  else
22834    # The variable is set, but is it from the command line or the environment?
22835
22836    # Try to remove the string !DTRACE! from our list.
22837    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22838    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22839      # If it failed, the variable was not from the command line. Ignore it,
22840      # but warn the user (except for BASH, which is always set by the calling BASH).
22841      if test "xDTRACE" != xBASH; then
22842        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22843$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22844      fi
22845      # Try to locate tool using the code snippet
22846      for ac_prog in dtrace
22847do
22848  # Extract the first word of "$ac_prog", so it can be a program name with args.
22849set dummy $ac_prog; ac_word=$2
22850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22851$as_echo_n "checking for $ac_word... " >&6; }
22852if ${ac_cv_path_DTRACE+:} false; then :
22853  $as_echo_n "(cached) " >&6
22854else
22855  case $DTRACE in
22856  [\\/]* | ?:[\\/]*)
22857  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22858  ;;
22859  *)
22860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22861for as_dir in $PATH
22862do
22863  IFS=$as_save_IFS
22864  test -z "$as_dir" && as_dir=.
22865    for ac_exec_ext in '' $ac_executable_extensions; do
22866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22867    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22869    break 2
22870  fi
22871done
22872  done
22873IFS=$as_save_IFS
22874
22875  ;;
22876esac
22877fi
22878DTRACE=$ac_cv_path_DTRACE
22879if test -n "$DTRACE"; then
22880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22881$as_echo "$DTRACE" >&6; }
22882else
22883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22884$as_echo "no" >&6; }
22885fi
22886
22887
22888  test -n "$DTRACE" && break
22889done
22890
22891    else
22892      # If it succeeded, then it was overridden by the user. We will use it
22893      # for the tool.
22894
22895      # First remove it from the list of overridden variables, so we can test
22896      # for unknown variables in the end.
22897      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22898
22899      # Check if we try to supply an empty value
22900      if test "x$DTRACE" = x; then
22901        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22902$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22903        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22904$as_echo_n "checking for DTRACE... " >&6; }
22905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22906$as_echo "disabled" >&6; }
22907      else
22908        # Check if the provided tool contains a complete path.
22909        tool_specified="$DTRACE"
22910        tool_basename="${tool_specified##*/}"
22911        if test "x$tool_basename" = "x$tool_specified"; then
22912          # A command without a complete path is provided, search $PATH.
22913          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22914$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22915          # Extract the first word of "$tool_basename", so it can be a program name with args.
22916set dummy $tool_basename; ac_word=$2
22917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22918$as_echo_n "checking for $ac_word... " >&6; }
22919if ${ac_cv_path_DTRACE+:} false; then :
22920  $as_echo_n "(cached) " >&6
22921else
22922  case $DTRACE in
22923  [\\/]* | ?:[\\/]*)
22924  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22925  ;;
22926  *)
22927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22928for as_dir in $PATH
22929do
22930  IFS=$as_save_IFS
22931  test -z "$as_dir" && as_dir=.
22932    for ac_exec_ext in '' $ac_executable_extensions; do
22933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22934    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22936    break 2
22937  fi
22938done
22939  done
22940IFS=$as_save_IFS
22941
22942  ;;
22943esac
22944fi
22945DTRACE=$ac_cv_path_DTRACE
22946if test -n "$DTRACE"; then
22947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22948$as_echo "$DTRACE" >&6; }
22949else
22950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22951$as_echo "no" >&6; }
22952fi
22953
22954
22955          if test "x$DTRACE" = x; then
22956            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22957          fi
22958        else
22959          # Otherwise we believe it is a complete path. Use it as it is.
22960          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22961$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22962          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22963$as_echo_n "checking for DTRACE... " >&6; }
22964          if test ! -x "$tool_specified"; then
22965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22966$as_echo "not found" >&6; }
22967            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22968          fi
22969          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22970$as_echo "$tool_specified" >&6; }
22971        fi
22972      fi
22973    fi
22974
22975  fi
22976
22977
22978
22979
22980  # Publish this variable in the help.
22981
22982
22983  if [ -z "${PATCH+x}" ]; then
22984    # The variable is not set by user, try to locate tool using the code snippet
22985    for ac_prog in gpatch patch
22986do
22987  # Extract the first word of "$ac_prog", so it can be a program name with args.
22988set dummy $ac_prog; ac_word=$2
22989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22990$as_echo_n "checking for $ac_word... " >&6; }
22991if ${ac_cv_path_PATCH+:} false; then :
22992  $as_echo_n "(cached) " >&6
22993else
22994  case $PATCH in
22995  [\\/]* | ?:[\\/]*)
22996  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22997  ;;
22998  *)
22999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23000for as_dir in $PATH
23001do
23002  IFS=$as_save_IFS
23003  test -z "$as_dir" && as_dir=.
23004    for ac_exec_ext in '' $ac_executable_extensions; do
23005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23006    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23008    break 2
23009  fi
23010done
23011  done
23012IFS=$as_save_IFS
23013
23014  ;;
23015esac
23016fi
23017PATCH=$ac_cv_path_PATCH
23018if test -n "$PATCH"; then
23019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23020$as_echo "$PATCH" >&6; }
23021else
23022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23023$as_echo "no" >&6; }
23024fi
23025
23026
23027  test -n "$PATCH" && break
23028done
23029
23030  else
23031    # The variable is set, but is it from the command line or the environment?
23032
23033    # Try to remove the string !PATCH! from our list.
23034    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23035    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23036      # If it failed, the variable was not from the command line. Ignore it,
23037      # but warn the user (except for BASH, which is always set by the calling BASH).
23038      if test "xPATCH" != xBASH; then
23039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23040$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23041      fi
23042      # Try to locate tool using the code snippet
23043      for ac_prog in gpatch patch
23044do
23045  # Extract the first word of "$ac_prog", so it can be a program name with args.
23046set dummy $ac_prog; ac_word=$2
23047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23048$as_echo_n "checking for $ac_word... " >&6; }
23049if ${ac_cv_path_PATCH+:} false; then :
23050  $as_echo_n "(cached) " >&6
23051else
23052  case $PATCH in
23053  [\\/]* | ?:[\\/]*)
23054  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23055  ;;
23056  *)
23057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23058for as_dir in $PATH
23059do
23060  IFS=$as_save_IFS
23061  test -z "$as_dir" && as_dir=.
23062    for ac_exec_ext in '' $ac_executable_extensions; do
23063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23064    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23066    break 2
23067  fi
23068done
23069  done
23070IFS=$as_save_IFS
23071
23072  ;;
23073esac
23074fi
23075PATCH=$ac_cv_path_PATCH
23076if test -n "$PATCH"; then
23077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23078$as_echo "$PATCH" >&6; }
23079else
23080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23081$as_echo "no" >&6; }
23082fi
23083
23084
23085  test -n "$PATCH" && break
23086done
23087
23088    else
23089      # If it succeeded, then it was overridden by the user. We will use it
23090      # for the tool.
23091
23092      # First remove it from the list of overridden variables, so we can test
23093      # for unknown variables in the end.
23094      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23095
23096      # Check if we try to supply an empty value
23097      if test "x$PATCH" = x; then
23098        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23099$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23101$as_echo_n "checking for PATCH... " >&6; }
23102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23103$as_echo "disabled" >&6; }
23104      else
23105        # Check if the provided tool contains a complete path.
23106        tool_specified="$PATCH"
23107        tool_basename="${tool_specified##*/}"
23108        if test "x$tool_basename" = "x$tool_specified"; then
23109          # A command without a complete path is provided, search $PATH.
23110          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23111$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23112          # Extract the first word of "$tool_basename", so it can be a program name with args.
23113set dummy $tool_basename; ac_word=$2
23114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23115$as_echo_n "checking for $ac_word... " >&6; }
23116if ${ac_cv_path_PATCH+:} false; then :
23117  $as_echo_n "(cached) " >&6
23118else
23119  case $PATCH in
23120  [\\/]* | ?:[\\/]*)
23121  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23122  ;;
23123  *)
23124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23125for as_dir in $PATH
23126do
23127  IFS=$as_save_IFS
23128  test -z "$as_dir" && as_dir=.
23129    for ac_exec_ext in '' $ac_executable_extensions; do
23130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23131    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23133    break 2
23134  fi
23135done
23136  done
23137IFS=$as_save_IFS
23138
23139  ;;
23140esac
23141fi
23142PATCH=$ac_cv_path_PATCH
23143if test -n "$PATCH"; then
23144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23145$as_echo "$PATCH" >&6; }
23146else
23147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23148$as_echo "no" >&6; }
23149fi
23150
23151
23152          if test "x$PATCH" = x; then
23153            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23154          fi
23155        else
23156          # Otherwise we believe it is a complete path. Use it as it is.
23157          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23158$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23159          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23160$as_echo_n "checking for PATCH... " >&6; }
23161          if test ! -x "$tool_specified"; then
23162            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23163$as_echo "not found" >&6; }
23164            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23165          fi
23166          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23167$as_echo "$tool_specified" >&6; }
23168        fi
23169      fi
23170    fi
23171
23172  fi
23173
23174
23175  # Check if it's GNU time
23176  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23177  if test "x$IS_GNU_TIME" != x; then
23178    IS_GNU_TIME=yes
23179  else
23180    IS_GNU_TIME=no
23181  fi
23182
23183
23184  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23185
23186
23187
23188  # Publish this variable in the help.
23189
23190
23191  if [ -z "${DSYMUTIL+x}" ]; then
23192    # The variable is not set by user, try to locate tool using the code snippet
23193    for ac_prog in dsymutil
23194do
23195  # Extract the first word of "$ac_prog", so it can be a program name with args.
23196set dummy $ac_prog; ac_word=$2
23197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23198$as_echo_n "checking for $ac_word... " >&6; }
23199if ${ac_cv_path_DSYMUTIL+:} false; then :
23200  $as_echo_n "(cached) " >&6
23201else
23202  case $DSYMUTIL in
23203  [\\/]* | ?:[\\/]*)
23204  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23205  ;;
23206  *)
23207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23208for as_dir in $PATH
23209do
23210  IFS=$as_save_IFS
23211  test -z "$as_dir" && as_dir=.
23212    for ac_exec_ext in '' $ac_executable_extensions; do
23213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23214    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23216    break 2
23217  fi
23218done
23219  done
23220IFS=$as_save_IFS
23221
23222  ;;
23223esac
23224fi
23225DSYMUTIL=$ac_cv_path_DSYMUTIL
23226if test -n "$DSYMUTIL"; then
23227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23228$as_echo "$DSYMUTIL" >&6; }
23229else
23230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23231$as_echo "no" >&6; }
23232fi
23233
23234
23235  test -n "$DSYMUTIL" && break
23236done
23237
23238  else
23239    # The variable is set, but is it from the command line or the environment?
23240
23241    # Try to remove the string !DSYMUTIL! from our list.
23242    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23243    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23244      # If it failed, the variable was not from the command line. Ignore it,
23245      # but warn the user (except for BASH, which is always set by the calling BASH).
23246      if test "xDSYMUTIL" != xBASH; then
23247        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23248$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23249      fi
23250      # Try to locate tool using the code snippet
23251      for ac_prog in dsymutil
23252do
23253  # Extract the first word of "$ac_prog", so it can be a program name with args.
23254set dummy $ac_prog; ac_word=$2
23255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23256$as_echo_n "checking for $ac_word... " >&6; }
23257if ${ac_cv_path_DSYMUTIL+:} false; then :
23258  $as_echo_n "(cached) " >&6
23259else
23260  case $DSYMUTIL in
23261  [\\/]* | ?:[\\/]*)
23262  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23263  ;;
23264  *)
23265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23266for as_dir in $PATH
23267do
23268  IFS=$as_save_IFS
23269  test -z "$as_dir" && as_dir=.
23270    for ac_exec_ext in '' $ac_executable_extensions; do
23271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23272    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23274    break 2
23275  fi
23276done
23277  done
23278IFS=$as_save_IFS
23279
23280  ;;
23281esac
23282fi
23283DSYMUTIL=$ac_cv_path_DSYMUTIL
23284if test -n "$DSYMUTIL"; then
23285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23286$as_echo "$DSYMUTIL" >&6; }
23287else
23288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23289$as_echo "no" >&6; }
23290fi
23291
23292
23293  test -n "$DSYMUTIL" && break
23294done
23295
23296    else
23297      # If it succeeded, then it was overridden by the user. We will use it
23298      # for the tool.
23299
23300      # First remove it from the list of overridden variables, so we can test
23301      # for unknown variables in the end.
23302      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23303
23304      # Check if we try to supply an empty value
23305      if test "x$DSYMUTIL" = x; then
23306        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23307$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23308        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23309$as_echo_n "checking for DSYMUTIL... " >&6; }
23310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23311$as_echo "disabled" >&6; }
23312      else
23313        # Check if the provided tool contains a complete path.
23314        tool_specified="$DSYMUTIL"
23315        tool_basename="${tool_specified##*/}"
23316        if test "x$tool_basename" = "x$tool_specified"; then
23317          # A command without a complete path is provided, search $PATH.
23318          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23319$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23320          # Extract the first word of "$tool_basename", so it can be a program name with args.
23321set dummy $tool_basename; ac_word=$2
23322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23323$as_echo_n "checking for $ac_word... " >&6; }
23324if ${ac_cv_path_DSYMUTIL+:} false; then :
23325  $as_echo_n "(cached) " >&6
23326else
23327  case $DSYMUTIL in
23328  [\\/]* | ?:[\\/]*)
23329  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23330  ;;
23331  *)
23332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23333for as_dir in $PATH
23334do
23335  IFS=$as_save_IFS
23336  test -z "$as_dir" && as_dir=.
23337    for ac_exec_ext in '' $ac_executable_extensions; do
23338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23339    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23341    break 2
23342  fi
23343done
23344  done
23345IFS=$as_save_IFS
23346
23347  ;;
23348esac
23349fi
23350DSYMUTIL=$ac_cv_path_DSYMUTIL
23351if test -n "$DSYMUTIL"; then
23352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23353$as_echo "$DSYMUTIL" >&6; }
23354else
23355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23356$as_echo "no" >&6; }
23357fi
23358
23359
23360          if test "x$DSYMUTIL" = x; then
23361            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23362          fi
23363        else
23364          # Otherwise we believe it is a complete path. Use it as it is.
23365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23366$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23367          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23368$as_echo_n "checking for DSYMUTIL... " >&6; }
23369          if test ! -x "$tool_specified"; then
23370            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23371$as_echo "not found" >&6; }
23372            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23373          fi
23374          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23375$as_echo "$tool_specified" >&6; }
23376        fi
23377      fi
23378    fi
23379
23380  fi
23381
23382
23383
23384  if test "x$DSYMUTIL" = x; then
23385    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23386  fi
23387
23388
23389
23390
23391
23392  # Publish this variable in the help.
23393
23394
23395  if [ -z "${XATTR+x}" ]; then
23396    # The variable is not set by user, try to locate tool using the code snippet
23397    for ac_prog in xattr
23398do
23399  # Extract the first word of "$ac_prog", so it can be a program name with args.
23400set dummy $ac_prog; ac_word=$2
23401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23402$as_echo_n "checking for $ac_word... " >&6; }
23403if ${ac_cv_path_XATTR+:} false; then :
23404  $as_echo_n "(cached) " >&6
23405else
23406  case $XATTR in
23407  [\\/]* | ?:[\\/]*)
23408  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23409  ;;
23410  *)
23411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23412for as_dir in $PATH
23413do
23414  IFS=$as_save_IFS
23415  test -z "$as_dir" && as_dir=.
23416    for ac_exec_ext in '' $ac_executable_extensions; do
23417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23418    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23420    break 2
23421  fi
23422done
23423  done
23424IFS=$as_save_IFS
23425
23426  ;;
23427esac
23428fi
23429XATTR=$ac_cv_path_XATTR
23430if test -n "$XATTR"; then
23431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23432$as_echo "$XATTR" >&6; }
23433else
23434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23435$as_echo "no" >&6; }
23436fi
23437
23438
23439  test -n "$XATTR" && break
23440done
23441
23442  else
23443    # The variable is set, but is it from the command line or the environment?
23444
23445    # Try to remove the string !XATTR! from our list.
23446    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23447    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23448      # If it failed, the variable was not from the command line. Ignore it,
23449      # but warn the user (except for BASH, which is always set by the calling BASH).
23450      if test "xXATTR" != xBASH; then
23451        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23452$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23453      fi
23454      # Try to locate tool using the code snippet
23455      for ac_prog in xattr
23456do
23457  # Extract the first word of "$ac_prog", so it can be a program name with args.
23458set dummy $ac_prog; ac_word=$2
23459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23460$as_echo_n "checking for $ac_word... " >&6; }
23461if ${ac_cv_path_XATTR+:} false; then :
23462  $as_echo_n "(cached) " >&6
23463else
23464  case $XATTR in
23465  [\\/]* | ?:[\\/]*)
23466  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23467  ;;
23468  *)
23469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23470for as_dir in $PATH
23471do
23472  IFS=$as_save_IFS
23473  test -z "$as_dir" && as_dir=.
23474    for ac_exec_ext in '' $ac_executable_extensions; do
23475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23476    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23478    break 2
23479  fi
23480done
23481  done
23482IFS=$as_save_IFS
23483
23484  ;;
23485esac
23486fi
23487XATTR=$ac_cv_path_XATTR
23488if test -n "$XATTR"; then
23489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23490$as_echo "$XATTR" >&6; }
23491else
23492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23493$as_echo "no" >&6; }
23494fi
23495
23496
23497  test -n "$XATTR" && break
23498done
23499
23500    else
23501      # If it succeeded, then it was overridden by the user. We will use it
23502      # for the tool.
23503
23504      # First remove it from the list of overridden variables, so we can test
23505      # for unknown variables in the end.
23506      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23507
23508      # Check if we try to supply an empty value
23509      if test "x$XATTR" = x; then
23510        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23511$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23512        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23513$as_echo_n "checking for XATTR... " >&6; }
23514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23515$as_echo "disabled" >&6; }
23516      else
23517        # Check if the provided tool contains a complete path.
23518        tool_specified="$XATTR"
23519        tool_basename="${tool_specified##*/}"
23520        if test "x$tool_basename" = "x$tool_specified"; then
23521          # A command without a complete path is provided, search $PATH.
23522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23523$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23524          # Extract the first word of "$tool_basename", so it can be a program name with args.
23525set dummy $tool_basename; ac_word=$2
23526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23527$as_echo_n "checking for $ac_word... " >&6; }
23528if ${ac_cv_path_XATTR+:} false; then :
23529  $as_echo_n "(cached) " >&6
23530else
23531  case $XATTR in
23532  [\\/]* | ?:[\\/]*)
23533  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23534  ;;
23535  *)
23536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23537for as_dir in $PATH
23538do
23539  IFS=$as_save_IFS
23540  test -z "$as_dir" && as_dir=.
23541    for ac_exec_ext in '' $ac_executable_extensions; do
23542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23543    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23545    break 2
23546  fi
23547done
23548  done
23549IFS=$as_save_IFS
23550
23551  ;;
23552esac
23553fi
23554XATTR=$ac_cv_path_XATTR
23555if test -n "$XATTR"; then
23556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23557$as_echo "$XATTR" >&6; }
23558else
23559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23560$as_echo "no" >&6; }
23561fi
23562
23563
23564          if test "x$XATTR" = x; then
23565            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23566          fi
23567        else
23568          # Otherwise we believe it is a complete path. Use it as it is.
23569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23570$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23571          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23572$as_echo_n "checking for XATTR... " >&6; }
23573          if test ! -x "$tool_specified"; then
23574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23575$as_echo "not found" >&6; }
23576            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23577          fi
23578          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23579$as_echo "$tool_specified" >&6; }
23580        fi
23581      fi
23582    fi
23583
23584  fi
23585
23586
23587
23588  if test "x$XATTR" = x; then
23589    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23590  fi
23591
23592
23593
23594
23595  # Publish this variable in the help.
23596
23597
23598  if [ -z "${CODESIGN+x}" ]; then
23599    # The variable is not set by user, try to locate tool using the code snippet
23600    for ac_prog in codesign
23601do
23602  # Extract the first word of "$ac_prog", so it can be a program name with args.
23603set dummy $ac_prog; ac_word=$2
23604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23605$as_echo_n "checking for $ac_word... " >&6; }
23606if ${ac_cv_path_CODESIGN+:} false; then :
23607  $as_echo_n "(cached) " >&6
23608else
23609  case $CODESIGN in
23610  [\\/]* | ?:[\\/]*)
23611  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23612  ;;
23613  *)
23614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23615for as_dir in $PATH
23616do
23617  IFS=$as_save_IFS
23618  test -z "$as_dir" && as_dir=.
23619    for ac_exec_ext in '' $ac_executable_extensions; do
23620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23621    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23623    break 2
23624  fi
23625done
23626  done
23627IFS=$as_save_IFS
23628
23629  ;;
23630esac
23631fi
23632CODESIGN=$ac_cv_path_CODESIGN
23633if test -n "$CODESIGN"; then
23634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23635$as_echo "$CODESIGN" >&6; }
23636else
23637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23638$as_echo "no" >&6; }
23639fi
23640
23641
23642  test -n "$CODESIGN" && break
23643done
23644
23645  else
23646    # The variable is set, but is it from the command line or the environment?
23647
23648    # Try to remove the string !CODESIGN! from our list.
23649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23651      # If it failed, the variable was not from the command line. Ignore it,
23652      # but warn the user (except for BASH, which is always set by the calling BASH).
23653      if test "xCODESIGN" != xBASH; then
23654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23655$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23656      fi
23657      # Try to locate tool using the code snippet
23658      for ac_prog in codesign
23659do
23660  # Extract the first word of "$ac_prog", so it can be a program name with args.
23661set dummy $ac_prog; ac_word=$2
23662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23663$as_echo_n "checking for $ac_word... " >&6; }
23664if ${ac_cv_path_CODESIGN+:} false; then :
23665  $as_echo_n "(cached) " >&6
23666else
23667  case $CODESIGN in
23668  [\\/]* | ?:[\\/]*)
23669  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23670  ;;
23671  *)
23672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23673for as_dir in $PATH
23674do
23675  IFS=$as_save_IFS
23676  test -z "$as_dir" && as_dir=.
23677    for ac_exec_ext in '' $ac_executable_extensions; do
23678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23679    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23681    break 2
23682  fi
23683done
23684  done
23685IFS=$as_save_IFS
23686
23687  ;;
23688esac
23689fi
23690CODESIGN=$ac_cv_path_CODESIGN
23691if test -n "$CODESIGN"; then
23692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23693$as_echo "$CODESIGN" >&6; }
23694else
23695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23696$as_echo "no" >&6; }
23697fi
23698
23699
23700  test -n "$CODESIGN" && break
23701done
23702
23703    else
23704      # If it succeeded, then it was overridden by the user. We will use it
23705      # for the tool.
23706
23707      # First remove it from the list of overridden variables, so we can test
23708      # for unknown variables in the end.
23709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23710
23711      # Check if we try to supply an empty value
23712      if test "x$CODESIGN" = x; then
23713        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23714$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23716$as_echo_n "checking for CODESIGN... " >&6; }
23717        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23718$as_echo "disabled" >&6; }
23719      else
23720        # Check if the provided tool contains a complete path.
23721        tool_specified="$CODESIGN"
23722        tool_basename="${tool_specified##*/}"
23723        if test "x$tool_basename" = "x$tool_specified"; then
23724          # A command without a complete path is provided, search $PATH.
23725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23726$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23727          # Extract the first word of "$tool_basename", so it can be a program name with args.
23728set dummy $tool_basename; ac_word=$2
23729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23730$as_echo_n "checking for $ac_word... " >&6; }
23731if ${ac_cv_path_CODESIGN+:} false; then :
23732  $as_echo_n "(cached) " >&6
23733else
23734  case $CODESIGN in
23735  [\\/]* | ?:[\\/]*)
23736  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23737  ;;
23738  *)
23739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23740for as_dir in $PATH
23741do
23742  IFS=$as_save_IFS
23743  test -z "$as_dir" && as_dir=.
23744    for ac_exec_ext in '' $ac_executable_extensions; do
23745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23746    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23748    break 2
23749  fi
23750done
23751  done
23752IFS=$as_save_IFS
23753
23754  ;;
23755esac
23756fi
23757CODESIGN=$ac_cv_path_CODESIGN
23758if test -n "$CODESIGN"; then
23759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23760$as_echo "$CODESIGN" >&6; }
23761else
23762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23763$as_echo "no" >&6; }
23764fi
23765
23766
23767          if test "x$CODESIGN" = x; then
23768            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23769          fi
23770        else
23771          # Otherwise we believe it is a complete path. Use it as it is.
23772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23773$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23774          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23775$as_echo_n "checking for CODESIGN... " >&6; }
23776          if test ! -x "$tool_specified"; then
23777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23778$as_echo "not found" >&6; }
23779            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23780          fi
23781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23782$as_echo "$tool_specified" >&6; }
23783        fi
23784      fi
23785    fi
23786
23787  fi
23788
23789
23790    if test "x$CODESIGN" != "x"; then
23791      # Verify that the openjdk_codesign certificate is present
23792      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23793$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23794      $RM codesign-testfile
23795      $TOUCH codesign-testfile
23796      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23797      $RM codesign-testfile
23798      if test "x$CODESIGN" = x; then
23799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23800$as_echo "no" >&6; }
23801      else
23802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23803$as_echo "yes" >&6; }
23804      fi
23805    fi
23806
23807
23808
23809  # Publish this variable in the help.
23810
23811
23812  if [ -z "${SETFILE+x}" ]; then
23813    # The variable is not set by user, try to locate tool using the code snippet
23814    for ac_prog in SetFile
23815do
23816  # Extract the first word of "$ac_prog", so it can be a program name with args.
23817set dummy $ac_prog; ac_word=$2
23818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23819$as_echo_n "checking for $ac_word... " >&6; }
23820if ${ac_cv_path_SETFILE+:} false; then :
23821  $as_echo_n "(cached) " >&6
23822else
23823  case $SETFILE in
23824  [\\/]* | ?:[\\/]*)
23825  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23826  ;;
23827  *)
23828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23829for as_dir in $PATH
23830do
23831  IFS=$as_save_IFS
23832  test -z "$as_dir" && as_dir=.
23833    for ac_exec_ext in '' $ac_executable_extensions; do
23834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23835    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23837    break 2
23838  fi
23839done
23840  done
23841IFS=$as_save_IFS
23842
23843  ;;
23844esac
23845fi
23846SETFILE=$ac_cv_path_SETFILE
23847if test -n "$SETFILE"; then
23848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23849$as_echo "$SETFILE" >&6; }
23850else
23851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23852$as_echo "no" >&6; }
23853fi
23854
23855
23856  test -n "$SETFILE" && break
23857done
23858
23859  else
23860    # The variable is set, but is it from the command line or the environment?
23861
23862    # Try to remove the string !SETFILE! from our list.
23863    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23864    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23865      # If it failed, the variable was not from the command line. Ignore it,
23866      # but warn the user (except for BASH, which is always set by the calling BASH).
23867      if test "xSETFILE" != xBASH; then
23868        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23869$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23870      fi
23871      # Try to locate tool using the code snippet
23872      for ac_prog in SetFile
23873do
23874  # Extract the first word of "$ac_prog", so it can be a program name with args.
23875set dummy $ac_prog; ac_word=$2
23876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23877$as_echo_n "checking for $ac_word... " >&6; }
23878if ${ac_cv_path_SETFILE+:} false; then :
23879  $as_echo_n "(cached) " >&6
23880else
23881  case $SETFILE in
23882  [\\/]* | ?:[\\/]*)
23883  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23884  ;;
23885  *)
23886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23887for as_dir in $PATH
23888do
23889  IFS=$as_save_IFS
23890  test -z "$as_dir" && as_dir=.
23891    for ac_exec_ext in '' $ac_executable_extensions; do
23892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23893    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23895    break 2
23896  fi
23897done
23898  done
23899IFS=$as_save_IFS
23900
23901  ;;
23902esac
23903fi
23904SETFILE=$ac_cv_path_SETFILE
23905if test -n "$SETFILE"; then
23906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23907$as_echo "$SETFILE" >&6; }
23908else
23909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23910$as_echo "no" >&6; }
23911fi
23912
23913
23914  test -n "$SETFILE" && break
23915done
23916
23917    else
23918      # If it succeeded, then it was overridden by the user. We will use it
23919      # for the tool.
23920
23921      # First remove it from the list of overridden variables, so we can test
23922      # for unknown variables in the end.
23923      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23924
23925      # Check if we try to supply an empty value
23926      if test "x$SETFILE" = x; then
23927        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23928$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23929        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23930$as_echo_n "checking for SETFILE... " >&6; }
23931        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23932$as_echo "disabled" >&6; }
23933      else
23934        # Check if the provided tool contains a complete path.
23935        tool_specified="$SETFILE"
23936        tool_basename="${tool_specified##*/}"
23937        if test "x$tool_basename" = "x$tool_specified"; then
23938          # A command without a complete path is provided, search $PATH.
23939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23940$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23941          # Extract the first word of "$tool_basename", so it can be a program name with args.
23942set dummy $tool_basename; ac_word=$2
23943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23944$as_echo_n "checking for $ac_word... " >&6; }
23945if ${ac_cv_path_SETFILE+:} false; then :
23946  $as_echo_n "(cached) " >&6
23947else
23948  case $SETFILE in
23949  [\\/]* | ?:[\\/]*)
23950  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23951  ;;
23952  *)
23953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23954for as_dir in $PATH
23955do
23956  IFS=$as_save_IFS
23957  test -z "$as_dir" && as_dir=.
23958    for ac_exec_ext in '' $ac_executable_extensions; do
23959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23960    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23962    break 2
23963  fi
23964done
23965  done
23966IFS=$as_save_IFS
23967
23968  ;;
23969esac
23970fi
23971SETFILE=$ac_cv_path_SETFILE
23972if test -n "$SETFILE"; then
23973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23974$as_echo "$SETFILE" >&6; }
23975else
23976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23977$as_echo "no" >&6; }
23978fi
23979
23980
23981          if test "x$SETFILE" = x; then
23982            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23983          fi
23984        else
23985          # Otherwise we believe it is a complete path. Use it as it is.
23986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23987$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23988          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23989$as_echo_n "checking for SETFILE... " >&6; }
23990          if test ! -x "$tool_specified"; then
23991            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23992$as_echo "not found" >&6; }
23993            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23994          fi
23995          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23996$as_echo "$tool_specified" >&6; }
23997        fi
23998      fi
23999    fi
24000
24001  fi
24002
24003
24004
24005  if test "x$SETFILE" = x; then
24006    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24007  fi
24008
24009
24010  fi
24011
24012
24013  # Test if bash supports pipefail.
24014  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24015$as_echo_n "checking if bash supports pipefail... " >&6; }
24016  if ${BASH} -c 'set -o pipefail'; then
24017    BASH_ARGS="$BASH_ARGS -o pipefail"
24018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24019$as_echo "yes" >&6; }
24020  else
24021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24022$as_echo "no" >&6; }
24023  fi
24024
24025  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24026$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24027  if ${BASH} -e -c 'true'; then
24028    BASH_ARGS="$BASH_ARGS -e"
24029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24030$as_echo "yes" >&6; }
24031  else
24032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24033$as_echo "no" >&6; }
24034  fi
24035
24036
24037
24038
24039# Check if pkg-config is available.
24040
24041
24042if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24043	if test -n "$ac_tool_prefix"; then
24044  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24045set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24047$as_echo_n "checking for $ac_word... " >&6; }
24048if ${ac_cv_path_PKG_CONFIG+:} false; then :
24049  $as_echo_n "(cached) " >&6
24050else
24051  case $PKG_CONFIG in
24052  [\\/]* | ?:[\\/]*)
24053  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24054  ;;
24055  *)
24056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24057for as_dir in $PATH
24058do
24059  IFS=$as_save_IFS
24060  test -z "$as_dir" && as_dir=.
24061    for ac_exec_ext in '' $ac_executable_extensions; do
24062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24063    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24065    break 2
24066  fi
24067done
24068  done
24069IFS=$as_save_IFS
24070
24071  ;;
24072esac
24073fi
24074PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24075if test -n "$PKG_CONFIG"; then
24076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24077$as_echo "$PKG_CONFIG" >&6; }
24078else
24079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24080$as_echo "no" >&6; }
24081fi
24082
24083
24084fi
24085if test -z "$ac_cv_path_PKG_CONFIG"; then
24086  ac_pt_PKG_CONFIG=$PKG_CONFIG
24087  # Extract the first word of "pkg-config", so it can be a program name with args.
24088set dummy pkg-config; ac_word=$2
24089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24090$as_echo_n "checking for $ac_word... " >&6; }
24091if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24092  $as_echo_n "(cached) " >&6
24093else
24094  case $ac_pt_PKG_CONFIG in
24095  [\\/]* | ?:[\\/]*)
24096  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24097  ;;
24098  *)
24099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24100for as_dir in $PATH
24101do
24102  IFS=$as_save_IFS
24103  test -z "$as_dir" && as_dir=.
24104    for ac_exec_ext in '' $ac_executable_extensions; do
24105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24106    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24108    break 2
24109  fi
24110done
24111  done
24112IFS=$as_save_IFS
24113
24114  ;;
24115esac
24116fi
24117ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24118if test -n "$ac_pt_PKG_CONFIG"; then
24119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24120$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24121else
24122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24123$as_echo "no" >&6; }
24124fi
24125
24126  if test "x$ac_pt_PKG_CONFIG" = x; then
24127    PKG_CONFIG=""
24128  else
24129    case $cross_compiling:$ac_tool_warned in
24130yes:)
24131{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24132$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24133ac_tool_warned=yes ;;
24134esac
24135    PKG_CONFIG=$ac_pt_PKG_CONFIG
24136  fi
24137else
24138  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24139fi
24140
24141fi
24142if test -n "$PKG_CONFIG"; then
24143	_pkg_min_version=0.9.0
24144	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24145$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24146	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24147		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24148$as_echo "yes" >&6; }
24149	else
24150		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24151$as_echo "no" >&6; }
24152		PKG_CONFIG=""
24153	fi
24154
24155fi
24156
24157# After basic tools have been setup, we can check build os specific details.
24158
24159  ###############################################################################
24160
24161  # Note that this is the build platform OS version!
24162
24163  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24164  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24165  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24166  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24167
24168
24169
24170
24171
24172# Misc basic settings
24173
24174
24175# Check whether --with-default-make-target was given.
24176if test "${with_default_make_target+set}" = set; then :
24177  withval=$with_default_make_target;
24178fi
24179
24180  if test "x$with_default_make_target" = "x" \
24181      || test "x$with_default_make_target" = "xyes"; then
24182    DEFAULT_MAKE_TARGET="exploded-image"
24183  elif test "x$with_default_make_target" = "xno"; then
24184    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24185  else
24186    DEFAULT_MAKE_TARGET="$with_default_make_target"
24187  fi
24188
24189
24190
24191
24192###############################################################################
24193#
24194# Determine OpenJDK variants, options and version numbers.
24195#
24196###############################################################################
24197
24198# We need build & target for this.
24199
24200  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
24201  # We always build headless support.
24202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
24203$as_echo_n "checking headful support... " >&6; }
24204  # Check whether --enable-headful was given.
24205if test "${enable_headful+set}" = set; then :
24206  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
24207else
24208  SUPPORT_HEADFUL=yes
24209fi
24210
24211
24212  SUPPORT_HEADLESS=yes
24213  BUILD_HEADLESS="BUILD_HEADLESS:=true"
24214
24215  if test "x$SUPPORT_HEADFUL" = xyes; then
24216    # We are building both headful and headless.
24217    headful_msg="include support for both headful and headless"
24218  fi
24219
24220  if test "x$SUPPORT_HEADFUL" = xno; then
24221    # Thus we are building headless only.
24222    BUILD_HEADLESS="BUILD_HEADLESS:=true"
24223    headful_msg="headless only"
24224  fi
24225
24226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
24227$as_echo "$headful_msg" >&6; }
24228
24229
24230
24231
24232
24233  # Choose cacerts source file
24234
24235# Check whether --with-cacerts-file was given.
24236if test "${with_cacerts_file+set}" = set; then :
24237  withval=$with_cacerts_file;
24238fi
24239
24240  if test "x$with_cacerts_file" != x; then
24241    CACERTS_FILE=$with_cacerts_file
24242  fi
24243
24244
24245  # Enable or disable unlimited crypto
24246  # Check whether --enable-unlimited-crypto was given.
24247if test "${enable_unlimited_crypto+set}" = set; then :
24248  enableval=$enable_unlimited_crypto;
24249else
24250  enable_unlimited_crypto=no
24251fi
24252
24253  if test "x$enable_unlimited_crypto" = "xyes"; then
24254    UNLIMITED_CRYPTO=true
24255  else
24256    UNLIMITED_CRYPTO=false
24257  fi
24258
24259
24260  # Should we build the serviceability agent (SA)?
24261  INCLUDE_SA=true
24262  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24263    INCLUDE_SA=false
24264  fi
24265  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24266    INCLUDE_SA=false
24267  fi
24268
24269
24270  # Compress jars
24271  COMPRESS_JARS=false
24272
24273
24274
24275  # Setup default copyright year. Mostly overridden when building close to a new year.
24276
24277# Check whether --with-copyright-year was given.
24278if test "${with_copyright_year+set}" = set; then :
24279  withval=$with_copyright_year;
24280fi
24281
24282  if test "x$with_copyright_year" = xyes; then
24283    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24284  elif test "x$with_copyright_year" != x; then
24285    COPYRIGHT_YEAR="$with_copyright_year"
24286  else
24287    COPYRIGHT_YEAR=`$DATE +'%Y'`
24288  fi
24289
24290
24291
24292  # Check whether --enable-keep-packaged-modules was given.
24293if test "${enable_keep_packaged_modules+set}" = set; then :
24294  enableval=$enable_keep_packaged_modules;
24295fi
24296
24297
24298  if test "x$enable_keep_packaged_modules" = "xyes"; then
24299    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24300$as_echo_n "checking if packaged modules are kept... " >&6; }
24301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24302$as_echo "yes" >&6; }
24303    JLINK_KEEP_PACKAGED_MODULES=true
24304  elif test "x$enable_keep_packaged_modules" = "xno"; then
24305    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24306$as_echo_n "checking if packaged modules are kept... " >&6; }
24307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24308$as_echo "no" >&6; }
24309    JLINK_KEEP_PACKAGED_MODULES=false
24310  elif test "x$enable_keep_packaged_modules" = "x"; then
24311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24312$as_echo "yes (default)" >&6; }
24313    JLINK_KEEP_PACKAGED_MODULES=true
24314  else
24315    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24316  fi
24317
24318
24319
24320
24321  # Warn user that old version arguments are deprecated.
24322
24323
24324# Check whether --with-milestone was given.
24325if test "${with_milestone+set}" = set; then :
24326  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24327$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24328fi
24329
24330
24331
24332
24333# Check whether --with-update-version was given.
24334if test "${with_update_version+set}" = set; then :
24335  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24336$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24337fi
24338
24339
24340
24341
24342# Check whether --with-user-release-suffix was given.
24343if test "${with_user_release_suffix+set}" = set; then :
24344  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
24345$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24346fi
24347
24348
24349
24350
24351# Check whether --with-build-number was given.
24352if test "${with_build_number+set}" = set; then :
24353  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24354$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24355fi
24356
24357
24358
24359  # Source the version numbers file
24360  . $AUTOCONF_DIR/version-numbers
24361
24362  # Some non-version number information is set in that file
24363
24364
24365
24366
24367
24368
24369
24370
24371
24372  # Override version from arguments
24373
24374  # If --with-version-string is set, process it first. It is possible to
24375  # override parts with more specific flags, since these are processed later.
24376
24377# Check whether --with-version-string was given.
24378if test "${with_version_string+set}" = set; then :
24379  withval=$with_version_string;
24380fi
24381
24382  if test "x$with_version_string" = xyes; then
24383    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24384  elif test "x$with_version_string" != x; then
24385    # Additional [] needed to keep m4 from mangling shell constructs.
24386    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24387      VERSION_MAJOR=${BASH_REMATCH[1]}
24388      VERSION_MINOR=${BASH_REMATCH[3]}
24389      VERSION_SECURITY=${BASH_REMATCH[5]}
24390      VERSION_PATCH=${BASH_REMATCH[7]}
24391      VERSION_PRE=${BASH_REMATCH[9]}
24392      version_plus_separator=${BASH_REMATCH[11]}
24393      VERSION_BUILD=${BASH_REMATCH[12]}
24394      VERSION_OPT=${BASH_REMATCH[14]}
24395      # Unspecified numerical fields are interpreted as 0.
24396      if test "x$VERSION_MINOR" = x; then
24397        VERSION_MINOR=0
24398      fi
24399      if test "x$VERSION_SECURITY" = x; then
24400        VERSION_SECURITY=0
24401      fi
24402      if test "x$VERSION_PATCH" = x; then
24403        VERSION_PATCH=0
24404      fi
24405      if test "x$version_plus_separator" != x \
24406          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24407        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24408      fi
24409      # Stop the version part process from setting default values.
24410      # We still allow them to explicitely override though.
24411      NO_DEFAULT_VERSION_PARTS=true
24412    else
24413      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24414    fi
24415  fi
24416
24417
24418# Check whether --with-version-pre was given.
24419if test "${with_version_pre+set}" = set; then :
24420  withval=$with_version_pre; with_version_pre_present=true
24421else
24422  with_version_pre_present=false
24423fi
24424
24425
24426  if test "x$with_version_pre_present" = xtrue; then
24427    if test "x$with_version_pre" = xyes; then
24428      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24429    elif test "x$with_version_pre" = xno; then
24430      # Interpret --without-* as empty string instead of the literal "no"
24431      VERSION_PRE=
24432    else
24433      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24434       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24435      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24436        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24437$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24438      fi
24439    fi
24440  else
24441    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24442      # Default is to use "internal" as pre
24443      VERSION_PRE="internal"
24444    fi
24445  fi
24446
24447
24448# Check whether --with-version-opt was given.
24449if test "${with_version_opt+set}" = set; then :
24450  withval=$with_version_opt; with_version_opt_present=true
24451else
24452  with_version_opt_present=false
24453fi
24454
24455
24456  if test "x$with_version_opt_present" = xtrue; then
24457    if test "x$with_version_opt" = xyes; then
24458      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24459    elif test "x$with_version_opt" = xno; then
24460      # Interpret --without-* as empty string instead of the literal "no"
24461      VERSION_OPT=
24462    else
24463      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24464       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24465      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24466        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24467$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24468      fi
24469    fi
24470  else
24471    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24472      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24473      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24474      # Outer [ ] to quote m4.
24475       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24476      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24477    fi
24478  fi
24479
24480
24481# Check whether --with-version-build was given.
24482if test "${with_version_build+set}" = set; then :
24483  withval=$with_version_build; with_version_build_present=true
24484else
24485  with_version_build_present=false
24486fi
24487
24488
24489  if test "x$with_version_build_present" = xtrue; then
24490    if test "x$with_version_build" = xyes; then
24491      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24492    elif test "x$with_version_build" = xno; then
24493      # Interpret --without-* as empty string instead of the literal "no"
24494      VERSION_BUILD=
24495    elif test "x$with_version_build" = x; then
24496      VERSION_BUILD=
24497    else
24498
24499  # Additional [] needed to keep m4 from mangling shell constructs.
24500  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24501    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24502  fi
24503  # Extract the version number without leading zeros.
24504  cleaned_value=${BASH_REMATCH[1]}
24505  if test "x$cleaned_value" = x; then
24506    # Special case for zero
24507    cleaned_value=${BASH_REMATCH[2]}
24508  fi
24509
24510  if test $cleaned_value -gt 255; then
24511    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24512  fi
24513  if test "x$cleaned_value" != "x$with_version_build"; then
24514    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24515$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24516  fi
24517  VERSION_BUILD=$cleaned_value
24518
24519    fi
24520  else
24521    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24522      # Default is to not have a build number.
24523      VERSION_BUILD=""
24524      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24525      VERSION_BUILD=0
24526    fi
24527  fi
24528
24529
24530# Check whether --with-version-major was given.
24531if test "${with_version_major+set}" = set; then :
24532  withval=$with_version_major; with_version_major_present=true
24533else
24534  with_version_major_present=false
24535fi
24536
24537
24538  if test "x$with_version_major_present" = xtrue; then
24539    if test "x$with_version_major" = xyes; then
24540      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24541    else
24542
24543  # Additional [] needed to keep m4 from mangling shell constructs.
24544  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24545    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24546  fi
24547  # Extract the version number without leading zeros.
24548  cleaned_value=${BASH_REMATCH[1]}
24549  if test "x$cleaned_value" = x; then
24550    # Special case for zero
24551    cleaned_value=${BASH_REMATCH[2]}
24552  fi
24553
24554  if test $cleaned_value -gt 255; then
24555    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24556  fi
24557  if test "x$cleaned_value" != "x$with_version_major"; then
24558    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24559$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24560  fi
24561  VERSION_MAJOR=$cleaned_value
24562
24563    fi
24564  else
24565    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24566      # Default is to get value from version-numbers
24567      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24568    fi
24569  fi
24570
24571
24572# Check whether --with-version-minor was given.
24573if test "${with_version_minor+set}" = set; then :
24574  withval=$with_version_minor; with_version_minor_present=true
24575else
24576  with_version_minor_present=false
24577fi
24578
24579
24580  if test "x$with_version_minor_present" = xtrue; then
24581    if test "x$with_version_minor" = xyes; then
24582      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24583    elif test "x$with_version_minor" = xno; then
24584      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24585      VERSION_MINOR=0
24586    elif test "x$with_version_minor" = x; then
24587      VERSION_MINOR=0
24588    else
24589
24590  # Additional [] needed to keep m4 from mangling shell constructs.
24591  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24592    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24593  fi
24594  # Extract the version number without leading zeros.
24595  cleaned_value=${BASH_REMATCH[1]}
24596  if test "x$cleaned_value" = x; then
24597    # Special case for zero
24598    cleaned_value=${BASH_REMATCH[2]}
24599  fi
24600
24601  if test $cleaned_value -gt 255; then
24602    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24603  fi
24604  if test "x$cleaned_value" != "x$with_version_minor"; then
24605    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24606$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24607  fi
24608  VERSION_MINOR=$cleaned_value
24609
24610    fi
24611  else
24612    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24613      # Default is 0, if unspecified
24614      VERSION_MINOR=0
24615    fi
24616  fi
24617
24618
24619# Check whether --with-version-security was given.
24620if test "${with_version_security+set}" = set; then :
24621  withval=$with_version_security; with_version_security_present=true
24622else
24623  with_version_security_present=false
24624fi
24625
24626
24627  if test "x$with_version_security_present" = xtrue; then
24628    if test "x$with_version_security" = xyes; then
24629      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24630    elif test "x$with_version_security" = xno; then
24631      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24632      VERSION_SECURITY=0
24633    elif test "x$with_version_security" = x; then
24634      VERSION_SECURITY=0
24635    else
24636
24637  # Additional [] needed to keep m4 from mangling shell constructs.
24638  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24639    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24640  fi
24641  # Extract the version number without leading zeros.
24642  cleaned_value=${BASH_REMATCH[1]}
24643  if test "x$cleaned_value" = x; then
24644    # Special case for zero
24645    cleaned_value=${BASH_REMATCH[2]}
24646  fi
24647
24648  if test $cleaned_value -gt 255; then
24649    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24650  fi
24651  if test "x$cleaned_value" != "x$with_version_security"; then
24652    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24653$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24654  fi
24655  VERSION_SECURITY=$cleaned_value
24656
24657    fi
24658  else
24659    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24660      # Default is 0, if unspecified
24661      VERSION_SECURITY=0
24662    fi
24663  fi
24664
24665
24666# Check whether --with-version-patch was given.
24667if test "${with_version_patch+set}" = set; then :
24668  withval=$with_version_patch; with_version_patch_present=true
24669else
24670  with_version_patch_present=false
24671fi
24672
24673
24674  if test "x$with_version_patch_present" = xtrue; then
24675    if test "x$with_version_patch" = xyes; then
24676      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24677    elif test "x$with_version_patch" = xno; then
24678      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24679      VERSION_PATCH=0
24680    elif test "x$with_version_patch" = x; then
24681      VERSION_PATCH=0
24682    else
24683
24684  # Additional [] needed to keep m4 from mangling shell constructs.
24685  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24686    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24687  fi
24688  # Extract the version number without leading zeros.
24689  cleaned_value=${BASH_REMATCH[1]}
24690  if test "x$cleaned_value" = x; then
24691    # Special case for zero
24692    cleaned_value=${BASH_REMATCH[2]}
24693  fi
24694
24695  if test $cleaned_value -gt 255; then
24696    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24697  fi
24698  if test "x$cleaned_value" != "x$with_version_patch"; then
24699    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24700$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24701  fi
24702  VERSION_PATCH=$cleaned_value
24703
24704    fi
24705  else
24706    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24707      # Default is 0, if unspecified
24708      VERSION_PATCH=0
24709    fi
24710  fi
24711
24712  # Calculate derived version properties
24713
24714  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24715  if test "x$VERSION_PRE" = x; then
24716    VERSION_IS_GA=true
24717  else
24718    VERSION_IS_GA=false
24719  fi
24720
24721  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24722  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24723
24724  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24725  # Strip trailing zeroes from stripped_version_number
24726  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24727  VERSION_NUMBER=$stripped_version_number
24728
24729  # The complete version string, with additional build information
24730  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24731    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24732  else
24733    # If either build or opt is set, we need a + separator
24734    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24735  fi
24736
24737  # The short version string, just VERSION_NUMBER and PRE, if present.
24738  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24739
24740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24741$as_echo_n "checking for version string... " >&6; }
24742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24743$as_echo "$VERSION_STRING" >&6; }
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759###############################################################################
24760#
24761# Setup BootJDK, used to bootstrap the build.
24762#
24763###############################################################################
24764
24765
24766  BOOT_JDK_FOUND=no
24767
24768# Check whether --with-boot-jdk was given.
24769if test "${with_boot_jdk+set}" = set; then :
24770  withval=$with_boot_jdk;
24771fi
24772
24773
24774  # We look for the Boot JDK through various means, going from more certain to
24775  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24776  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24777  # must check if this is indeed valid; otherwise we'll continue looking.
24778
24779  # Test: Is bootjdk explicitely set by command line arguments?
24780
24781  if test "x$BOOT_JDK_FOUND" = xno; then
24782    # Now execute the test
24783
24784  if test "x$with_boot_jdk" != x; then
24785    BOOT_JDK=$with_boot_jdk
24786    BOOT_JDK_FOUND=maybe
24787    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24788$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24789  fi
24790
24791
24792    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24793    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24794      # Do we have a bin/java?
24795      if test ! -x "$BOOT_JDK/bin/java"; then
24796        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24798        BOOT_JDK_FOUND=no
24799      else
24800        # Do we have a bin/javac?
24801        if test ! -x "$BOOT_JDK/bin/javac"; then
24802          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24804          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24805$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24806          BOOT_JDK_FOUND=no
24807        else
24808          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24809          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24810
24811          # Extra M4 quote needed to protect [] in grep expression.
24812          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24813          if test "x$FOUND_CORRECT_VERSION" = x; then
24814            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24816            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24817$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24818            BOOT_JDK_FOUND=no
24819          else
24820            # We're done! :-)
24821            BOOT_JDK_FOUND=yes
24822
24823  # Only process if variable expands to non-empty
24824
24825  if test "x$BOOT_JDK" != x; then
24826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24827
24828  # Input might be given as Windows format, start by converting to
24829  # unix format.
24830  path="$BOOT_JDK"
24831  new_path=`$CYGPATH -u "$path"`
24832
24833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24836  # "foo.exe" is OK but "foo" is an error.
24837  #
24838  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24839  # It is also a way to make sure we got the proper file name for the real test later on.
24840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24841  if test "x$test_shortpath" = x; then
24842    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24843$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24844    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24845  fi
24846
24847  # Call helper function which possibly converts this using DOS-style short mode.
24848  # If so, the updated path is stored in $new_path.
24849
24850  input_path="$new_path"
24851  # Check if we need to convert this using DOS-style short mode. If the path
24852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24853  # take no chances and rewrite it.
24854  # Note: m4 eats our [], so we need to use [ and ] instead.
24855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24856  if test "x$has_forbidden_chars" != x; then
24857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24861      # Going to short mode and back again did indeed matter. Since short mode is
24862      # case insensitive, let's make it lowercase to improve readability.
24863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24864      # Now convert it back to Unix-style (cygpath)
24865      input_path=`$CYGPATH -u "$shortmode_path"`
24866      new_path="$input_path"
24867    fi
24868  fi
24869
24870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24871  if test "x$test_cygdrive_prefix" = x; then
24872    # As a simple fix, exclude /usr/bin since it's not a real path.
24873    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24875      # a path prefixed by /cygdrive for fixpath to work.
24876      new_path="$CYGWIN_ROOT_PATH$input_path"
24877    fi
24878  fi
24879
24880
24881  if test "x$path" != "x$new_path"; then
24882    BOOT_JDK="$new_path"
24883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24884$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24885  fi
24886
24887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24888
24889  path="$BOOT_JDK"
24890  has_colon=`$ECHO $path | $GREP ^.:`
24891  new_path="$path"
24892  if test "x$has_colon" = x; then
24893    # Not in mixed or Windows style, start by that.
24894    new_path=`cmd //c echo $path`
24895  fi
24896
24897
24898  input_path="$new_path"
24899  # Check if we need to convert this using DOS-style short mode. If the path
24900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24901  # take no chances and rewrite it.
24902  # Note: m4 eats our [], so we need to use [ and ] instead.
24903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24904  if test "x$has_forbidden_chars" != x; then
24905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24907  fi
24908
24909
24910  windows_path="$new_path"
24911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24912    unix_path=`$CYGPATH -u "$windows_path"`
24913    new_path="$unix_path"
24914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24916    new_path="$unix_path"
24917  fi
24918
24919  if test "x$path" != "x$new_path"; then
24920    BOOT_JDK="$new_path"
24921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24922$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24923  fi
24924
24925  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24926  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24927
24928    else
24929      # We're on a unix platform. Hooray! :)
24930      path="$BOOT_JDK"
24931      has_space=`$ECHO "$path" | $GREP " "`
24932      if test "x$has_space" != x; then
24933        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24934$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24935        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24936      fi
24937
24938      # Use eval to expand a potential ~
24939      eval path="$path"
24940      if test ! -f "$path" && test ! -d "$path"; then
24941        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24942      fi
24943
24944      if test -d "$path"; then
24945        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24946      else
24947        dir="`$DIRNAME "$path"`"
24948        base="`$BASENAME "$path"`"
24949        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24950      fi
24951    fi
24952  fi
24953
24954            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24955$as_echo_n "checking for Boot JDK... " >&6; }
24956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24957$as_echo "$BOOT_JDK" >&6; }
24958            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24959$as_echo_n "checking Boot JDK version... " >&6; }
24960            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24961            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24962$as_echo "$BOOT_JDK_VERSION" >&6; }
24963          fi # end check jdk version
24964        fi # end check javac
24965      fi # end check java
24966    fi # end check boot jdk found
24967  fi
24968
24969  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24970    # Having specified an argument which is incorrect will produce an instant failure;
24971    # we should not go on looking
24972    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24973  fi
24974
24975  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24976
24977  if test "x$BOOT_JDK_FOUND" = xno; then
24978    # Now execute the test
24979
24980  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24981    # First check at user selected default
24982
24983  if test "x$BOOT_JDK_FOUND" = xno; then
24984    # Now execute the test
24985
24986  if test -x /usr/libexec/java_home; then
24987    BOOT_JDK=`/usr/libexec/java_home `
24988    BOOT_JDK_FOUND=maybe
24989    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24990$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24991  fi
24992
24993
24994    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24995    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24996      # Do we have a bin/java?
24997      if test ! -x "$BOOT_JDK/bin/java"; then
24998        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25000        BOOT_JDK_FOUND=no
25001      else
25002        # Do we have a bin/javac?
25003        if test ! -x "$BOOT_JDK/bin/javac"; then
25004          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25005$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25006          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25007$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25008          BOOT_JDK_FOUND=no
25009        else
25010          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25011          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25012
25013          # Extra M4 quote needed to protect [] in grep expression.
25014          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25015          if test "x$FOUND_CORRECT_VERSION" = x; then
25016            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25018            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25019$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25020            BOOT_JDK_FOUND=no
25021          else
25022            # We're done! :-)
25023            BOOT_JDK_FOUND=yes
25024
25025  # Only process if variable expands to non-empty
25026
25027  if test "x$BOOT_JDK" != x; then
25028    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25029
25030  # Input might be given as Windows format, start by converting to
25031  # unix format.
25032  path="$BOOT_JDK"
25033  new_path=`$CYGPATH -u "$path"`
25034
25035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25038  # "foo.exe" is OK but "foo" is an error.
25039  #
25040  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25041  # It is also a way to make sure we got the proper file name for the real test later on.
25042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25043  if test "x$test_shortpath" = x; then
25044    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25045$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25046    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25047  fi
25048
25049  # Call helper function which possibly converts this using DOS-style short mode.
25050  # If so, the updated path is stored in $new_path.
25051
25052  input_path="$new_path"
25053  # Check if we need to convert this using DOS-style short mode. If the path
25054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25055  # take no chances and rewrite it.
25056  # Note: m4 eats our [], so we need to use [ and ] instead.
25057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25058  if test "x$has_forbidden_chars" != x; then
25059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25063      # Going to short mode and back again did indeed matter. Since short mode is
25064      # case insensitive, let's make it lowercase to improve readability.
25065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25066      # Now convert it back to Unix-style (cygpath)
25067      input_path=`$CYGPATH -u "$shortmode_path"`
25068      new_path="$input_path"
25069    fi
25070  fi
25071
25072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25073  if test "x$test_cygdrive_prefix" = x; then
25074    # As a simple fix, exclude /usr/bin since it's not a real path.
25075    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25077      # a path prefixed by /cygdrive for fixpath to work.
25078      new_path="$CYGWIN_ROOT_PATH$input_path"
25079    fi
25080  fi
25081
25082
25083  if test "x$path" != "x$new_path"; then
25084    BOOT_JDK="$new_path"
25085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25086$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25087  fi
25088
25089    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25090
25091  path="$BOOT_JDK"
25092  has_colon=`$ECHO $path | $GREP ^.:`
25093  new_path="$path"
25094  if test "x$has_colon" = x; then
25095    # Not in mixed or Windows style, start by that.
25096    new_path=`cmd //c echo $path`
25097  fi
25098
25099
25100  input_path="$new_path"
25101  # Check if we need to convert this using DOS-style short mode. If the path
25102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25103  # take no chances and rewrite it.
25104  # Note: m4 eats our [], so we need to use [ and ] instead.
25105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25106  if test "x$has_forbidden_chars" != x; then
25107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25109  fi
25110
25111
25112  windows_path="$new_path"
25113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25114    unix_path=`$CYGPATH -u "$windows_path"`
25115    new_path="$unix_path"
25116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25118    new_path="$unix_path"
25119  fi
25120
25121  if test "x$path" != "x$new_path"; then
25122    BOOT_JDK="$new_path"
25123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25124$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25125  fi
25126
25127  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25128  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25129
25130    else
25131      # We're on a unix platform. Hooray! :)
25132      path="$BOOT_JDK"
25133      has_space=`$ECHO "$path" | $GREP " "`
25134      if test "x$has_space" != x; then
25135        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25136$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25137        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25138      fi
25139
25140      # Use eval to expand a potential ~
25141      eval path="$path"
25142      if test ! -f "$path" && test ! -d "$path"; then
25143        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25144      fi
25145
25146      if test -d "$path"; then
25147        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25148      else
25149        dir="`$DIRNAME "$path"`"
25150        base="`$BASENAME "$path"`"
25151        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25152      fi
25153    fi
25154  fi
25155
25156            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25157$as_echo_n "checking for Boot JDK... " >&6; }
25158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25159$as_echo "$BOOT_JDK" >&6; }
25160            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25161$as_echo_n "checking Boot JDK version... " >&6; }
25162            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25163            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25164$as_echo "$BOOT_JDK_VERSION" >&6; }
25165          fi # end check jdk version
25166        fi # end check javac
25167      fi # end check java
25168    fi # end check boot jdk found
25169  fi
25170
25171    # If that did not work out (e.g. too old), try explicit versions instead
25172
25173  if test "x$BOOT_JDK_FOUND" = xno; then
25174    # Now execute the test
25175
25176  if test -x /usr/libexec/java_home; then
25177    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25178    BOOT_JDK_FOUND=maybe
25179    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25180$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25181  fi
25182
25183
25184    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25185    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25186      # Do we have a bin/java?
25187      if test ! -x "$BOOT_JDK/bin/java"; then
25188        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25190        BOOT_JDK_FOUND=no
25191      else
25192        # Do we have a bin/javac?
25193        if test ! -x "$BOOT_JDK/bin/javac"; then
25194          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25196          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25197$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25198          BOOT_JDK_FOUND=no
25199        else
25200          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25201          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25202
25203          # Extra M4 quote needed to protect [] in grep expression.
25204          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25205          if test "x$FOUND_CORRECT_VERSION" = x; then
25206            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25208            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25209$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25210            BOOT_JDK_FOUND=no
25211          else
25212            # We're done! :-)
25213            BOOT_JDK_FOUND=yes
25214
25215  # Only process if variable expands to non-empty
25216
25217  if test "x$BOOT_JDK" != x; then
25218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25219
25220  # Input might be given as Windows format, start by converting to
25221  # unix format.
25222  path="$BOOT_JDK"
25223  new_path=`$CYGPATH -u "$path"`
25224
25225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25228  # "foo.exe" is OK but "foo" is an error.
25229  #
25230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25231  # It is also a way to make sure we got the proper file name for the real test later on.
25232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25233  if test "x$test_shortpath" = x; then
25234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25235$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25236    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25237  fi
25238
25239  # Call helper function which possibly converts this using DOS-style short mode.
25240  # If so, the updated path is stored in $new_path.
25241
25242  input_path="$new_path"
25243  # Check if we need to convert this using DOS-style short mode. If the path
25244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25245  # take no chances and rewrite it.
25246  # Note: m4 eats our [], so we need to use [ and ] instead.
25247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25248  if test "x$has_forbidden_chars" != x; then
25249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25253      # Going to short mode and back again did indeed matter. Since short mode is
25254      # case insensitive, let's make it lowercase to improve readability.
25255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25256      # Now convert it back to Unix-style (cygpath)
25257      input_path=`$CYGPATH -u "$shortmode_path"`
25258      new_path="$input_path"
25259    fi
25260  fi
25261
25262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25263  if test "x$test_cygdrive_prefix" = x; then
25264    # As a simple fix, exclude /usr/bin since it's not a real path.
25265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25267      # a path prefixed by /cygdrive for fixpath to work.
25268      new_path="$CYGWIN_ROOT_PATH$input_path"
25269    fi
25270  fi
25271
25272
25273  if test "x$path" != "x$new_path"; then
25274    BOOT_JDK="$new_path"
25275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25276$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25277  fi
25278
25279    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25280
25281  path="$BOOT_JDK"
25282  has_colon=`$ECHO $path | $GREP ^.:`
25283  new_path="$path"
25284  if test "x$has_colon" = x; then
25285    # Not in mixed or Windows style, start by that.
25286    new_path=`cmd //c echo $path`
25287  fi
25288
25289
25290  input_path="$new_path"
25291  # Check if we need to convert this using DOS-style short mode. If the path
25292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25293  # take no chances and rewrite it.
25294  # Note: m4 eats our [], so we need to use [ and ] instead.
25295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25296  if test "x$has_forbidden_chars" != x; then
25297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25299  fi
25300
25301
25302  windows_path="$new_path"
25303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25304    unix_path=`$CYGPATH -u "$windows_path"`
25305    new_path="$unix_path"
25306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25308    new_path="$unix_path"
25309  fi
25310
25311  if test "x$path" != "x$new_path"; then
25312    BOOT_JDK="$new_path"
25313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25315  fi
25316
25317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25319
25320    else
25321      # We're on a unix platform. Hooray! :)
25322      path="$BOOT_JDK"
25323      has_space=`$ECHO "$path" | $GREP " "`
25324      if test "x$has_space" != x; then
25325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25326$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25327        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25328      fi
25329
25330      # Use eval to expand a potential ~
25331      eval path="$path"
25332      if test ! -f "$path" && test ! -d "$path"; then
25333        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25334      fi
25335
25336      if test -d "$path"; then
25337        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25338      else
25339        dir="`$DIRNAME "$path"`"
25340        base="`$BASENAME "$path"`"
25341        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25342      fi
25343    fi
25344  fi
25345
25346            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25347$as_echo_n "checking for Boot JDK... " >&6; }
25348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25349$as_echo "$BOOT_JDK" >&6; }
25350            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25351$as_echo_n "checking Boot JDK version... " >&6; }
25352            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25353            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25354$as_echo "$BOOT_JDK_VERSION" >&6; }
25355          fi # end check jdk version
25356        fi # end check javac
25357      fi # end check java
25358    fi # end check boot jdk found
25359  fi
25360
25361
25362  if test "x$BOOT_JDK_FOUND" = xno; then
25363    # Now execute the test
25364
25365  if test -x /usr/libexec/java_home; then
25366    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25367    BOOT_JDK_FOUND=maybe
25368    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25369$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25370  fi
25371
25372
25373    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25374    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25375      # Do we have a bin/java?
25376      if test ! -x "$BOOT_JDK/bin/java"; then
25377        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25378$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25379        BOOT_JDK_FOUND=no
25380      else
25381        # Do we have a bin/javac?
25382        if test ! -x "$BOOT_JDK/bin/javac"; then
25383          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25385          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25386$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25387          BOOT_JDK_FOUND=no
25388        else
25389          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25390          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25391
25392          # Extra M4 quote needed to protect [] in grep expression.
25393          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25394          if test "x$FOUND_CORRECT_VERSION" = x; then
25395            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25397            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25398$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25399            BOOT_JDK_FOUND=no
25400          else
25401            # We're done! :-)
25402            BOOT_JDK_FOUND=yes
25403
25404  # Only process if variable expands to non-empty
25405
25406  if test "x$BOOT_JDK" != x; then
25407    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25408
25409  # Input might be given as Windows format, start by converting to
25410  # unix format.
25411  path="$BOOT_JDK"
25412  new_path=`$CYGPATH -u "$path"`
25413
25414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25417  # "foo.exe" is OK but "foo" is an error.
25418  #
25419  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25420  # It is also a way to make sure we got the proper file name for the real test later on.
25421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25422  if test "x$test_shortpath" = x; then
25423    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25424$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25425    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25426  fi
25427
25428  # Call helper function which possibly converts this using DOS-style short mode.
25429  # If so, the updated path is stored in $new_path.
25430
25431  input_path="$new_path"
25432  # Check if we need to convert this using DOS-style short mode. If the path
25433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25434  # take no chances and rewrite it.
25435  # Note: m4 eats our [], so we need to use [ and ] instead.
25436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25437  if test "x$has_forbidden_chars" != x; then
25438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25442      # Going to short mode and back again did indeed matter. Since short mode is
25443      # case insensitive, let's make it lowercase to improve readability.
25444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25445      # Now convert it back to Unix-style (cygpath)
25446      input_path=`$CYGPATH -u "$shortmode_path"`
25447      new_path="$input_path"
25448    fi
25449  fi
25450
25451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25452  if test "x$test_cygdrive_prefix" = x; then
25453    # As a simple fix, exclude /usr/bin since it's not a real path.
25454    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25456      # a path prefixed by /cygdrive for fixpath to work.
25457      new_path="$CYGWIN_ROOT_PATH$input_path"
25458    fi
25459  fi
25460
25461
25462  if test "x$path" != "x$new_path"; then
25463    BOOT_JDK="$new_path"
25464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25465$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25466  fi
25467
25468    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25469
25470  path="$BOOT_JDK"
25471  has_colon=`$ECHO $path | $GREP ^.:`
25472  new_path="$path"
25473  if test "x$has_colon" = x; then
25474    # Not in mixed or Windows style, start by that.
25475    new_path=`cmd //c echo $path`
25476  fi
25477
25478
25479  input_path="$new_path"
25480  # Check if we need to convert this using DOS-style short mode. If the path
25481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25482  # take no chances and rewrite it.
25483  # Note: m4 eats our [], so we need to use [ and ] instead.
25484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25485  if test "x$has_forbidden_chars" != x; then
25486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25488  fi
25489
25490
25491  windows_path="$new_path"
25492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25493    unix_path=`$CYGPATH -u "$windows_path"`
25494    new_path="$unix_path"
25495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25497    new_path="$unix_path"
25498  fi
25499
25500  if test "x$path" != "x$new_path"; then
25501    BOOT_JDK="$new_path"
25502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25503$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25504  fi
25505
25506  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25507  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25508
25509    else
25510      # We're on a unix platform. Hooray! :)
25511      path="$BOOT_JDK"
25512      has_space=`$ECHO "$path" | $GREP " "`
25513      if test "x$has_space" != x; then
25514        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25515$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25516        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25517      fi
25518
25519      # Use eval to expand a potential ~
25520      eval path="$path"
25521      if test ! -f "$path" && test ! -d "$path"; then
25522        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25523      fi
25524
25525      if test -d "$path"; then
25526        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25527      else
25528        dir="`$DIRNAME "$path"`"
25529        base="`$BASENAME "$path"`"
25530        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25531      fi
25532    fi
25533  fi
25534
25535            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25536$as_echo_n "checking for Boot JDK... " >&6; }
25537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25538$as_echo "$BOOT_JDK" >&6; }
25539            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25540$as_echo_n "checking Boot JDK version... " >&6; }
25541            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25542            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25543$as_echo "$BOOT_JDK_VERSION" >&6; }
25544          fi # end check jdk version
25545        fi # end check javac
25546      fi # end check java
25547    fi # end check boot jdk found
25548  fi
25549
25550
25551  if test "x$BOOT_JDK_FOUND" = xno; then
25552    # Now execute the test
25553
25554  if test -x /usr/libexec/java_home; then
25555    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25556    BOOT_JDK_FOUND=maybe
25557    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25558$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25559  fi
25560
25561
25562    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25563    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25564      # Do we have a bin/java?
25565      if test ! -x "$BOOT_JDK/bin/java"; then
25566        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25568        BOOT_JDK_FOUND=no
25569      else
25570        # Do we have a bin/javac?
25571        if test ! -x "$BOOT_JDK/bin/javac"; then
25572          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25574          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25575$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25576          BOOT_JDK_FOUND=no
25577        else
25578          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25579          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25580
25581          # Extra M4 quote needed to protect [] in grep expression.
25582          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25583          if test "x$FOUND_CORRECT_VERSION" = x; then
25584            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25586            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25587$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25588            BOOT_JDK_FOUND=no
25589          else
25590            # We're done! :-)
25591            BOOT_JDK_FOUND=yes
25592
25593  # Only process if variable expands to non-empty
25594
25595  if test "x$BOOT_JDK" != x; then
25596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25597
25598  # Input might be given as Windows format, start by converting to
25599  # unix format.
25600  path="$BOOT_JDK"
25601  new_path=`$CYGPATH -u "$path"`
25602
25603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25606  # "foo.exe" is OK but "foo" is an error.
25607  #
25608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25609  # It is also a way to make sure we got the proper file name for the real test later on.
25610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25611  if test "x$test_shortpath" = x; then
25612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25613$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25614    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25615  fi
25616
25617  # Call helper function which possibly converts this using DOS-style short mode.
25618  # If so, the updated path is stored in $new_path.
25619
25620  input_path="$new_path"
25621  # Check if we need to convert this using DOS-style short mode. If the path
25622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25623  # take no chances and rewrite it.
25624  # Note: m4 eats our [], so we need to use [ and ] instead.
25625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25626  if test "x$has_forbidden_chars" != x; then
25627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25631      # Going to short mode and back again did indeed matter. Since short mode is
25632      # case insensitive, let's make it lowercase to improve readability.
25633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25634      # Now convert it back to Unix-style (cygpath)
25635      input_path=`$CYGPATH -u "$shortmode_path"`
25636      new_path="$input_path"
25637    fi
25638  fi
25639
25640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25641  if test "x$test_cygdrive_prefix" = x; then
25642    # As a simple fix, exclude /usr/bin since it's not a real path.
25643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25645      # a path prefixed by /cygdrive for fixpath to work.
25646      new_path="$CYGWIN_ROOT_PATH$input_path"
25647    fi
25648  fi
25649
25650
25651  if test "x$path" != "x$new_path"; then
25652    BOOT_JDK="$new_path"
25653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25655  fi
25656
25657    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25658
25659  path="$BOOT_JDK"
25660  has_colon=`$ECHO $path | $GREP ^.:`
25661  new_path="$path"
25662  if test "x$has_colon" = x; then
25663    # Not in mixed or Windows style, start by that.
25664    new_path=`cmd //c echo $path`
25665  fi
25666
25667
25668  input_path="$new_path"
25669  # Check if we need to convert this using DOS-style short mode. If the path
25670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25671  # take no chances and rewrite it.
25672  # Note: m4 eats our [], so we need to use [ and ] instead.
25673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25674  if test "x$has_forbidden_chars" != x; then
25675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25677  fi
25678
25679
25680  windows_path="$new_path"
25681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25682    unix_path=`$CYGPATH -u "$windows_path"`
25683    new_path="$unix_path"
25684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25686    new_path="$unix_path"
25687  fi
25688
25689  if test "x$path" != "x$new_path"; then
25690    BOOT_JDK="$new_path"
25691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25692$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25693  fi
25694
25695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25697
25698    else
25699      # We're on a unix platform. Hooray! :)
25700      path="$BOOT_JDK"
25701      has_space=`$ECHO "$path" | $GREP " "`
25702      if test "x$has_space" != x; then
25703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25704$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25705        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25706      fi
25707
25708      # Use eval to expand a potential ~
25709      eval path="$path"
25710      if test ! -f "$path" && test ! -d "$path"; then
25711        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25712      fi
25713
25714      if test -d "$path"; then
25715        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25716      else
25717        dir="`$DIRNAME "$path"`"
25718        base="`$BASENAME "$path"`"
25719        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25720      fi
25721    fi
25722  fi
25723
25724            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25725$as_echo_n "checking for Boot JDK... " >&6; }
25726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25727$as_echo "$BOOT_JDK" >&6; }
25728            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25729$as_echo_n "checking Boot JDK version... " >&6; }
25730            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25732$as_echo "$BOOT_JDK_VERSION" >&6; }
25733          fi # end check jdk version
25734        fi # end check javac
25735      fi # end check java
25736    fi # end check boot jdk found
25737  fi
25738
25739  fi
25740
25741
25742    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25743    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25744      # Do we have a bin/java?
25745      if test ! -x "$BOOT_JDK/bin/java"; then
25746        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25748        BOOT_JDK_FOUND=no
25749      else
25750        # Do we have a bin/javac?
25751        if test ! -x "$BOOT_JDK/bin/javac"; then
25752          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25754          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25755$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25756          BOOT_JDK_FOUND=no
25757        else
25758          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25759          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25760
25761          # Extra M4 quote needed to protect [] in grep expression.
25762          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25763          if test "x$FOUND_CORRECT_VERSION" = x; then
25764            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25766            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25767$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25768            BOOT_JDK_FOUND=no
25769          else
25770            # We're done! :-)
25771            BOOT_JDK_FOUND=yes
25772
25773  # Only process if variable expands to non-empty
25774
25775  if test "x$BOOT_JDK" != x; then
25776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25777
25778  # Input might be given as Windows format, start by converting to
25779  # unix format.
25780  path="$BOOT_JDK"
25781  new_path=`$CYGPATH -u "$path"`
25782
25783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25786  # "foo.exe" is OK but "foo" is an error.
25787  #
25788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25789  # It is also a way to make sure we got the proper file name for the real test later on.
25790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25791  if test "x$test_shortpath" = x; then
25792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25793$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25794    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25795  fi
25796
25797  # Call helper function which possibly converts this using DOS-style short mode.
25798  # If so, the updated path is stored in $new_path.
25799
25800  input_path="$new_path"
25801  # Check if we need to convert this using DOS-style short mode. If the path
25802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25803  # take no chances and rewrite it.
25804  # Note: m4 eats our [], so we need to use [ and ] instead.
25805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25806  if test "x$has_forbidden_chars" != x; then
25807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25811      # Going to short mode and back again did indeed matter. Since short mode is
25812      # case insensitive, let's make it lowercase to improve readability.
25813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25814      # Now convert it back to Unix-style (cygpath)
25815      input_path=`$CYGPATH -u "$shortmode_path"`
25816      new_path="$input_path"
25817    fi
25818  fi
25819
25820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25821  if test "x$test_cygdrive_prefix" = x; then
25822    # As a simple fix, exclude /usr/bin since it's not a real path.
25823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25825      # a path prefixed by /cygdrive for fixpath to work.
25826      new_path="$CYGWIN_ROOT_PATH$input_path"
25827    fi
25828  fi
25829
25830
25831  if test "x$path" != "x$new_path"; then
25832    BOOT_JDK="$new_path"
25833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25835  fi
25836
25837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25838
25839  path="$BOOT_JDK"
25840  has_colon=`$ECHO $path | $GREP ^.:`
25841  new_path="$path"
25842  if test "x$has_colon" = x; then
25843    # Not in mixed or Windows style, start by that.
25844    new_path=`cmd //c echo $path`
25845  fi
25846
25847
25848  input_path="$new_path"
25849  # Check if we need to convert this using DOS-style short mode. If the path
25850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25851  # take no chances and rewrite it.
25852  # Note: m4 eats our [], so we need to use [ and ] instead.
25853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25854  if test "x$has_forbidden_chars" != x; then
25855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25857  fi
25858
25859
25860  windows_path="$new_path"
25861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25862    unix_path=`$CYGPATH -u "$windows_path"`
25863    new_path="$unix_path"
25864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25866    new_path="$unix_path"
25867  fi
25868
25869  if test "x$path" != "x$new_path"; then
25870    BOOT_JDK="$new_path"
25871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25872$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25873  fi
25874
25875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25877
25878    else
25879      # We're on a unix platform. Hooray! :)
25880      path="$BOOT_JDK"
25881      has_space=`$ECHO "$path" | $GREP " "`
25882      if test "x$has_space" != x; then
25883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25884$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25885        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25886      fi
25887
25888      # Use eval to expand a potential ~
25889      eval path="$path"
25890      if test ! -f "$path" && test ! -d "$path"; then
25891        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25892      fi
25893
25894      if test -d "$path"; then
25895        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25896      else
25897        dir="`$DIRNAME "$path"`"
25898        base="`$BASENAME "$path"`"
25899        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25900      fi
25901    fi
25902  fi
25903
25904            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25905$as_echo_n "checking for Boot JDK... " >&6; }
25906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25907$as_echo "$BOOT_JDK" >&6; }
25908            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25909$as_echo_n "checking Boot JDK version... " >&6; }
25910            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25911            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25912$as_echo "$BOOT_JDK_VERSION" >&6; }
25913          fi # end check jdk version
25914        fi # end check javac
25915      fi # end check java
25916    fi # end check boot jdk found
25917  fi
25918
25919
25920  # Test: Is $JAVA_HOME set?
25921
25922  if test "x$BOOT_JDK_FOUND" = xno; then
25923    # Now execute the test
25924
25925  if test "x$JAVA_HOME" != x; then
25926    JAVA_HOME_PROCESSED="$JAVA_HOME"
25927
25928  # Only process if variable expands to non-empty
25929
25930  if test "x$JAVA_HOME_PROCESSED" != x; then
25931    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25932
25933  # Input might be given as Windows format, start by converting to
25934  # unix format.
25935  path="$JAVA_HOME_PROCESSED"
25936  new_path=`$CYGPATH -u "$path"`
25937
25938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25941  # "foo.exe" is OK but "foo" is an error.
25942  #
25943  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25944  # It is also a way to make sure we got the proper file name for the real test later on.
25945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25946  if test "x$test_shortpath" = x; then
25947    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25948$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25949    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25950  fi
25951
25952  # Call helper function which possibly converts this using DOS-style short mode.
25953  # If so, the updated path is stored in $new_path.
25954
25955  input_path="$new_path"
25956  # Check if we need to convert this using DOS-style short mode. If the path
25957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25958  # take no chances and rewrite it.
25959  # Note: m4 eats our [], so we need to use [ and ] instead.
25960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25961  if test "x$has_forbidden_chars" != x; then
25962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25963    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25964    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25965    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25966      # Going to short mode and back again did indeed matter. Since short mode is
25967      # case insensitive, let's make it lowercase to improve readability.
25968      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25969      # Now convert it back to Unix-style (cygpath)
25970      input_path=`$CYGPATH -u "$shortmode_path"`
25971      new_path="$input_path"
25972    fi
25973  fi
25974
25975  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25976  if test "x$test_cygdrive_prefix" = x; then
25977    # As a simple fix, exclude /usr/bin since it's not a real path.
25978    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25979      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25980      # a path prefixed by /cygdrive for fixpath to work.
25981      new_path="$CYGWIN_ROOT_PATH$input_path"
25982    fi
25983  fi
25984
25985
25986  if test "x$path" != "x$new_path"; then
25987    JAVA_HOME_PROCESSED="$new_path"
25988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25989$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25990  fi
25991
25992    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25993
25994  path="$JAVA_HOME_PROCESSED"
25995  has_colon=`$ECHO $path | $GREP ^.:`
25996  new_path="$path"
25997  if test "x$has_colon" = x; then
25998    # Not in mixed or Windows style, start by that.
25999    new_path=`cmd //c echo $path`
26000  fi
26001
26002
26003  input_path="$new_path"
26004  # Check if we need to convert this using DOS-style short mode. If the path
26005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26006  # take no chances and rewrite it.
26007  # Note: m4 eats our [], so we need to use [ and ] instead.
26008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26009  if test "x$has_forbidden_chars" != x; then
26010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26012  fi
26013
26014
26015  windows_path="$new_path"
26016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26017    unix_path=`$CYGPATH -u "$windows_path"`
26018    new_path="$unix_path"
26019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26021    new_path="$unix_path"
26022  fi
26023
26024  if test "x$path" != "x$new_path"; then
26025    JAVA_HOME_PROCESSED="$new_path"
26026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26027$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26028  fi
26029
26030  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26031  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26032
26033    else
26034      # We're on a unix platform. Hooray! :)
26035      path="$JAVA_HOME_PROCESSED"
26036      has_space=`$ECHO "$path" | $GREP " "`
26037      if test "x$has_space" != x; then
26038        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26039$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26040        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26041      fi
26042
26043      # Use eval to expand a potential ~
26044      eval path="$path"
26045      if test ! -f "$path" && test ! -d "$path"; then
26046        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26047      fi
26048
26049      if test -d "$path"; then
26050        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26051      else
26052        dir="`$DIRNAME "$path"`"
26053        base="`$BASENAME "$path"`"
26054        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26055      fi
26056    fi
26057  fi
26058
26059    if test ! -d "$JAVA_HOME_PROCESSED"; then
26060      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26061$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26062    else
26063      # Aha, the user has set a JAVA_HOME
26064      # let us use that as the Boot JDK.
26065      BOOT_JDK="$JAVA_HOME_PROCESSED"
26066      BOOT_JDK_FOUND=maybe
26067      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26068$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26069    fi
26070  fi
26071
26072
26073    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26074    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26075      # Do we have a bin/java?
26076      if test ! -x "$BOOT_JDK/bin/java"; then
26077        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26079        BOOT_JDK_FOUND=no
26080      else
26081        # Do we have a bin/javac?
26082        if test ! -x "$BOOT_JDK/bin/javac"; then
26083          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26085          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26086$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26087          BOOT_JDK_FOUND=no
26088        else
26089          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26090          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26091
26092          # Extra M4 quote needed to protect [] in grep expression.
26093          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26094          if test "x$FOUND_CORRECT_VERSION" = x; then
26095            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26097            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26098$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26099            BOOT_JDK_FOUND=no
26100          else
26101            # We're done! :-)
26102            BOOT_JDK_FOUND=yes
26103
26104  # Only process if variable expands to non-empty
26105
26106  if test "x$BOOT_JDK" != x; then
26107    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26108
26109  # Input might be given as Windows format, start by converting to
26110  # unix format.
26111  path="$BOOT_JDK"
26112  new_path=`$CYGPATH -u "$path"`
26113
26114  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26115  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26116  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26117  # "foo.exe" is OK but "foo" is an error.
26118  #
26119  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26120  # It is also a way to make sure we got the proper file name for the real test later on.
26121  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26122  if test "x$test_shortpath" = x; then
26123    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26124$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26125    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26126  fi
26127
26128  # Call helper function which possibly converts this using DOS-style short mode.
26129  # If so, the updated path is stored in $new_path.
26130
26131  input_path="$new_path"
26132  # Check if we need to convert this using DOS-style short mode. If the path
26133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26134  # take no chances and rewrite it.
26135  # Note: m4 eats our [], so we need to use [ and ] instead.
26136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26137  if test "x$has_forbidden_chars" != x; then
26138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26142      # Going to short mode and back again did indeed matter. Since short mode is
26143      # case insensitive, let's make it lowercase to improve readability.
26144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26145      # Now convert it back to Unix-style (cygpath)
26146      input_path=`$CYGPATH -u "$shortmode_path"`
26147      new_path="$input_path"
26148    fi
26149  fi
26150
26151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26152  if test "x$test_cygdrive_prefix" = x; then
26153    # As a simple fix, exclude /usr/bin since it's not a real path.
26154    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26156      # a path prefixed by /cygdrive for fixpath to work.
26157      new_path="$CYGWIN_ROOT_PATH$input_path"
26158    fi
26159  fi
26160
26161
26162  if test "x$path" != "x$new_path"; then
26163    BOOT_JDK="$new_path"
26164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26165$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26166  fi
26167
26168    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26169
26170  path="$BOOT_JDK"
26171  has_colon=`$ECHO $path | $GREP ^.:`
26172  new_path="$path"
26173  if test "x$has_colon" = x; then
26174    # Not in mixed or Windows style, start by that.
26175    new_path=`cmd //c echo $path`
26176  fi
26177
26178
26179  input_path="$new_path"
26180  # Check if we need to convert this using DOS-style short mode. If the path
26181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26182  # take no chances and rewrite it.
26183  # Note: m4 eats our [], so we need to use [ and ] instead.
26184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26185  if test "x$has_forbidden_chars" != x; then
26186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26188  fi
26189
26190
26191  windows_path="$new_path"
26192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26193    unix_path=`$CYGPATH -u "$windows_path"`
26194    new_path="$unix_path"
26195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26197    new_path="$unix_path"
26198  fi
26199
26200  if test "x$path" != "x$new_path"; then
26201    BOOT_JDK="$new_path"
26202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26203$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26204  fi
26205
26206  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26207  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26208
26209    else
26210      # We're on a unix platform. Hooray! :)
26211      path="$BOOT_JDK"
26212      has_space=`$ECHO "$path" | $GREP " "`
26213      if test "x$has_space" != x; then
26214        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26215$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26216        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26217      fi
26218
26219      # Use eval to expand a potential ~
26220      eval path="$path"
26221      if test ! -f "$path" && test ! -d "$path"; then
26222        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26223      fi
26224
26225      if test -d "$path"; then
26226        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26227      else
26228        dir="`$DIRNAME "$path"`"
26229        base="`$BASENAME "$path"`"
26230        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26231      fi
26232    fi
26233  fi
26234
26235            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26236$as_echo_n "checking for Boot JDK... " >&6; }
26237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26238$as_echo "$BOOT_JDK" >&6; }
26239            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26240$as_echo_n "checking Boot JDK version... " >&6; }
26241            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26243$as_echo "$BOOT_JDK_VERSION" >&6; }
26244          fi # end check jdk version
26245        fi # end check javac
26246      fi # end check java
26247    fi # end check boot jdk found
26248  fi
26249
26250
26251  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26252
26253  if test "x$BOOT_JDK_FOUND" = xno; then
26254    # Now execute the test
26255
26256  # Extract the first word of "javac", so it can be a program name with args.
26257set dummy javac; ac_word=$2
26258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26259$as_echo_n "checking for $ac_word... " >&6; }
26260if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26261  $as_echo_n "(cached) " >&6
26262else
26263  case $JAVAC_CHECK in
26264  [\\/]* | ?:[\\/]*)
26265  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26266  ;;
26267  *)
26268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26269for as_dir in $PATH
26270do
26271  IFS=$as_save_IFS
26272  test -z "$as_dir" && as_dir=.
26273    for ac_exec_ext in '' $ac_executable_extensions; do
26274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26275    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26277    break 2
26278  fi
26279done
26280  done
26281IFS=$as_save_IFS
26282
26283  ;;
26284esac
26285fi
26286JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26287if test -n "$JAVAC_CHECK"; then
26288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26289$as_echo "$JAVAC_CHECK" >&6; }
26290else
26291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26292$as_echo "no" >&6; }
26293fi
26294
26295
26296  # Extract the first word of "java", so it can be a program name with args.
26297set dummy java; ac_word=$2
26298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26299$as_echo_n "checking for $ac_word... " >&6; }
26300if ${ac_cv_path_JAVA_CHECK+:} false; then :
26301  $as_echo_n "(cached) " >&6
26302else
26303  case $JAVA_CHECK in
26304  [\\/]* | ?:[\\/]*)
26305  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26306  ;;
26307  *)
26308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26309for as_dir in $PATH
26310do
26311  IFS=$as_save_IFS
26312  test -z "$as_dir" && as_dir=.
26313    for ac_exec_ext in '' $ac_executable_extensions; do
26314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26315    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26317    break 2
26318  fi
26319done
26320  done
26321IFS=$as_save_IFS
26322
26323  ;;
26324esac
26325fi
26326JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26327if test -n "$JAVA_CHECK"; then
26328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26329$as_echo "$JAVA_CHECK" >&6; }
26330else
26331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26332$as_echo "no" >&6; }
26333fi
26334
26335
26336  BINARY="$JAVAC_CHECK"
26337  if test "x$JAVAC_CHECK" = x; then
26338    BINARY="$JAVA_CHECK"
26339  fi
26340  if test "x$BINARY" != x; then
26341    # So there is a java(c) binary, it might be part of a JDK.
26342    # Lets find the JDK/JRE directory by following symbolic links.
26343    # Linux/GNU systems often have links from /usr/bin/java to
26344    # /etc/alternatives/java to the real JDK binary.
26345
26346  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26347    # Follow a chain of symbolic links. Use readlink
26348    # where it exists, else fall back to horribly
26349    # complicated shell code.
26350    if test "x$READLINK_TESTED" != yes; then
26351      # On MacOSX there is a readlink tool with a different
26352      # purpose than the GNU readlink tool. Check the found readlink.
26353      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26354      if test "x$ISGNU" = x; then
26355        # A readlink that we do not know how to use.
26356        # Are there other non-GNU readlinks out there?
26357        READLINK_TESTED=yes
26358        READLINK=
26359      fi
26360    fi
26361
26362    if test "x$READLINK" != x; then
26363      BINARY=`$READLINK -f $BINARY`
26364    else
26365      # Save the current directory for restoring afterwards
26366      STARTDIR=$PWD
26367      COUNTER=0
26368      sym_link_dir=`$DIRNAME $BINARY`
26369      sym_link_file=`$BASENAME $BINARY`
26370      cd $sym_link_dir
26371      # Use -P flag to resolve symlinks in directories.
26372      cd `$THEPWDCMD -P`
26373      sym_link_dir=`$THEPWDCMD -P`
26374      # Resolve file symlinks
26375      while test $COUNTER -lt 20; do
26376        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26377        if test "x$ISLINK" == x; then
26378          # This is not a symbolic link! We are done!
26379          break
26380        fi
26381        # Again resolve directory symlinks since the target of the just found
26382        # link could be in a different directory
26383        cd `$DIRNAME $ISLINK`
26384        sym_link_dir=`$THEPWDCMD -P`
26385        sym_link_file=`$BASENAME $ISLINK`
26386        let COUNTER=COUNTER+1
26387      done
26388      cd $STARTDIR
26389      BINARY=$sym_link_dir/$sym_link_file
26390    fi
26391  fi
26392
26393    BOOT_JDK=`dirname "$BINARY"`
26394    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26395    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26396      # Looks like we found ourselves an JDK
26397      BOOT_JDK_FOUND=maybe
26398      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26399$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26400    fi
26401  fi
26402
26403
26404    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26405    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26406      # Do we have a bin/java?
26407      if test ! -x "$BOOT_JDK/bin/java"; then
26408        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26410        BOOT_JDK_FOUND=no
26411      else
26412        # Do we have a bin/javac?
26413        if test ! -x "$BOOT_JDK/bin/javac"; then
26414          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26416          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26417$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26418          BOOT_JDK_FOUND=no
26419        else
26420          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26421          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26422
26423          # Extra M4 quote needed to protect [] in grep expression.
26424          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26425          if test "x$FOUND_CORRECT_VERSION" = x; then
26426            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26428            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26429$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26430            BOOT_JDK_FOUND=no
26431          else
26432            # We're done! :-)
26433            BOOT_JDK_FOUND=yes
26434
26435  # Only process if variable expands to non-empty
26436
26437  if test "x$BOOT_JDK" != x; then
26438    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26439
26440  # Input might be given as Windows format, start by converting to
26441  # unix format.
26442  path="$BOOT_JDK"
26443  new_path=`$CYGPATH -u "$path"`
26444
26445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26448  # "foo.exe" is OK but "foo" is an error.
26449  #
26450  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26451  # It is also a way to make sure we got the proper file name for the real test later on.
26452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26453  if test "x$test_shortpath" = x; then
26454    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26455$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26456    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26457  fi
26458
26459  # Call helper function which possibly converts this using DOS-style short mode.
26460  # If so, the updated path is stored in $new_path.
26461
26462  input_path="$new_path"
26463  # Check if we need to convert this using DOS-style short mode. If the path
26464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26465  # take no chances and rewrite it.
26466  # Note: m4 eats our [], so we need to use [ and ] instead.
26467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26468  if test "x$has_forbidden_chars" != x; then
26469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26473      # Going to short mode and back again did indeed matter. Since short mode is
26474      # case insensitive, let's make it lowercase to improve readability.
26475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26476      # Now convert it back to Unix-style (cygpath)
26477      input_path=`$CYGPATH -u "$shortmode_path"`
26478      new_path="$input_path"
26479    fi
26480  fi
26481
26482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26483  if test "x$test_cygdrive_prefix" = x; then
26484    # As a simple fix, exclude /usr/bin since it's not a real path.
26485    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26487      # a path prefixed by /cygdrive for fixpath to work.
26488      new_path="$CYGWIN_ROOT_PATH$input_path"
26489    fi
26490  fi
26491
26492
26493  if test "x$path" != "x$new_path"; then
26494    BOOT_JDK="$new_path"
26495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26497  fi
26498
26499    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26500
26501  path="$BOOT_JDK"
26502  has_colon=`$ECHO $path | $GREP ^.:`
26503  new_path="$path"
26504  if test "x$has_colon" = x; then
26505    # Not in mixed or Windows style, start by that.
26506    new_path=`cmd //c echo $path`
26507  fi
26508
26509
26510  input_path="$new_path"
26511  # Check if we need to convert this using DOS-style short mode. If the path
26512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26513  # take no chances and rewrite it.
26514  # Note: m4 eats our [], so we need to use [ and ] instead.
26515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26516  if test "x$has_forbidden_chars" != x; then
26517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26519  fi
26520
26521
26522  windows_path="$new_path"
26523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26524    unix_path=`$CYGPATH -u "$windows_path"`
26525    new_path="$unix_path"
26526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26528    new_path="$unix_path"
26529  fi
26530
26531  if test "x$path" != "x$new_path"; then
26532    BOOT_JDK="$new_path"
26533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26534$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26535  fi
26536
26537  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26538  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26539
26540    else
26541      # We're on a unix platform. Hooray! :)
26542      path="$BOOT_JDK"
26543      has_space=`$ECHO "$path" | $GREP " "`
26544      if test "x$has_space" != x; then
26545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26546$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26547        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26548      fi
26549
26550      # Use eval to expand a potential ~
26551      eval path="$path"
26552      if test ! -f "$path" && test ! -d "$path"; then
26553        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26554      fi
26555
26556      if test -d "$path"; then
26557        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26558      else
26559        dir="`$DIRNAME "$path"`"
26560        base="`$BASENAME "$path"`"
26561        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26562      fi
26563    fi
26564  fi
26565
26566            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26567$as_echo_n "checking for Boot JDK... " >&6; }
26568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26569$as_echo "$BOOT_JDK" >&6; }
26570            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26571$as_echo_n "checking Boot JDK version... " >&6; }
26572            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26573            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26574$as_echo "$BOOT_JDK_VERSION" >&6; }
26575          fi # end check jdk version
26576        fi # end check javac
26577      fi # end check java
26578    fi # end check boot jdk found
26579  fi
26580
26581
26582  # Test: Is there a JDK installed in default, well-known locations?
26583
26584  if test "x$BOOT_JDK_FOUND" = xno; then
26585    # Now execute the test
26586
26587  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26588
26589  if test "x$BOOT_JDK_FOUND" = xno; then
26590    # Now execute the test
26591
26592  if test "x$ProgramW6432" != x; then
26593    VIRTUAL_DIR="$ProgramW6432/Java"
26594
26595  windows_path="$VIRTUAL_DIR"
26596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26597    unix_path=`$CYGPATH -u "$windows_path"`
26598    VIRTUAL_DIR="$unix_path"
26599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26601    VIRTUAL_DIR="$unix_path"
26602  fi
26603
26604
26605  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26606  BOOT_JDK_SUFFIX=""
26607  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26608  if test "x$ALL_JDKS_FOUND" != x; then
26609    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26610
26611  if test "x$BOOT_JDK_FOUND" = xno; then
26612    # Now execute the test
26613
26614        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26615        if test -d "$BOOT_JDK"; then
26616          BOOT_JDK_FOUND=maybe
26617          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26618$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26619        fi
26620
26621
26622    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26623    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26624      # Do we have a bin/java?
26625      if test ! -x "$BOOT_JDK/bin/java"; then
26626        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26628        BOOT_JDK_FOUND=no
26629      else
26630        # Do we have a bin/javac?
26631        if test ! -x "$BOOT_JDK/bin/javac"; then
26632          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26634          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26635$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26636          BOOT_JDK_FOUND=no
26637        else
26638          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26639          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26640
26641          # Extra M4 quote needed to protect [] in grep expression.
26642          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26643          if test "x$FOUND_CORRECT_VERSION" = x; then
26644            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26646            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26647$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26648            BOOT_JDK_FOUND=no
26649          else
26650            # We're done! :-)
26651            BOOT_JDK_FOUND=yes
26652
26653  # Only process if variable expands to non-empty
26654
26655  if test "x$BOOT_JDK" != x; then
26656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26657
26658  # Input might be given as Windows format, start by converting to
26659  # unix format.
26660  path="$BOOT_JDK"
26661  new_path=`$CYGPATH -u "$path"`
26662
26663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26666  # "foo.exe" is OK but "foo" is an error.
26667  #
26668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26669  # It is also a way to make sure we got the proper file name for the real test later on.
26670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26671  if test "x$test_shortpath" = x; then
26672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26674    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26675  fi
26676
26677  # Call helper function which possibly converts this using DOS-style short mode.
26678  # If so, the updated path is stored in $new_path.
26679
26680  input_path="$new_path"
26681  # Check if we need to convert this using DOS-style short mode. If the path
26682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26683  # take no chances and rewrite it.
26684  # Note: m4 eats our [], so we need to use [ and ] instead.
26685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26686  if test "x$has_forbidden_chars" != x; then
26687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26691      # Going to short mode and back again did indeed matter. Since short mode is
26692      # case insensitive, let's make it lowercase to improve readability.
26693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26694      # Now convert it back to Unix-style (cygpath)
26695      input_path=`$CYGPATH -u "$shortmode_path"`
26696      new_path="$input_path"
26697    fi
26698  fi
26699
26700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26701  if test "x$test_cygdrive_prefix" = x; then
26702    # As a simple fix, exclude /usr/bin since it's not a real path.
26703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26705      # a path prefixed by /cygdrive for fixpath to work.
26706      new_path="$CYGWIN_ROOT_PATH$input_path"
26707    fi
26708  fi
26709
26710
26711  if test "x$path" != "x$new_path"; then
26712    BOOT_JDK="$new_path"
26713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26715  fi
26716
26717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26718
26719  path="$BOOT_JDK"
26720  has_colon=`$ECHO $path | $GREP ^.:`
26721  new_path="$path"
26722  if test "x$has_colon" = x; then
26723    # Not in mixed or Windows style, start by that.
26724    new_path=`cmd //c echo $path`
26725  fi
26726
26727
26728  input_path="$new_path"
26729  # Check if we need to convert this using DOS-style short mode. If the path
26730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26731  # take no chances and rewrite it.
26732  # Note: m4 eats our [], so we need to use [ and ] instead.
26733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26734  if test "x$has_forbidden_chars" != x; then
26735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26737  fi
26738
26739
26740  windows_path="$new_path"
26741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26742    unix_path=`$CYGPATH -u "$windows_path"`
26743    new_path="$unix_path"
26744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26746    new_path="$unix_path"
26747  fi
26748
26749  if test "x$path" != "x$new_path"; then
26750    BOOT_JDK="$new_path"
26751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26752$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26753  fi
26754
26755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26757
26758    else
26759      # We're on a unix platform. Hooray! :)
26760      path="$BOOT_JDK"
26761      has_space=`$ECHO "$path" | $GREP " "`
26762      if test "x$has_space" != x; then
26763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26764$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26766      fi
26767
26768      # Use eval to expand a potential ~
26769      eval path="$path"
26770      if test ! -f "$path" && test ! -d "$path"; then
26771        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26772      fi
26773
26774      if test -d "$path"; then
26775        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26776      else
26777        dir="`$DIRNAME "$path"`"
26778        base="`$BASENAME "$path"`"
26779        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26780      fi
26781    fi
26782  fi
26783
26784            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26785$as_echo_n "checking for Boot JDK... " >&6; }
26786            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26787$as_echo "$BOOT_JDK" >&6; }
26788            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26789$as_echo_n "checking Boot JDK version... " >&6; }
26790            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26791            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26792$as_echo "$BOOT_JDK_VERSION" >&6; }
26793          fi # end check jdk version
26794        fi # end check javac
26795      fi # end check java
26796    fi # end check boot jdk found
26797  fi
26798
26799    done
26800  fi
26801
26802  fi
26803
26804
26805    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26806    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26807      # Do we have a bin/java?
26808      if test ! -x "$BOOT_JDK/bin/java"; then
26809        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26811        BOOT_JDK_FOUND=no
26812      else
26813        # Do we have a bin/javac?
26814        if test ! -x "$BOOT_JDK/bin/javac"; then
26815          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26817          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26818$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26819          BOOT_JDK_FOUND=no
26820        else
26821          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26822          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26823
26824          # Extra M4 quote needed to protect [] in grep expression.
26825          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26826          if test "x$FOUND_CORRECT_VERSION" = x; then
26827            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26829            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26830$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26831            BOOT_JDK_FOUND=no
26832          else
26833            # We're done! :-)
26834            BOOT_JDK_FOUND=yes
26835
26836  # Only process if variable expands to non-empty
26837
26838  if test "x$BOOT_JDK" != x; then
26839    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26840
26841  # Input might be given as Windows format, start by converting to
26842  # unix format.
26843  path="$BOOT_JDK"
26844  new_path=`$CYGPATH -u "$path"`
26845
26846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26849  # "foo.exe" is OK but "foo" is an error.
26850  #
26851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26852  # It is also a way to make sure we got the proper file name for the real test later on.
26853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26854  if test "x$test_shortpath" = x; then
26855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26856$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26857    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26858  fi
26859
26860  # Call helper function which possibly converts this using DOS-style short mode.
26861  # If so, the updated path is stored in $new_path.
26862
26863  input_path="$new_path"
26864  # Check if we need to convert this using DOS-style short mode. If the path
26865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26866  # take no chances and rewrite it.
26867  # Note: m4 eats our [], so we need to use [ and ] instead.
26868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26869  if test "x$has_forbidden_chars" != x; then
26870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26874      # Going to short mode and back again did indeed matter. Since short mode is
26875      # case insensitive, let's make it lowercase to improve readability.
26876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26877      # Now convert it back to Unix-style (cygpath)
26878      input_path=`$CYGPATH -u "$shortmode_path"`
26879      new_path="$input_path"
26880    fi
26881  fi
26882
26883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26884  if test "x$test_cygdrive_prefix" = x; then
26885    # As a simple fix, exclude /usr/bin since it's not a real path.
26886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26888      # a path prefixed by /cygdrive for fixpath to work.
26889      new_path="$CYGWIN_ROOT_PATH$input_path"
26890    fi
26891  fi
26892
26893
26894  if test "x$path" != "x$new_path"; then
26895    BOOT_JDK="$new_path"
26896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26897$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26898  fi
26899
26900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26901
26902  path="$BOOT_JDK"
26903  has_colon=`$ECHO $path | $GREP ^.:`
26904  new_path="$path"
26905  if test "x$has_colon" = x; then
26906    # Not in mixed or Windows style, start by that.
26907    new_path=`cmd //c echo $path`
26908  fi
26909
26910
26911  input_path="$new_path"
26912  # Check if we need to convert this using DOS-style short mode. If the path
26913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26914  # take no chances and rewrite it.
26915  # Note: m4 eats our [], so we need to use [ and ] instead.
26916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26917  if test "x$has_forbidden_chars" != x; then
26918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26920  fi
26921
26922
26923  windows_path="$new_path"
26924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26925    unix_path=`$CYGPATH -u "$windows_path"`
26926    new_path="$unix_path"
26927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26929    new_path="$unix_path"
26930  fi
26931
26932  if test "x$path" != "x$new_path"; then
26933    BOOT_JDK="$new_path"
26934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26935$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26936  fi
26937
26938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26940
26941    else
26942      # We're on a unix platform. Hooray! :)
26943      path="$BOOT_JDK"
26944      has_space=`$ECHO "$path" | $GREP " "`
26945      if test "x$has_space" != x; then
26946        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26947$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26948        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26949      fi
26950
26951      # Use eval to expand a potential ~
26952      eval path="$path"
26953      if test ! -f "$path" && test ! -d "$path"; then
26954        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26955      fi
26956
26957      if test -d "$path"; then
26958        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26959      else
26960        dir="`$DIRNAME "$path"`"
26961        base="`$BASENAME "$path"`"
26962        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26963      fi
26964    fi
26965  fi
26966
26967            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26968$as_echo_n "checking for Boot JDK... " >&6; }
26969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26970$as_echo "$BOOT_JDK" >&6; }
26971            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26972$as_echo_n "checking Boot JDK version... " >&6; }
26973            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26974            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26975$as_echo "$BOOT_JDK_VERSION" >&6; }
26976          fi # end check jdk version
26977        fi # end check javac
26978      fi # end check java
26979    fi # end check boot jdk found
26980  fi
26981
26982
26983  if test "x$BOOT_JDK_FOUND" = xno; then
26984    # Now execute the test
26985
26986  if test "x$PROGRAMW6432" != x; then
26987    VIRTUAL_DIR="$PROGRAMW6432/Java"
26988
26989  windows_path="$VIRTUAL_DIR"
26990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26991    unix_path=`$CYGPATH -u "$windows_path"`
26992    VIRTUAL_DIR="$unix_path"
26993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26995    VIRTUAL_DIR="$unix_path"
26996  fi
26997
26998
26999  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27000  BOOT_JDK_SUFFIX=""
27001  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27002  if test "x$ALL_JDKS_FOUND" != x; then
27003    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27004
27005  if test "x$BOOT_JDK_FOUND" = xno; then
27006    # Now execute the test
27007
27008        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27009        if test -d "$BOOT_JDK"; then
27010          BOOT_JDK_FOUND=maybe
27011          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27012$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27013        fi
27014
27015
27016    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27017    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27018      # Do we have a bin/java?
27019      if test ! -x "$BOOT_JDK/bin/java"; then
27020        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27022        BOOT_JDK_FOUND=no
27023      else
27024        # Do we have a bin/javac?
27025        if test ! -x "$BOOT_JDK/bin/javac"; then
27026          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27028          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27029$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27030          BOOT_JDK_FOUND=no
27031        else
27032          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27033          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27034
27035          # Extra M4 quote needed to protect [] in grep expression.
27036          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27037          if test "x$FOUND_CORRECT_VERSION" = x; then
27038            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27040            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27041$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27042            BOOT_JDK_FOUND=no
27043          else
27044            # We're done! :-)
27045            BOOT_JDK_FOUND=yes
27046
27047  # Only process if variable expands to non-empty
27048
27049  if test "x$BOOT_JDK" != x; then
27050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27051
27052  # Input might be given as Windows format, start by converting to
27053  # unix format.
27054  path="$BOOT_JDK"
27055  new_path=`$CYGPATH -u "$path"`
27056
27057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27060  # "foo.exe" is OK but "foo" is an error.
27061  #
27062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27063  # It is also a way to make sure we got the proper file name for the real test later on.
27064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27065  if test "x$test_shortpath" = x; then
27066    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27067$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27068    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27069  fi
27070
27071  # Call helper function which possibly converts this using DOS-style short mode.
27072  # If so, the updated path is stored in $new_path.
27073
27074  input_path="$new_path"
27075  # Check if we need to convert this using DOS-style short mode. If the path
27076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27077  # take no chances and rewrite it.
27078  # Note: m4 eats our [], so we need to use [ and ] instead.
27079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27080  if test "x$has_forbidden_chars" != x; then
27081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27085      # Going to short mode and back again did indeed matter. Since short mode is
27086      # case insensitive, let's make it lowercase to improve readability.
27087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27088      # Now convert it back to Unix-style (cygpath)
27089      input_path=`$CYGPATH -u "$shortmode_path"`
27090      new_path="$input_path"
27091    fi
27092  fi
27093
27094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27095  if test "x$test_cygdrive_prefix" = x; then
27096    # As a simple fix, exclude /usr/bin since it's not a real path.
27097    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27099      # a path prefixed by /cygdrive for fixpath to work.
27100      new_path="$CYGWIN_ROOT_PATH$input_path"
27101    fi
27102  fi
27103
27104
27105  if test "x$path" != "x$new_path"; then
27106    BOOT_JDK="$new_path"
27107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27109  fi
27110
27111    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27112
27113  path="$BOOT_JDK"
27114  has_colon=`$ECHO $path | $GREP ^.:`
27115  new_path="$path"
27116  if test "x$has_colon" = x; then
27117    # Not in mixed or Windows style, start by that.
27118    new_path=`cmd //c echo $path`
27119  fi
27120
27121
27122  input_path="$new_path"
27123  # Check if we need to convert this using DOS-style short mode. If the path
27124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27125  # take no chances and rewrite it.
27126  # Note: m4 eats our [], so we need to use [ and ] instead.
27127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27128  if test "x$has_forbidden_chars" != x; then
27129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27131  fi
27132
27133
27134  windows_path="$new_path"
27135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27136    unix_path=`$CYGPATH -u "$windows_path"`
27137    new_path="$unix_path"
27138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27140    new_path="$unix_path"
27141  fi
27142
27143  if test "x$path" != "x$new_path"; then
27144    BOOT_JDK="$new_path"
27145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27146$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27147  fi
27148
27149  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27150  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27151
27152    else
27153      # We're on a unix platform. Hooray! :)
27154      path="$BOOT_JDK"
27155      has_space=`$ECHO "$path" | $GREP " "`
27156      if test "x$has_space" != x; then
27157        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27158$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27159        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27160      fi
27161
27162      # Use eval to expand a potential ~
27163      eval path="$path"
27164      if test ! -f "$path" && test ! -d "$path"; then
27165        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27166      fi
27167
27168      if test -d "$path"; then
27169        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27170      else
27171        dir="`$DIRNAME "$path"`"
27172        base="`$BASENAME "$path"`"
27173        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27174      fi
27175    fi
27176  fi
27177
27178            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27179$as_echo_n "checking for Boot JDK... " >&6; }
27180            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27181$as_echo "$BOOT_JDK" >&6; }
27182            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27183$as_echo_n "checking Boot JDK version... " >&6; }
27184            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27185            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27186$as_echo "$BOOT_JDK_VERSION" >&6; }
27187          fi # end check jdk version
27188        fi # end check javac
27189      fi # end check java
27190    fi # end check boot jdk found
27191  fi
27192
27193    done
27194  fi
27195
27196  fi
27197
27198
27199    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27200    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27201      # Do we have a bin/java?
27202      if test ! -x "$BOOT_JDK/bin/java"; then
27203        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27205        BOOT_JDK_FOUND=no
27206      else
27207        # Do we have a bin/javac?
27208        if test ! -x "$BOOT_JDK/bin/javac"; then
27209          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27211          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27212$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27213          BOOT_JDK_FOUND=no
27214        else
27215          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27216          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27217
27218          # Extra M4 quote needed to protect [] in grep expression.
27219          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27220          if test "x$FOUND_CORRECT_VERSION" = x; then
27221            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27223            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27224$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27225            BOOT_JDK_FOUND=no
27226          else
27227            # We're done! :-)
27228            BOOT_JDK_FOUND=yes
27229
27230  # Only process if variable expands to non-empty
27231
27232  if test "x$BOOT_JDK" != x; then
27233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27234
27235  # Input might be given as Windows format, start by converting to
27236  # unix format.
27237  path="$BOOT_JDK"
27238  new_path=`$CYGPATH -u "$path"`
27239
27240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27243  # "foo.exe" is OK but "foo" is an error.
27244  #
27245  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27246  # It is also a way to make sure we got the proper file name for the real test later on.
27247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27248  if test "x$test_shortpath" = x; then
27249    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27250$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27251    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27252  fi
27253
27254  # Call helper function which possibly converts this using DOS-style short mode.
27255  # If so, the updated path is stored in $new_path.
27256
27257  input_path="$new_path"
27258  # Check if we need to convert this using DOS-style short mode. If the path
27259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27260  # take no chances and rewrite it.
27261  # Note: m4 eats our [], so we need to use [ and ] instead.
27262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27263  if test "x$has_forbidden_chars" != x; then
27264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27268      # Going to short mode and back again did indeed matter. Since short mode is
27269      # case insensitive, let's make it lowercase to improve readability.
27270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27271      # Now convert it back to Unix-style (cygpath)
27272      input_path=`$CYGPATH -u "$shortmode_path"`
27273      new_path="$input_path"
27274    fi
27275  fi
27276
27277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27278  if test "x$test_cygdrive_prefix" = x; then
27279    # As a simple fix, exclude /usr/bin since it's not a real path.
27280    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27282      # a path prefixed by /cygdrive for fixpath to work.
27283      new_path="$CYGWIN_ROOT_PATH$input_path"
27284    fi
27285  fi
27286
27287
27288  if test "x$path" != "x$new_path"; then
27289    BOOT_JDK="$new_path"
27290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27291$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27292  fi
27293
27294    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27295
27296  path="$BOOT_JDK"
27297  has_colon=`$ECHO $path | $GREP ^.:`
27298  new_path="$path"
27299  if test "x$has_colon" = x; then
27300    # Not in mixed or Windows style, start by that.
27301    new_path=`cmd //c echo $path`
27302  fi
27303
27304
27305  input_path="$new_path"
27306  # Check if we need to convert this using DOS-style short mode. If the path
27307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27308  # take no chances and rewrite it.
27309  # Note: m4 eats our [], so we need to use [ and ] instead.
27310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27311  if test "x$has_forbidden_chars" != x; then
27312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27313    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27314  fi
27315
27316
27317  windows_path="$new_path"
27318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27319    unix_path=`$CYGPATH -u "$windows_path"`
27320    new_path="$unix_path"
27321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27323    new_path="$unix_path"
27324  fi
27325
27326  if test "x$path" != "x$new_path"; then
27327    BOOT_JDK="$new_path"
27328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27329$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27330  fi
27331
27332  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27333  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27334
27335    else
27336      # We're on a unix platform. Hooray! :)
27337      path="$BOOT_JDK"
27338      has_space=`$ECHO "$path" | $GREP " "`
27339      if test "x$has_space" != x; then
27340        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27341$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27342        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27343      fi
27344
27345      # Use eval to expand a potential ~
27346      eval path="$path"
27347      if test ! -f "$path" && test ! -d "$path"; then
27348        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27349      fi
27350
27351      if test -d "$path"; then
27352        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27353      else
27354        dir="`$DIRNAME "$path"`"
27355        base="`$BASENAME "$path"`"
27356        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27357      fi
27358    fi
27359  fi
27360
27361            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27362$as_echo_n "checking for Boot JDK... " >&6; }
27363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27364$as_echo "$BOOT_JDK" >&6; }
27365            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27366$as_echo_n "checking Boot JDK version... " >&6; }
27367            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27368            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27369$as_echo "$BOOT_JDK_VERSION" >&6; }
27370          fi # end check jdk version
27371        fi # end check javac
27372      fi # end check java
27373    fi # end check boot jdk found
27374  fi
27375
27376
27377  if test "x$BOOT_JDK_FOUND" = xno; then
27378    # Now execute the test
27379
27380  if test "x$PROGRAMFILES" != x; then
27381    VIRTUAL_DIR="$PROGRAMFILES/Java"
27382
27383  windows_path="$VIRTUAL_DIR"
27384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27385    unix_path=`$CYGPATH -u "$windows_path"`
27386    VIRTUAL_DIR="$unix_path"
27387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27389    VIRTUAL_DIR="$unix_path"
27390  fi
27391
27392
27393  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27394  BOOT_JDK_SUFFIX=""
27395  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27396  if test "x$ALL_JDKS_FOUND" != x; then
27397    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27398
27399  if test "x$BOOT_JDK_FOUND" = xno; then
27400    # Now execute the test
27401
27402        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27403        if test -d "$BOOT_JDK"; then
27404          BOOT_JDK_FOUND=maybe
27405          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27406$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27407        fi
27408
27409
27410    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27411    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27412      # Do we have a bin/java?
27413      if test ! -x "$BOOT_JDK/bin/java"; then
27414        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27416        BOOT_JDK_FOUND=no
27417      else
27418        # Do we have a bin/javac?
27419        if test ! -x "$BOOT_JDK/bin/javac"; then
27420          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27422          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27423$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27424          BOOT_JDK_FOUND=no
27425        else
27426          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27427          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27428
27429          # Extra M4 quote needed to protect [] in grep expression.
27430          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27431          if test "x$FOUND_CORRECT_VERSION" = x; then
27432            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27434            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27435$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27436            BOOT_JDK_FOUND=no
27437          else
27438            # We're done! :-)
27439            BOOT_JDK_FOUND=yes
27440
27441  # Only process if variable expands to non-empty
27442
27443  if test "x$BOOT_JDK" != x; then
27444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27445
27446  # Input might be given as Windows format, start by converting to
27447  # unix format.
27448  path="$BOOT_JDK"
27449  new_path=`$CYGPATH -u "$path"`
27450
27451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27454  # "foo.exe" is OK but "foo" is an error.
27455  #
27456  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27457  # It is also a way to make sure we got the proper file name for the real test later on.
27458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27459  if test "x$test_shortpath" = x; then
27460    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27461$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27462    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27463  fi
27464
27465  # Call helper function which possibly converts this using DOS-style short mode.
27466  # If so, the updated path is stored in $new_path.
27467
27468  input_path="$new_path"
27469  # Check if we need to convert this using DOS-style short mode. If the path
27470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27471  # take no chances and rewrite it.
27472  # Note: m4 eats our [], so we need to use [ and ] instead.
27473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27474  if test "x$has_forbidden_chars" != x; then
27475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27479      # Going to short mode and back again did indeed matter. Since short mode is
27480      # case insensitive, let's make it lowercase to improve readability.
27481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27482      # Now convert it back to Unix-style (cygpath)
27483      input_path=`$CYGPATH -u "$shortmode_path"`
27484      new_path="$input_path"
27485    fi
27486  fi
27487
27488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27489  if test "x$test_cygdrive_prefix" = x; then
27490    # As a simple fix, exclude /usr/bin since it's not a real path.
27491    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27493      # a path prefixed by /cygdrive for fixpath to work.
27494      new_path="$CYGWIN_ROOT_PATH$input_path"
27495    fi
27496  fi
27497
27498
27499  if test "x$path" != "x$new_path"; then
27500    BOOT_JDK="$new_path"
27501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27502$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27503  fi
27504
27505    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27506
27507  path="$BOOT_JDK"
27508  has_colon=`$ECHO $path | $GREP ^.:`
27509  new_path="$path"
27510  if test "x$has_colon" = x; then
27511    # Not in mixed or Windows style, start by that.
27512    new_path=`cmd //c echo $path`
27513  fi
27514
27515
27516  input_path="$new_path"
27517  # Check if we need to convert this using DOS-style short mode. If the path
27518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27519  # take no chances and rewrite it.
27520  # Note: m4 eats our [], so we need to use [ and ] instead.
27521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27522  if test "x$has_forbidden_chars" != x; then
27523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27525  fi
27526
27527
27528  windows_path="$new_path"
27529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27530    unix_path=`$CYGPATH -u "$windows_path"`
27531    new_path="$unix_path"
27532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27534    new_path="$unix_path"
27535  fi
27536
27537  if test "x$path" != "x$new_path"; then
27538    BOOT_JDK="$new_path"
27539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27540$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27541  fi
27542
27543  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27544  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27545
27546    else
27547      # We're on a unix platform. Hooray! :)
27548      path="$BOOT_JDK"
27549      has_space=`$ECHO "$path" | $GREP " "`
27550      if test "x$has_space" != x; then
27551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27552$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27553        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27554      fi
27555
27556      # Use eval to expand a potential ~
27557      eval path="$path"
27558      if test ! -f "$path" && test ! -d "$path"; then
27559        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27560      fi
27561
27562      if test -d "$path"; then
27563        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27564      else
27565        dir="`$DIRNAME "$path"`"
27566        base="`$BASENAME "$path"`"
27567        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27568      fi
27569    fi
27570  fi
27571
27572            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27573$as_echo_n "checking for Boot JDK... " >&6; }
27574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27575$as_echo "$BOOT_JDK" >&6; }
27576            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27577$as_echo_n "checking Boot JDK version... " >&6; }
27578            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27579            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27580$as_echo "$BOOT_JDK_VERSION" >&6; }
27581          fi # end check jdk version
27582        fi # end check javac
27583      fi # end check java
27584    fi # end check boot jdk found
27585  fi
27586
27587    done
27588  fi
27589
27590  fi
27591
27592
27593    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27594    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27595      # Do we have a bin/java?
27596      if test ! -x "$BOOT_JDK/bin/java"; then
27597        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27599        BOOT_JDK_FOUND=no
27600      else
27601        # Do we have a bin/javac?
27602        if test ! -x "$BOOT_JDK/bin/javac"; then
27603          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27605          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27606$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27607          BOOT_JDK_FOUND=no
27608        else
27609          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27610          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27611
27612          # Extra M4 quote needed to protect [] in grep expression.
27613          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27614          if test "x$FOUND_CORRECT_VERSION" = x; then
27615            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27617            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27618$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27619            BOOT_JDK_FOUND=no
27620          else
27621            # We're done! :-)
27622            BOOT_JDK_FOUND=yes
27623
27624  # Only process if variable expands to non-empty
27625
27626  if test "x$BOOT_JDK" != x; then
27627    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27628
27629  # Input might be given as Windows format, start by converting to
27630  # unix format.
27631  path="$BOOT_JDK"
27632  new_path=`$CYGPATH -u "$path"`
27633
27634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27637  # "foo.exe" is OK but "foo" is an error.
27638  #
27639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27640  # It is also a way to make sure we got the proper file name for the real test later on.
27641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27642  if test "x$test_shortpath" = x; then
27643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27644$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27645    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27646  fi
27647
27648  # Call helper function which possibly converts this using DOS-style short mode.
27649  # If so, the updated path is stored in $new_path.
27650
27651  input_path="$new_path"
27652  # Check if we need to convert this using DOS-style short mode. If the path
27653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27654  # take no chances and rewrite it.
27655  # Note: m4 eats our [], so we need to use [ and ] instead.
27656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27657  if test "x$has_forbidden_chars" != x; then
27658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27662      # Going to short mode and back again did indeed matter. Since short mode is
27663      # case insensitive, let's make it lowercase to improve readability.
27664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27665      # Now convert it back to Unix-style (cygpath)
27666      input_path=`$CYGPATH -u "$shortmode_path"`
27667      new_path="$input_path"
27668    fi
27669  fi
27670
27671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27672  if test "x$test_cygdrive_prefix" = x; then
27673    # As a simple fix, exclude /usr/bin since it's not a real path.
27674    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27676      # a path prefixed by /cygdrive for fixpath to work.
27677      new_path="$CYGWIN_ROOT_PATH$input_path"
27678    fi
27679  fi
27680
27681
27682  if test "x$path" != "x$new_path"; then
27683    BOOT_JDK="$new_path"
27684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27686  fi
27687
27688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27689
27690  path="$BOOT_JDK"
27691  has_colon=`$ECHO $path | $GREP ^.:`
27692  new_path="$path"
27693  if test "x$has_colon" = x; then
27694    # Not in mixed or Windows style, start by that.
27695    new_path=`cmd //c echo $path`
27696  fi
27697
27698
27699  input_path="$new_path"
27700  # Check if we need to convert this using DOS-style short mode. If the path
27701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27702  # take no chances and rewrite it.
27703  # Note: m4 eats our [], so we need to use [ and ] instead.
27704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27705  if test "x$has_forbidden_chars" != x; then
27706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27708  fi
27709
27710
27711  windows_path="$new_path"
27712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27713    unix_path=`$CYGPATH -u "$windows_path"`
27714    new_path="$unix_path"
27715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27717    new_path="$unix_path"
27718  fi
27719
27720  if test "x$path" != "x$new_path"; then
27721    BOOT_JDK="$new_path"
27722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27723$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27724  fi
27725
27726  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27727  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27728
27729    else
27730      # We're on a unix platform. Hooray! :)
27731      path="$BOOT_JDK"
27732      has_space=`$ECHO "$path" | $GREP " "`
27733      if test "x$has_space" != x; then
27734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27735$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27736        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27737      fi
27738
27739      # Use eval to expand a potential ~
27740      eval path="$path"
27741      if test ! -f "$path" && test ! -d "$path"; then
27742        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27743      fi
27744
27745      if test -d "$path"; then
27746        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27747      else
27748        dir="`$DIRNAME "$path"`"
27749        base="`$BASENAME "$path"`"
27750        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27751      fi
27752    fi
27753  fi
27754
27755            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27756$as_echo_n "checking for Boot JDK... " >&6; }
27757            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27758$as_echo "$BOOT_JDK" >&6; }
27759            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27760$as_echo_n "checking Boot JDK version... " >&6; }
27761            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27762            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27763$as_echo "$BOOT_JDK_VERSION" >&6; }
27764          fi # end check jdk version
27765        fi # end check javac
27766      fi # end check java
27767    fi # end check boot jdk found
27768  fi
27769
27770
27771  if test "x$BOOT_JDK_FOUND" = xno; then
27772    # Now execute the test
27773
27774  if test "x$ProgramFiles" != x; then
27775    VIRTUAL_DIR="$ProgramFiles/Java"
27776
27777  windows_path="$VIRTUAL_DIR"
27778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27779    unix_path=`$CYGPATH -u "$windows_path"`
27780    VIRTUAL_DIR="$unix_path"
27781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27783    VIRTUAL_DIR="$unix_path"
27784  fi
27785
27786
27787  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27788  BOOT_JDK_SUFFIX=""
27789  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27790  if test "x$ALL_JDKS_FOUND" != x; then
27791    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27792
27793  if test "x$BOOT_JDK_FOUND" = xno; then
27794    # Now execute the test
27795
27796        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27797        if test -d "$BOOT_JDK"; then
27798          BOOT_JDK_FOUND=maybe
27799          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27800$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27801        fi
27802
27803
27804    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27805    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27806      # Do we have a bin/java?
27807      if test ! -x "$BOOT_JDK/bin/java"; then
27808        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27810        BOOT_JDK_FOUND=no
27811      else
27812        # Do we have a bin/javac?
27813        if test ! -x "$BOOT_JDK/bin/javac"; then
27814          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27816          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27817$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27818          BOOT_JDK_FOUND=no
27819        else
27820          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27821          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27822
27823          # Extra M4 quote needed to protect [] in grep expression.
27824          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27825          if test "x$FOUND_CORRECT_VERSION" = x; then
27826            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27828            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27829$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27830            BOOT_JDK_FOUND=no
27831          else
27832            # We're done! :-)
27833            BOOT_JDK_FOUND=yes
27834
27835  # Only process if variable expands to non-empty
27836
27837  if test "x$BOOT_JDK" != x; then
27838    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27839
27840  # Input might be given as Windows format, start by converting to
27841  # unix format.
27842  path="$BOOT_JDK"
27843  new_path=`$CYGPATH -u "$path"`
27844
27845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27848  # "foo.exe" is OK but "foo" is an error.
27849  #
27850  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27851  # It is also a way to make sure we got the proper file name for the real test later on.
27852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27853  if test "x$test_shortpath" = x; then
27854    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27855$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27856    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27857  fi
27858
27859  # Call helper function which possibly converts this using DOS-style short mode.
27860  # If so, the updated path is stored in $new_path.
27861
27862  input_path="$new_path"
27863  # Check if we need to convert this using DOS-style short mode. If the path
27864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27865  # take no chances and rewrite it.
27866  # Note: m4 eats our [], so we need to use [ and ] instead.
27867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27868  if test "x$has_forbidden_chars" != x; then
27869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27870    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27871    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27872    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27873      # Going to short mode and back again did indeed matter. Since short mode is
27874      # case insensitive, let's make it lowercase to improve readability.
27875      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27876      # Now convert it back to Unix-style (cygpath)
27877      input_path=`$CYGPATH -u "$shortmode_path"`
27878      new_path="$input_path"
27879    fi
27880  fi
27881
27882  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27883  if test "x$test_cygdrive_prefix" = x; then
27884    # As a simple fix, exclude /usr/bin since it's not a real path.
27885    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27886      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27887      # a path prefixed by /cygdrive for fixpath to work.
27888      new_path="$CYGWIN_ROOT_PATH$input_path"
27889    fi
27890  fi
27891
27892
27893  if test "x$path" != "x$new_path"; then
27894    BOOT_JDK="$new_path"
27895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27896$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27897  fi
27898
27899    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27900
27901  path="$BOOT_JDK"
27902  has_colon=`$ECHO $path | $GREP ^.:`
27903  new_path="$path"
27904  if test "x$has_colon" = x; then
27905    # Not in mixed or Windows style, start by that.
27906    new_path=`cmd //c echo $path`
27907  fi
27908
27909
27910  input_path="$new_path"
27911  # Check if we need to convert this using DOS-style short mode. If the path
27912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27913  # take no chances and rewrite it.
27914  # Note: m4 eats our [], so we need to use [ and ] instead.
27915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27916  if test "x$has_forbidden_chars" != x; then
27917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27918    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27919  fi
27920
27921
27922  windows_path="$new_path"
27923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27924    unix_path=`$CYGPATH -u "$windows_path"`
27925    new_path="$unix_path"
27926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27928    new_path="$unix_path"
27929  fi
27930
27931  if test "x$path" != "x$new_path"; then
27932    BOOT_JDK="$new_path"
27933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27934$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27935  fi
27936
27937  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27938  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27939
27940    else
27941      # We're on a unix platform. Hooray! :)
27942      path="$BOOT_JDK"
27943      has_space=`$ECHO "$path" | $GREP " "`
27944      if test "x$has_space" != x; then
27945        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27946$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27947        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27948      fi
27949
27950      # Use eval to expand a potential ~
27951      eval path="$path"
27952      if test ! -f "$path" && test ! -d "$path"; then
27953        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27954      fi
27955
27956      if test -d "$path"; then
27957        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27958      else
27959        dir="`$DIRNAME "$path"`"
27960        base="`$BASENAME "$path"`"
27961        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27962      fi
27963    fi
27964  fi
27965
27966            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27967$as_echo_n "checking for Boot JDK... " >&6; }
27968            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27969$as_echo "$BOOT_JDK" >&6; }
27970            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27971$as_echo_n "checking Boot JDK version... " >&6; }
27972            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27973            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27974$as_echo "$BOOT_JDK_VERSION" >&6; }
27975          fi # end check jdk version
27976        fi # end check javac
27977      fi # end check java
27978    fi # end check boot jdk found
27979  fi
27980
27981    done
27982  fi
27983
27984  fi
27985
27986
27987    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27988    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27989      # Do we have a bin/java?
27990      if test ! -x "$BOOT_JDK/bin/java"; then
27991        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27993        BOOT_JDK_FOUND=no
27994      else
27995        # Do we have a bin/javac?
27996        if test ! -x "$BOOT_JDK/bin/javac"; then
27997          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27999          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28000$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28001          BOOT_JDK_FOUND=no
28002        else
28003          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28004          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28005
28006          # Extra M4 quote needed to protect [] in grep expression.
28007          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28008          if test "x$FOUND_CORRECT_VERSION" = x; then
28009            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28011            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28012$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28013            BOOT_JDK_FOUND=no
28014          else
28015            # We're done! :-)
28016            BOOT_JDK_FOUND=yes
28017
28018  # Only process if variable expands to non-empty
28019
28020  if test "x$BOOT_JDK" != x; then
28021    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28022
28023  # Input might be given as Windows format, start by converting to
28024  # unix format.
28025  path="$BOOT_JDK"
28026  new_path=`$CYGPATH -u "$path"`
28027
28028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28031  # "foo.exe" is OK but "foo" is an error.
28032  #
28033  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28034  # It is also a way to make sure we got the proper file name for the real test later on.
28035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28036  if test "x$test_shortpath" = x; then
28037    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28038$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28039    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28040  fi
28041
28042  # Call helper function which possibly converts this using DOS-style short mode.
28043  # If so, the updated path is stored in $new_path.
28044
28045  input_path="$new_path"
28046  # Check if we need to convert this using DOS-style short mode. If the path
28047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28048  # take no chances and rewrite it.
28049  # Note: m4 eats our [], so we need to use [ and ] instead.
28050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28051  if test "x$has_forbidden_chars" != x; then
28052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28056      # Going to short mode and back again did indeed matter. Since short mode is
28057      # case insensitive, let's make it lowercase to improve readability.
28058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28059      # Now convert it back to Unix-style (cygpath)
28060      input_path=`$CYGPATH -u "$shortmode_path"`
28061      new_path="$input_path"
28062    fi
28063  fi
28064
28065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28066  if test "x$test_cygdrive_prefix" = x; then
28067    # As a simple fix, exclude /usr/bin since it's not a real path.
28068    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28070      # a path prefixed by /cygdrive for fixpath to work.
28071      new_path="$CYGWIN_ROOT_PATH$input_path"
28072    fi
28073  fi
28074
28075
28076  if test "x$path" != "x$new_path"; then
28077    BOOT_JDK="$new_path"
28078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28080  fi
28081
28082    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28083
28084  path="$BOOT_JDK"
28085  has_colon=`$ECHO $path | $GREP ^.:`
28086  new_path="$path"
28087  if test "x$has_colon" = x; then
28088    # Not in mixed or Windows style, start by that.
28089    new_path=`cmd //c echo $path`
28090  fi
28091
28092
28093  input_path="$new_path"
28094  # Check if we need to convert this using DOS-style short mode. If the path
28095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28096  # take no chances and rewrite it.
28097  # Note: m4 eats our [], so we need to use [ and ] instead.
28098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28099  if test "x$has_forbidden_chars" != x; then
28100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28102  fi
28103
28104
28105  windows_path="$new_path"
28106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28107    unix_path=`$CYGPATH -u "$windows_path"`
28108    new_path="$unix_path"
28109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28111    new_path="$unix_path"
28112  fi
28113
28114  if test "x$path" != "x$new_path"; then
28115    BOOT_JDK="$new_path"
28116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28117$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28118  fi
28119
28120  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28121  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28122
28123    else
28124      # We're on a unix platform. Hooray! :)
28125      path="$BOOT_JDK"
28126      has_space=`$ECHO "$path" | $GREP " "`
28127      if test "x$has_space" != x; then
28128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28129$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28130        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28131      fi
28132
28133      # Use eval to expand a potential ~
28134      eval path="$path"
28135      if test ! -f "$path" && test ! -d "$path"; then
28136        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28137      fi
28138
28139      if test -d "$path"; then
28140        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28141      else
28142        dir="`$DIRNAME "$path"`"
28143        base="`$BASENAME "$path"`"
28144        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28145      fi
28146    fi
28147  fi
28148
28149            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28150$as_echo_n "checking for Boot JDK... " >&6; }
28151            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28152$as_echo "$BOOT_JDK" >&6; }
28153            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28154$as_echo_n "checking Boot JDK version... " >&6; }
28155            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28157$as_echo "$BOOT_JDK_VERSION" >&6; }
28158          fi # end check jdk version
28159        fi # end check javac
28160      fi # end check java
28161    fi # end check boot jdk found
28162  fi
28163
28164
28165  if test "x$BOOT_JDK_FOUND" = xno; then
28166    # Now execute the test
28167
28168  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28169  BOOT_JDK_SUFFIX=""
28170  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28171  if test "x$ALL_JDKS_FOUND" != x; then
28172    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28173
28174  if test "x$BOOT_JDK_FOUND" = xno; then
28175    # Now execute the test
28176
28177        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28178        if test -d "$BOOT_JDK"; then
28179          BOOT_JDK_FOUND=maybe
28180          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28181$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28182        fi
28183
28184
28185    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28186    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28187      # Do we have a bin/java?
28188      if test ! -x "$BOOT_JDK/bin/java"; then
28189        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28191        BOOT_JDK_FOUND=no
28192      else
28193        # Do we have a bin/javac?
28194        if test ! -x "$BOOT_JDK/bin/javac"; then
28195          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28197          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28198$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28199          BOOT_JDK_FOUND=no
28200        else
28201          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28202          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28203
28204          # Extra M4 quote needed to protect [] in grep expression.
28205          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28206          if test "x$FOUND_CORRECT_VERSION" = x; then
28207            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28208$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28209            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28210$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28211            BOOT_JDK_FOUND=no
28212          else
28213            # We're done! :-)
28214            BOOT_JDK_FOUND=yes
28215
28216  # Only process if variable expands to non-empty
28217
28218  if test "x$BOOT_JDK" != x; then
28219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28220
28221  # Input might be given as Windows format, start by converting to
28222  # unix format.
28223  path="$BOOT_JDK"
28224  new_path=`$CYGPATH -u "$path"`
28225
28226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28229  # "foo.exe" is OK but "foo" is an error.
28230  #
28231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28232  # It is also a way to make sure we got the proper file name for the real test later on.
28233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28234  if test "x$test_shortpath" = x; then
28235    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28236$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28237    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28238  fi
28239
28240  # Call helper function which possibly converts this using DOS-style short mode.
28241  # If so, the updated path is stored in $new_path.
28242
28243  input_path="$new_path"
28244  # Check if we need to convert this using DOS-style short mode. If the path
28245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28246  # take no chances and rewrite it.
28247  # Note: m4 eats our [], so we need to use [ and ] instead.
28248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28249  if test "x$has_forbidden_chars" != x; then
28250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28254      # Going to short mode and back again did indeed matter. Since short mode is
28255      # case insensitive, let's make it lowercase to improve readability.
28256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28257      # Now convert it back to Unix-style (cygpath)
28258      input_path=`$CYGPATH -u "$shortmode_path"`
28259      new_path="$input_path"
28260    fi
28261  fi
28262
28263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28264  if test "x$test_cygdrive_prefix" = x; then
28265    # As a simple fix, exclude /usr/bin since it's not a real path.
28266    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28268      # a path prefixed by /cygdrive for fixpath to work.
28269      new_path="$CYGWIN_ROOT_PATH$input_path"
28270    fi
28271  fi
28272
28273
28274  if test "x$path" != "x$new_path"; then
28275    BOOT_JDK="$new_path"
28276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28277$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28278  fi
28279
28280    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28281
28282  path="$BOOT_JDK"
28283  has_colon=`$ECHO $path | $GREP ^.:`
28284  new_path="$path"
28285  if test "x$has_colon" = x; then
28286    # Not in mixed or Windows style, start by that.
28287    new_path=`cmd //c echo $path`
28288  fi
28289
28290
28291  input_path="$new_path"
28292  # Check if we need to convert this using DOS-style short mode. If the path
28293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28294  # take no chances and rewrite it.
28295  # Note: m4 eats our [], so we need to use [ and ] instead.
28296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28297  if test "x$has_forbidden_chars" != x; then
28298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28300  fi
28301
28302
28303  windows_path="$new_path"
28304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28305    unix_path=`$CYGPATH -u "$windows_path"`
28306    new_path="$unix_path"
28307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28309    new_path="$unix_path"
28310  fi
28311
28312  if test "x$path" != "x$new_path"; then
28313    BOOT_JDK="$new_path"
28314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28315$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28316  fi
28317
28318  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28319  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28320
28321    else
28322      # We're on a unix platform. Hooray! :)
28323      path="$BOOT_JDK"
28324      has_space=`$ECHO "$path" | $GREP " "`
28325      if test "x$has_space" != x; then
28326        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28327$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28328        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28329      fi
28330
28331      # Use eval to expand a potential ~
28332      eval path="$path"
28333      if test ! -f "$path" && test ! -d "$path"; then
28334        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28335      fi
28336
28337      if test -d "$path"; then
28338        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28339      else
28340        dir="`$DIRNAME "$path"`"
28341        base="`$BASENAME "$path"`"
28342        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28343      fi
28344    fi
28345  fi
28346
28347            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28348$as_echo_n "checking for Boot JDK... " >&6; }
28349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28350$as_echo "$BOOT_JDK" >&6; }
28351            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28352$as_echo_n "checking Boot JDK version... " >&6; }
28353            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28354            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28355$as_echo "$BOOT_JDK_VERSION" >&6; }
28356          fi # end check jdk version
28357        fi # end check javac
28358      fi # end check java
28359    fi # end check boot jdk found
28360  fi
28361
28362    done
28363  fi
28364
28365
28366    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28367    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28368      # Do we have a bin/java?
28369      if test ! -x "$BOOT_JDK/bin/java"; then
28370        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28372        BOOT_JDK_FOUND=no
28373      else
28374        # Do we have a bin/javac?
28375        if test ! -x "$BOOT_JDK/bin/javac"; then
28376          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28378          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28379$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28380          BOOT_JDK_FOUND=no
28381        else
28382          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28383          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28384
28385          # Extra M4 quote needed to protect [] in grep expression.
28386          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28387          if test "x$FOUND_CORRECT_VERSION" = x; then
28388            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28390            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28391$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28392            BOOT_JDK_FOUND=no
28393          else
28394            # We're done! :-)
28395            BOOT_JDK_FOUND=yes
28396
28397  # Only process if variable expands to non-empty
28398
28399  if test "x$BOOT_JDK" != x; then
28400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28401
28402  # Input might be given as Windows format, start by converting to
28403  # unix format.
28404  path="$BOOT_JDK"
28405  new_path=`$CYGPATH -u "$path"`
28406
28407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28410  # "foo.exe" is OK but "foo" is an error.
28411  #
28412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28413  # It is also a way to make sure we got the proper file name for the real test later on.
28414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28415  if test "x$test_shortpath" = x; then
28416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28417$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28418    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28419  fi
28420
28421  # Call helper function which possibly converts this using DOS-style short mode.
28422  # If so, the updated path is stored in $new_path.
28423
28424  input_path="$new_path"
28425  # Check if we need to convert this using DOS-style short mode. If the path
28426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28427  # take no chances and rewrite it.
28428  # Note: m4 eats our [], so we need to use [ and ] instead.
28429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28430  if test "x$has_forbidden_chars" != x; then
28431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28435      # Going to short mode and back again did indeed matter. Since short mode is
28436      # case insensitive, let's make it lowercase to improve readability.
28437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28438      # Now convert it back to Unix-style (cygpath)
28439      input_path=`$CYGPATH -u "$shortmode_path"`
28440      new_path="$input_path"
28441    fi
28442  fi
28443
28444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28445  if test "x$test_cygdrive_prefix" = x; then
28446    # As a simple fix, exclude /usr/bin since it's not a real path.
28447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28449      # a path prefixed by /cygdrive for fixpath to work.
28450      new_path="$CYGWIN_ROOT_PATH$input_path"
28451    fi
28452  fi
28453
28454
28455  if test "x$path" != "x$new_path"; then
28456    BOOT_JDK="$new_path"
28457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28459  fi
28460
28461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28462
28463  path="$BOOT_JDK"
28464  has_colon=`$ECHO $path | $GREP ^.:`
28465  new_path="$path"
28466  if test "x$has_colon" = x; then
28467    # Not in mixed or Windows style, start by that.
28468    new_path=`cmd //c echo $path`
28469  fi
28470
28471
28472  input_path="$new_path"
28473  # Check if we need to convert this using DOS-style short mode. If the path
28474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28475  # take no chances and rewrite it.
28476  # Note: m4 eats our [], so we need to use [ and ] instead.
28477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28478  if test "x$has_forbidden_chars" != x; then
28479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28481  fi
28482
28483
28484  windows_path="$new_path"
28485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28486    unix_path=`$CYGPATH -u "$windows_path"`
28487    new_path="$unix_path"
28488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28490    new_path="$unix_path"
28491  fi
28492
28493  if test "x$path" != "x$new_path"; then
28494    BOOT_JDK="$new_path"
28495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28497  fi
28498
28499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28501
28502    else
28503      # We're on a unix platform. Hooray! :)
28504      path="$BOOT_JDK"
28505      has_space=`$ECHO "$path" | $GREP " "`
28506      if test "x$has_space" != x; then
28507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28508$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28509        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28510      fi
28511
28512      # Use eval to expand a potential ~
28513      eval path="$path"
28514      if test ! -f "$path" && test ! -d "$path"; then
28515        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28516      fi
28517
28518      if test -d "$path"; then
28519        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28520      else
28521        dir="`$DIRNAME "$path"`"
28522        base="`$BASENAME "$path"`"
28523        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28524      fi
28525    fi
28526  fi
28527
28528            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28529$as_echo_n "checking for Boot JDK... " >&6; }
28530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28531$as_echo "$BOOT_JDK" >&6; }
28532            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28533$as_echo_n "checking Boot JDK version... " >&6; }
28534            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28536$as_echo "$BOOT_JDK_VERSION" >&6; }
28537          fi # end check jdk version
28538        fi # end check javac
28539      fi # end check java
28540    fi # end check boot jdk found
28541  fi
28542
28543  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28544
28545  if test "x$BOOT_JDK_FOUND" = xno; then
28546    # Now execute the test
28547
28548  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28549  BOOT_JDK_SUFFIX="/Contents/Home"
28550  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28551  if test "x$ALL_JDKS_FOUND" != x; then
28552    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28553
28554  if test "x$BOOT_JDK_FOUND" = xno; then
28555    # Now execute the test
28556
28557        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28558        if test -d "$BOOT_JDK"; then
28559          BOOT_JDK_FOUND=maybe
28560          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28561$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28562        fi
28563
28564
28565    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28566    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28567      # Do we have a bin/java?
28568      if test ! -x "$BOOT_JDK/bin/java"; then
28569        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28571        BOOT_JDK_FOUND=no
28572      else
28573        # Do we have a bin/javac?
28574        if test ! -x "$BOOT_JDK/bin/javac"; then
28575          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28577          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28578$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28579          BOOT_JDK_FOUND=no
28580        else
28581          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28582          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28583
28584          # Extra M4 quote needed to protect [] in grep expression.
28585          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28586          if test "x$FOUND_CORRECT_VERSION" = x; then
28587            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28589            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28590$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28591            BOOT_JDK_FOUND=no
28592          else
28593            # We're done! :-)
28594            BOOT_JDK_FOUND=yes
28595
28596  # Only process if variable expands to non-empty
28597
28598  if test "x$BOOT_JDK" != x; then
28599    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28600
28601  # Input might be given as Windows format, start by converting to
28602  # unix format.
28603  path="$BOOT_JDK"
28604  new_path=`$CYGPATH -u "$path"`
28605
28606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28609  # "foo.exe" is OK but "foo" is an error.
28610  #
28611  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28612  # It is also a way to make sure we got the proper file name for the real test later on.
28613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28614  if test "x$test_shortpath" = x; then
28615    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28616$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28617    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28618  fi
28619
28620  # Call helper function which possibly converts this using DOS-style short mode.
28621  # If so, the updated path is stored in $new_path.
28622
28623  input_path="$new_path"
28624  # Check if we need to convert this using DOS-style short mode. If the path
28625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28626  # take no chances and rewrite it.
28627  # Note: m4 eats our [], so we need to use [ and ] instead.
28628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28629  if test "x$has_forbidden_chars" != x; then
28630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28634      # Going to short mode and back again did indeed matter. Since short mode is
28635      # case insensitive, let's make it lowercase to improve readability.
28636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28637      # Now convert it back to Unix-style (cygpath)
28638      input_path=`$CYGPATH -u "$shortmode_path"`
28639      new_path="$input_path"
28640    fi
28641  fi
28642
28643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28644  if test "x$test_cygdrive_prefix" = x; then
28645    # As a simple fix, exclude /usr/bin since it's not a real path.
28646    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28648      # a path prefixed by /cygdrive for fixpath to work.
28649      new_path="$CYGWIN_ROOT_PATH$input_path"
28650    fi
28651  fi
28652
28653
28654  if test "x$path" != "x$new_path"; then
28655    BOOT_JDK="$new_path"
28656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28658  fi
28659
28660    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28661
28662  path="$BOOT_JDK"
28663  has_colon=`$ECHO $path | $GREP ^.:`
28664  new_path="$path"
28665  if test "x$has_colon" = x; then
28666    # Not in mixed or Windows style, start by that.
28667    new_path=`cmd //c echo $path`
28668  fi
28669
28670
28671  input_path="$new_path"
28672  # Check if we need to convert this using DOS-style short mode. If the path
28673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28674  # take no chances and rewrite it.
28675  # Note: m4 eats our [], so we need to use [ and ] instead.
28676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28677  if test "x$has_forbidden_chars" != x; then
28678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28680  fi
28681
28682
28683  windows_path="$new_path"
28684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28685    unix_path=`$CYGPATH -u "$windows_path"`
28686    new_path="$unix_path"
28687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28689    new_path="$unix_path"
28690  fi
28691
28692  if test "x$path" != "x$new_path"; then
28693    BOOT_JDK="$new_path"
28694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28695$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28696  fi
28697
28698  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28699  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28700
28701    else
28702      # We're on a unix platform. Hooray! :)
28703      path="$BOOT_JDK"
28704      has_space=`$ECHO "$path" | $GREP " "`
28705      if test "x$has_space" != x; then
28706        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28707$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28708        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28709      fi
28710
28711      # Use eval to expand a potential ~
28712      eval path="$path"
28713      if test ! -f "$path" && test ! -d "$path"; then
28714        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28715      fi
28716
28717      if test -d "$path"; then
28718        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28719      else
28720        dir="`$DIRNAME "$path"`"
28721        base="`$BASENAME "$path"`"
28722        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28723      fi
28724    fi
28725  fi
28726
28727            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28728$as_echo_n "checking for Boot JDK... " >&6; }
28729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28730$as_echo "$BOOT_JDK" >&6; }
28731            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28732$as_echo_n "checking Boot JDK version... " >&6; }
28733            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28735$as_echo "$BOOT_JDK_VERSION" >&6; }
28736          fi # end check jdk version
28737        fi # end check javac
28738      fi # end check java
28739    fi # end check boot jdk found
28740  fi
28741
28742    done
28743  fi
28744
28745
28746    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28747    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28748      # Do we have a bin/java?
28749      if test ! -x "$BOOT_JDK/bin/java"; then
28750        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28752        BOOT_JDK_FOUND=no
28753      else
28754        # Do we have a bin/javac?
28755        if test ! -x "$BOOT_JDK/bin/javac"; then
28756          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28757$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28758          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28759$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28760          BOOT_JDK_FOUND=no
28761        else
28762          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28763          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28764
28765          # Extra M4 quote needed to protect [] in grep expression.
28766          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28767          if test "x$FOUND_CORRECT_VERSION" = x; then
28768            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28770            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28771$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28772            BOOT_JDK_FOUND=no
28773          else
28774            # We're done! :-)
28775            BOOT_JDK_FOUND=yes
28776
28777  # Only process if variable expands to non-empty
28778
28779  if test "x$BOOT_JDK" != x; then
28780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28781
28782  # Input might be given as Windows format, start by converting to
28783  # unix format.
28784  path="$BOOT_JDK"
28785  new_path=`$CYGPATH -u "$path"`
28786
28787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28790  # "foo.exe" is OK but "foo" is an error.
28791  #
28792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28793  # It is also a way to make sure we got the proper file name for the real test later on.
28794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28795  if test "x$test_shortpath" = x; then
28796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28797$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28798    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28799  fi
28800
28801  # Call helper function which possibly converts this using DOS-style short mode.
28802  # If so, the updated path is stored in $new_path.
28803
28804  input_path="$new_path"
28805  # Check if we need to convert this using DOS-style short mode. If the path
28806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28807  # take no chances and rewrite it.
28808  # Note: m4 eats our [], so we need to use [ and ] instead.
28809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28810  if test "x$has_forbidden_chars" != x; then
28811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28815      # Going to short mode and back again did indeed matter. Since short mode is
28816      # case insensitive, let's make it lowercase to improve readability.
28817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28818      # Now convert it back to Unix-style (cygpath)
28819      input_path=`$CYGPATH -u "$shortmode_path"`
28820      new_path="$input_path"
28821    fi
28822  fi
28823
28824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28825  if test "x$test_cygdrive_prefix" = x; then
28826    # As a simple fix, exclude /usr/bin since it's not a real path.
28827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28829      # a path prefixed by /cygdrive for fixpath to work.
28830      new_path="$CYGWIN_ROOT_PATH$input_path"
28831    fi
28832  fi
28833
28834
28835  if test "x$path" != "x$new_path"; then
28836    BOOT_JDK="$new_path"
28837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28838$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28839  fi
28840
28841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28842
28843  path="$BOOT_JDK"
28844  has_colon=`$ECHO $path | $GREP ^.:`
28845  new_path="$path"
28846  if test "x$has_colon" = x; then
28847    # Not in mixed or Windows style, start by that.
28848    new_path=`cmd //c echo $path`
28849  fi
28850
28851
28852  input_path="$new_path"
28853  # Check if we need to convert this using DOS-style short mode. If the path
28854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28855  # take no chances and rewrite it.
28856  # Note: m4 eats our [], so we need to use [ and ] instead.
28857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28858  if test "x$has_forbidden_chars" != x; then
28859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28861  fi
28862
28863
28864  windows_path="$new_path"
28865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28866    unix_path=`$CYGPATH -u "$windows_path"`
28867    new_path="$unix_path"
28868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28870    new_path="$unix_path"
28871  fi
28872
28873  if test "x$path" != "x$new_path"; then
28874    BOOT_JDK="$new_path"
28875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28876$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28877  fi
28878
28879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28881
28882    else
28883      # We're on a unix platform. Hooray! :)
28884      path="$BOOT_JDK"
28885      has_space=`$ECHO "$path" | $GREP " "`
28886      if test "x$has_space" != x; then
28887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28888$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28889        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28890      fi
28891
28892      # Use eval to expand a potential ~
28893      eval path="$path"
28894      if test ! -f "$path" && test ! -d "$path"; then
28895        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28896      fi
28897
28898      if test -d "$path"; then
28899        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28900      else
28901        dir="`$DIRNAME "$path"`"
28902        base="`$BASENAME "$path"`"
28903        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28904      fi
28905    fi
28906  fi
28907
28908            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28909$as_echo_n "checking for Boot JDK... " >&6; }
28910            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28911$as_echo "$BOOT_JDK" >&6; }
28912            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28913$as_echo_n "checking Boot JDK version... " >&6; }
28914            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28916$as_echo "$BOOT_JDK_VERSION" >&6; }
28917          fi # end check jdk version
28918        fi # end check javac
28919      fi # end check java
28920    fi # end check boot jdk found
28921  fi
28922
28923
28924  if test "x$BOOT_JDK_FOUND" = xno; then
28925    # Now execute the test
28926
28927  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28928  BOOT_JDK_SUFFIX="/Contents/Home"
28929  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28930  if test "x$ALL_JDKS_FOUND" != x; then
28931    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28932
28933  if test "x$BOOT_JDK_FOUND" = xno; then
28934    # Now execute the test
28935
28936        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28937        if test -d "$BOOT_JDK"; then
28938          BOOT_JDK_FOUND=maybe
28939          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28940$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28941        fi
28942
28943
28944    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28945    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28946      # Do we have a bin/java?
28947      if test ! -x "$BOOT_JDK/bin/java"; then
28948        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28950        BOOT_JDK_FOUND=no
28951      else
28952        # Do we have a bin/javac?
28953        if test ! -x "$BOOT_JDK/bin/javac"; then
28954          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28956          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28957$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28958          BOOT_JDK_FOUND=no
28959        else
28960          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28961          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28962
28963          # Extra M4 quote needed to protect [] in grep expression.
28964          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28965          if test "x$FOUND_CORRECT_VERSION" = x; then
28966            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28968            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28969$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28970            BOOT_JDK_FOUND=no
28971          else
28972            # We're done! :-)
28973            BOOT_JDK_FOUND=yes
28974
28975  # Only process if variable expands to non-empty
28976
28977  if test "x$BOOT_JDK" != x; then
28978    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28979
28980  # Input might be given as Windows format, start by converting to
28981  # unix format.
28982  path="$BOOT_JDK"
28983  new_path=`$CYGPATH -u "$path"`
28984
28985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28988  # "foo.exe" is OK but "foo" is an error.
28989  #
28990  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28991  # It is also a way to make sure we got the proper file name for the real test later on.
28992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28993  if test "x$test_shortpath" = x; then
28994    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28995$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28996    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28997  fi
28998
28999  # Call helper function which possibly converts this using DOS-style short mode.
29000  # If so, the updated path is stored in $new_path.
29001
29002  input_path="$new_path"
29003  # Check if we need to convert this using DOS-style short mode. If the path
29004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29005  # take no chances and rewrite it.
29006  # Note: m4 eats our [], so we need to use [ and ] instead.
29007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29008  if test "x$has_forbidden_chars" != x; then
29009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29013      # Going to short mode and back again did indeed matter. Since short mode is
29014      # case insensitive, let's make it lowercase to improve readability.
29015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29016      # Now convert it back to Unix-style (cygpath)
29017      input_path=`$CYGPATH -u "$shortmode_path"`
29018      new_path="$input_path"
29019    fi
29020  fi
29021
29022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29023  if test "x$test_cygdrive_prefix" = x; then
29024    # As a simple fix, exclude /usr/bin since it's not a real path.
29025    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29027      # a path prefixed by /cygdrive for fixpath to work.
29028      new_path="$CYGWIN_ROOT_PATH$input_path"
29029    fi
29030  fi
29031
29032
29033  if test "x$path" != "x$new_path"; then
29034    BOOT_JDK="$new_path"
29035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29036$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29037  fi
29038
29039    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29040
29041  path="$BOOT_JDK"
29042  has_colon=`$ECHO $path | $GREP ^.:`
29043  new_path="$path"
29044  if test "x$has_colon" = x; then
29045    # Not in mixed or Windows style, start by that.
29046    new_path=`cmd //c echo $path`
29047  fi
29048
29049
29050  input_path="$new_path"
29051  # Check if we need to convert this using DOS-style short mode. If the path
29052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29053  # take no chances and rewrite it.
29054  # Note: m4 eats our [], so we need to use [ and ] instead.
29055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29056  if test "x$has_forbidden_chars" != x; then
29057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29058    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29059  fi
29060
29061
29062  windows_path="$new_path"
29063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29064    unix_path=`$CYGPATH -u "$windows_path"`
29065    new_path="$unix_path"
29066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29068    new_path="$unix_path"
29069  fi
29070
29071  if test "x$path" != "x$new_path"; then
29072    BOOT_JDK="$new_path"
29073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29074$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29075  fi
29076
29077  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29078  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29079
29080    else
29081      # We're on a unix platform. Hooray! :)
29082      path="$BOOT_JDK"
29083      has_space=`$ECHO "$path" | $GREP " "`
29084      if test "x$has_space" != x; then
29085        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29086$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29087        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29088      fi
29089
29090      # Use eval to expand a potential ~
29091      eval path="$path"
29092      if test ! -f "$path" && test ! -d "$path"; then
29093        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29094      fi
29095
29096      if test -d "$path"; then
29097        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29098      else
29099        dir="`$DIRNAME "$path"`"
29100        base="`$BASENAME "$path"`"
29101        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29102      fi
29103    fi
29104  fi
29105
29106            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29107$as_echo_n "checking for Boot JDK... " >&6; }
29108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29109$as_echo "$BOOT_JDK" >&6; }
29110            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29111$as_echo_n "checking Boot JDK version... " >&6; }
29112            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29114$as_echo "$BOOT_JDK_VERSION" >&6; }
29115          fi # end check jdk version
29116        fi # end check javac
29117      fi # end check java
29118    fi # end check boot jdk found
29119  fi
29120
29121    done
29122  fi
29123
29124
29125    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29126    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29127      # Do we have a bin/java?
29128      if test ! -x "$BOOT_JDK/bin/java"; then
29129        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29130$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29131        BOOT_JDK_FOUND=no
29132      else
29133        # Do we have a bin/javac?
29134        if test ! -x "$BOOT_JDK/bin/javac"; then
29135          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29136$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29137          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29138$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29139          BOOT_JDK_FOUND=no
29140        else
29141          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29142          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29143
29144          # Extra M4 quote needed to protect [] in grep expression.
29145          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29146          if test "x$FOUND_CORRECT_VERSION" = x; then
29147            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29149            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29150$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29151            BOOT_JDK_FOUND=no
29152          else
29153            # We're done! :-)
29154            BOOT_JDK_FOUND=yes
29155
29156  # Only process if variable expands to non-empty
29157
29158  if test "x$BOOT_JDK" != x; then
29159    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29160
29161  # Input might be given as Windows format, start by converting to
29162  # unix format.
29163  path="$BOOT_JDK"
29164  new_path=`$CYGPATH -u "$path"`
29165
29166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29169  # "foo.exe" is OK but "foo" is an error.
29170  #
29171  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29172  # It is also a way to make sure we got the proper file name for the real test later on.
29173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29174  if test "x$test_shortpath" = x; then
29175    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29176$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29177    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29178  fi
29179
29180  # Call helper function which possibly converts this using DOS-style short mode.
29181  # If so, the updated path is stored in $new_path.
29182
29183  input_path="$new_path"
29184  # Check if we need to convert this using DOS-style short mode. If the path
29185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29186  # take no chances and rewrite it.
29187  # Note: m4 eats our [], so we need to use [ and ] instead.
29188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29189  if test "x$has_forbidden_chars" != x; then
29190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29194      # Going to short mode and back again did indeed matter. Since short mode is
29195      # case insensitive, let's make it lowercase to improve readability.
29196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29197      # Now convert it back to Unix-style (cygpath)
29198      input_path=`$CYGPATH -u "$shortmode_path"`
29199      new_path="$input_path"
29200    fi
29201  fi
29202
29203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29204  if test "x$test_cygdrive_prefix" = x; then
29205    # As a simple fix, exclude /usr/bin since it's not a real path.
29206    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29208      # a path prefixed by /cygdrive for fixpath to work.
29209      new_path="$CYGWIN_ROOT_PATH$input_path"
29210    fi
29211  fi
29212
29213
29214  if test "x$path" != "x$new_path"; then
29215    BOOT_JDK="$new_path"
29216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29217$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29218  fi
29219
29220    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29221
29222  path="$BOOT_JDK"
29223  has_colon=`$ECHO $path | $GREP ^.:`
29224  new_path="$path"
29225  if test "x$has_colon" = x; then
29226    # Not in mixed or Windows style, start by that.
29227    new_path=`cmd //c echo $path`
29228  fi
29229
29230
29231  input_path="$new_path"
29232  # Check if we need to convert this using DOS-style short mode. If the path
29233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29234  # take no chances and rewrite it.
29235  # Note: m4 eats our [], so we need to use [ and ] instead.
29236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29237  if test "x$has_forbidden_chars" != x; then
29238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29240  fi
29241
29242
29243  windows_path="$new_path"
29244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29245    unix_path=`$CYGPATH -u "$windows_path"`
29246    new_path="$unix_path"
29247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29249    new_path="$unix_path"
29250  fi
29251
29252  if test "x$path" != "x$new_path"; then
29253    BOOT_JDK="$new_path"
29254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29255$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29256  fi
29257
29258  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29259  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29260
29261    else
29262      # We're on a unix platform. Hooray! :)
29263      path="$BOOT_JDK"
29264      has_space=`$ECHO "$path" | $GREP " "`
29265      if test "x$has_space" != x; then
29266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29267$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29268        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29269      fi
29270
29271      # Use eval to expand a potential ~
29272      eval path="$path"
29273      if test ! -f "$path" && test ! -d "$path"; then
29274        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29275      fi
29276
29277      if test -d "$path"; then
29278        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29279      else
29280        dir="`$DIRNAME "$path"`"
29281        base="`$BASENAME "$path"`"
29282        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29283      fi
29284    fi
29285  fi
29286
29287            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29288$as_echo_n "checking for Boot JDK... " >&6; }
29289            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29290$as_echo "$BOOT_JDK" >&6; }
29291            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29292$as_echo_n "checking Boot JDK version... " >&6; }
29293            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29294            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29295$as_echo "$BOOT_JDK_VERSION" >&6; }
29296          fi # end check jdk version
29297        fi # end check javac
29298      fi # end check java
29299    fi # end check boot jdk found
29300  fi
29301
29302  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29303
29304  if test "x$BOOT_JDK_FOUND" = xno; then
29305    # Now execute the test
29306
29307  BOOT_JDK_PREFIX="/usr/lib/jvm"
29308  BOOT_JDK_SUFFIX=""
29309  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29310  if test "x$ALL_JDKS_FOUND" != x; then
29311    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29312
29313  if test "x$BOOT_JDK_FOUND" = xno; then
29314    # Now execute the test
29315
29316        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29317        if test -d "$BOOT_JDK"; then
29318          BOOT_JDK_FOUND=maybe
29319          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29320$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29321        fi
29322
29323
29324    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29325    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29326      # Do we have a bin/java?
29327      if test ! -x "$BOOT_JDK/bin/java"; then
29328        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29330        BOOT_JDK_FOUND=no
29331      else
29332        # Do we have a bin/javac?
29333        if test ! -x "$BOOT_JDK/bin/javac"; then
29334          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29336          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29337$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29338          BOOT_JDK_FOUND=no
29339        else
29340          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29341          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29342
29343          # Extra M4 quote needed to protect [] in grep expression.
29344          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29345          if test "x$FOUND_CORRECT_VERSION" = x; then
29346            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29348            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29349$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29350            BOOT_JDK_FOUND=no
29351          else
29352            # We're done! :-)
29353            BOOT_JDK_FOUND=yes
29354
29355  # Only process if variable expands to non-empty
29356
29357  if test "x$BOOT_JDK" != x; then
29358    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29359
29360  # Input might be given as Windows format, start by converting to
29361  # unix format.
29362  path="$BOOT_JDK"
29363  new_path=`$CYGPATH -u "$path"`
29364
29365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29368  # "foo.exe" is OK but "foo" is an error.
29369  #
29370  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29371  # It is also a way to make sure we got the proper file name for the real test later on.
29372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29373  if test "x$test_shortpath" = x; then
29374    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29375$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29376    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29377  fi
29378
29379  # Call helper function which possibly converts this using DOS-style short mode.
29380  # If so, the updated path is stored in $new_path.
29381
29382  input_path="$new_path"
29383  # Check if we need to convert this using DOS-style short mode. If the path
29384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29385  # take no chances and rewrite it.
29386  # Note: m4 eats our [], so we need to use [ and ] instead.
29387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29388  if test "x$has_forbidden_chars" != x; then
29389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29393      # Going to short mode and back again did indeed matter. Since short mode is
29394      # case insensitive, let's make it lowercase to improve readability.
29395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29396      # Now convert it back to Unix-style (cygpath)
29397      input_path=`$CYGPATH -u "$shortmode_path"`
29398      new_path="$input_path"
29399    fi
29400  fi
29401
29402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29403  if test "x$test_cygdrive_prefix" = x; then
29404    # As a simple fix, exclude /usr/bin since it's not a real path.
29405    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29407      # a path prefixed by /cygdrive for fixpath to work.
29408      new_path="$CYGWIN_ROOT_PATH$input_path"
29409    fi
29410  fi
29411
29412
29413  if test "x$path" != "x$new_path"; then
29414    BOOT_JDK="$new_path"
29415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29416$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29417  fi
29418
29419    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29420
29421  path="$BOOT_JDK"
29422  has_colon=`$ECHO $path | $GREP ^.:`
29423  new_path="$path"
29424  if test "x$has_colon" = x; then
29425    # Not in mixed or Windows style, start by that.
29426    new_path=`cmd //c echo $path`
29427  fi
29428
29429
29430  input_path="$new_path"
29431  # Check if we need to convert this using DOS-style short mode. If the path
29432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29433  # take no chances and rewrite it.
29434  # Note: m4 eats our [], so we need to use [ and ] instead.
29435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29436  if test "x$has_forbidden_chars" != x; then
29437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29439  fi
29440
29441
29442  windows_path="$new_path"
29443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29444    unix_path=`$CYGPATH -u "$windows_path"`
29445    new_path="$unix_path"
29446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29448    new_path="$unix_path"
29449  fi
29450
29451  if test "x$path" != "x$new_path"; then
29452    BOOT_JDK="$new_path"
29453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29454$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29455  fi
29456
29457  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29458  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29459
29460    else
29461      # We're on a unix platform. Hooray! :)
29462      path="$BOOT_JDK"
29463      has_space=`$ECHO "$path" | $GREP " "`
29464      if test "x$has_space" != x; then
29465        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29466$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29467        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29468      fi
29469
29470      # Use eval to expand a potential ~
29471      eval path="$path"
29472      if test ! -f "$path" && test ! -d "$path"; then
29473        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29474      fi
29475
29476      if test -d "$path"; then
29477        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29478      else
29479        dir="`$DIRNAME "$path"`"
29480        base="`$BASENAME "$path"`"
29481        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29482      fi
29483    fi
29484  fi
29485
29486            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29487$as_echo_n "checking for Boot JDK... " >&6; }
29488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29489$as_echo "$BOOT_JDK" >&6; }
29490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29491$as_echo_n "checking Boot JDK version... " >&6; }
29492            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29494$as_echo "$BOOT_JDK_VERSION" >&6; }
29495          fi # end check jdk version
29496        fi # end check javac
29497      fi # end check java
29498    fi # end check boot jdk found
29499  fi
29500
29501    done
29502  fi
29503
29504
29505    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29506    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29507      # Do we have a bin/java?
29508      if test ! -x "$BOOT_JDK/bin/java"; then
29509        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29511        BOOT_JDK_FOUND=no
29512      else
29513        # Do we have a bin/javac?
29514        if test ! -x "$BOOT_JDK/bin/javac"; then
29515          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29517          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29518$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29519          BOOT_JDK_FOUND=no
29520        else
29521          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29522          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29523
29524          # Extra M4 quote needed to protect [] in grep expression.
29525          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29526          if test "x$FOUND_CORRECT_VERSION" = x; then
29527            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29529            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29530$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29531            BOOT_JDK_FOUND=no
29532          else
29533            # We're done! :-)
29534            BOOT_JDK_FOUND=yes
29535
29536  # Only process if variable expands to non-empty
29537
29538  if test "x$BOOT_JDK" != x; then
29539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29540
29541  # Input might be given as Windows format, start by converting to
29542  # unix format.
29543  path="$BOOT_JDK"
29544  new_path=`$CYGPATH -u "$path"`
29545
29546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29549  # "foo.exe" is OK but "foo" is an error.
29550  #
29551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29552  # It is also a way to make sure we got the proper file name for the real test later on.
29553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29554  if test "x$test_shortpath" = x; then
29555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29556$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29557    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29558  fi
29559
29560  # Call helper function which possibly converts this using DOS-style short mode.
29561  # If so, the updated path is stored in $new_path.
29562
29563  input_path="$new_path"
29564  # Check if we need to convert this using DOS-style short mode. If the path
29565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29566  # take no chances and rewrite it.
29567  # Note: m4 eats our [], so we need to use [ and ] instead.
29568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29569  if test "x$has_forbidden_chars" != x; then
29570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29574      # Going to short mode and back again did indeed matter. Since short mode is
29575      # case insensitive, let's make it lowercase to improve readability.
29576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29577      # Now convert it back to Unix-style (cygpath)
29578      input_path=`$CYGPATH -u "$shortmode_path"`
29579      new_path="$input_path"
29580    fi
29581  fi
29582
29583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29584  if test "x$test_cygdrive_prefix" = x; then
29585    # As a simple fix, exclude /usr/bin since it's not a real path.
29586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29588      # a path prefixed by /cygdrive for fixpath to work.
29589      new_path="$CYGWIN_ROOT_PATH$input_path"
29590    fi
29591  fi
29592
29593
29594  if test "x$path" != "x$new_path"; then
29595    BOOT_JDK="$new_path"
29596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29598  fi
29599
29600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29601
29602  path="$BOOT_JDK"
29603  has_colon=`$ECHO $path | $GREP ^.:`
29604  new_path="$path"
29605  if test "x$has_colon" = x; then
29606    # Not in mixed or Windows style, start by that.
29607    new_path=`cmd //c echo $path`
29608  fi
29609
29610
29611  input_path="$new_path"
29612  # Check if we need to convert this using DOS-style short mode. If the path
29613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29614  # take no chances and rewrite it.
29615  # Note: m4 eats our [], so we need to use [ and ] instead.
29616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29617  if test "x$has_forbidden_chars" != x; then
29618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29620  fi
29621
29622
29623  windows_path="$new_path"
29624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29625    unix_path=`$CYGPATH -u "$windows_path"`
29626    new_path="$unix_path"
29627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29629    new_path="$unix_path"
29630  fi
29631
29632  if test "x$path" != "x$new_path"; then
29633    BOOT_JDK="$new_path"
29634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29636  fi
29637
29638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29640
29641    else
29642      # We're on a unix platform. Hooray! :)
29643      path="$BOOT_JDK"
29644      has_space=`$ECHO "$path" | $GREP " "`
29645      if test "x$has_space" != x; then
29646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29647$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29648        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29649      fi
29650
29651      # Use eval to expand a potential ~
29652      eval path="$path"
29653      if test ! -f "$path" && test ! -d "$path"; then
29654        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29655      fi
29656
29657      if test -d "$path"; then
29658        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29659      else
29660        dir="`$DIRNAME "$path"`"
29661        base="`$BASENAME "$path"`"
29662        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29663      fi
29664    fi
29665  fi
29666
29667            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29668$as_echo_n "checking for Boot JDK... " >&6; }
29669            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29670$as_echo "$BOOT_JDK" >&6; }
29671            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29672$as_echo_n "checking Boot JDK version... " >&6; }
29673            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29675$as_echo "$BOOT_JDK_VERSION" >&6; }
29676          fi # end check jdk version
29677        fi # end check javac
29678      fi # end check java
29679    fi # end check boot jdk found
29680  fi
29681
29682  fi
29683
29684
29685    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29686    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29687      # Do we have a bin/java?
29688      if test ! -x "$BOOT_JDK/bin/java"; then
29689        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29691        BOOT_JDK_FOUND=no
29692      else
29693        # Do we have a bin/javac?
29694        if test ! -x "$BOOT_JDK/bin/javac"; then
29695          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29696$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29697          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29698$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29699          BOOT_JDK_FOUND=no
29700        else
29701          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29702          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29703
29704          # Extra M4 quote needed to protect [] in grep expression.
29705          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29706          if test "x$FOUND_CORRECT_VERSION" = x; then
29707            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29709            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29710$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29711            BOOT_JDK_FOUND=no
29712          else
29713            # We're done! :-)
29714            BOOT_JDK_FOUND=yes
29715
29716  # Only process if variable expands to non-empty
29717
29718  if test "x$BOOT_JDK" != x; then
29719    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29720
29721  # Input might be given as Windows format, start by converting to
29722  # unix format.
29723  path="$BOOT_JDK"
29724  new_path=`$CYGPATH -u "$path"`
29725
29726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29729  # "foo.exe" is OK but "foo" is an error.
29730  #
29731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29732  # It is also a way to make sure we got the proper file name for the real test later on.
29733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29734  if test "x$test_shortpath" = x; then
29735    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29736$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29737    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29738  fi
29739
29740  # Call helper function which possibly converts this using DOS-style short mode.
29741  # If so, the updated path is stored in $new_path.
29742
29743  input_path="$new_path"
29744  # Check if we need to convert this using DOS-style short mode. If the path
29745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29746  # take no chances and rewrite it.
29747  # Note: m4 eats our [], so we need to use [ and ] instead.
29748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29749  if test "x$has_forbidden_chars" != x; then
29750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29754      # Going to short mode and back again did indeed matter. Since short mode is
29755      # case insensitive, let's make it lowercase to improve readability.
29756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29757      # Now convert it back to Unix-style (cygpath)
29758      input_path=`$CYGPATH -u "$shortmode_path"`
29759      new_path="$input_path"
29760    fi
29761  fi
29762
29763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29764  if test "x$test_cygdrive_prefix" = x; then
29765    # As a simple fix, exclude /usr/bin since it's not a real path.
29766    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29768      # a path prefixed by /cygdrive for fixpath to work.
29769      new_path="$CYGWIN_ROOT_PATH$input_path"
29770    fi
29771  fi
29772
29773
29774  if test "x$path" != "x$new_path"; then
29775    BOOT_JDK="$new_path"
29776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29777$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29778  fi
29779
29780    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29781
29782  path="$BOOT_JDK"
29783  has_colon=`$ECHO $path | $GREP ^.:`
29784  new_path="$path"
29785  if test "x$has_colon" = x; then
29786    # Not in mixed or Windows style, start by that.
29787    new_path=`cmd //c echo $path`
29788  fi
29789
29790
29791  input_path="$new_path"
29792  # Check if we need to convert this using DOS-style short mode. If the path
29793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29794  # take no chances and rewrite it.
29795  # Note: m4 eats our [], so we need to use [ and ] instead.
29796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29797  if test "x$has_forbidden_chars" != x; then
29798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29800  fi
29801
29802
29803  windows_path="$new_path"
29804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29805    unix_path=`$CYGPATH -u "$windows_path"`
29806    new_path="$unix_path"
29807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29809    new_path="$unix_path"
29810  fi
29811
29812  if test "x$path" != "x$new_path"; then
29813    BOOT_JDK="$new_path"
29814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29815$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29816  fi
29817
29818  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29819  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29820
29821    else
29822      # We're on a unix platform. Hooray! :)
29823      path="$BOOT_JDK"
29824      has_space=`$ECHO "$path" | $GREP " "`
29825      if test "x$has_space" != x; then
29826        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29827$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29828        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29829      fi
29830
29831      # Use eval to expand a potential ~
29832      eval path="$path"
29833      if test ! -f "$path" && test ! -d "$path"; then
29834        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29835      fi
29836
29837      if test -d "$path"; then
29838        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29839      else
29840        dir="`$DIRNAME "$path"`"
29841        base="`$BASENAME "$path"`"
29842        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29843      fi
29844    fi
29845  fi
29846
29847            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29848$as_echo_n "checking for Boot JDK... " >&6; }
29849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29850$as_echo "$BOOT_JDK" >&6; }
29851            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29852$as_echo_n "checking Boot JDK version... " >&6; }
29853            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29854            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29855$as_echo "$BOOT_JDK_VERSION" >&6; }
29856          fi # end check jdk version
29857        fi # end check javac
29858      fi # end check java
29859    fi # end check boot jdk found
29860  fi
29861
29862
29863  # If we haven't found anything yet, we've truly lost. Give up.
29864  if test "x$BOOT_JDK_FOUND" = xno; then
29865
29866  # Print a helpful message on how to acquire the necessary build dependency.
29867  # openjdk is the help tag: freetype, cups, alsa etc
29868  MISSING_DEPENDENCY=openjdk
29869
29870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29871    cygwin_help $MISSING_DEPENDENCY
29872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29873    msys_help $MISSING_DEPENDENCY
29874  else
29875    PKGHANDLER_COMMAND=
29876
29877    case $PKGHANDLER in
29878      apt-get)
29879        apt_help     $MISSING_DEPENDENCY ;;
29880      yum)
29881        yum_help     $MISSING_DEPENDENCY ;;
29882      port)
29883        port_help    $MISSING_DEPENDENCY ;;
29884      pkgutil)
29885        pkgutil_help $MISSING_DEPENDENCY ;;
29886      pkgadd)
29887        pkgadd_help  $MISSING_DEPENDENCY ;;
29888    esac
29889
29890    if test "x$PKGHANDLER_COMMAND" != x; then
29891      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29892    fi
29893  fi
29894
29895    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29896$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29897    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29898$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29899    as_fn_error $? "Cannot continue" "$LINENO" 5
29900  fi
29901
29902
29903
29904  # Setup tools from the Boot JDK.
29905
29906  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29907
29908  # Publish this variable in the help.
29909
29910
29911  if [ -z "${JAVA+x}" ]; then
29912    # The variable is not set by user, try to locate tool using the code snippet
29913
29914      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29915$as_echo_n "checking for java in Boot JDK... " >&6; }
29916      JAVA=$BOOT_JDK/bin/java
29917      if test ! -x $JAVA; then
29918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29919$as_echo "not found" >&6; }
29920        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29921$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29922        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29923      fi
29924      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29925$as_echo "ok" >&6; }
29926
29927
29928  else
29929    # The variable is set, but is it from the command line or the environment?
29930
29931    # Try to remove the string !JAVA! from our list.
29932    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29933    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29934      # If it failed, the variable was not from the command line. Ignore it,
29935      # but warn the user (except for BASH, which is always set by the calling BASH).
29936      if test "xJAVA" != xBASH; then
29937        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29938$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29939      fi
29940      # Try to locate tool using the code snippet
29941
29942      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29943$as_echo_n "checking for java in Boot JDK... " >&6; }
29944      JAVA=$BOOT_JDK/bin/java
29945      if test ! -x $JAVA; then
29946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29947$as_echo "not found" >&6; }
29948        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29949$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29950        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29951      fi
29952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29953$as_echo "ok" >&6; }
29954
29955
29956    else
29957      # If it succeeded, then it was overridden by the user. We will use it
29958      # for the tool.
29959
29960      # First remove it from the list of overridden variables, so we can test
29961      # for unknown variables in the end.
29962      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29963
29964      # Check if we try to supply an empty value
29965      if test "x$JAVA" = x; then
29966        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29967$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29968        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29969$as_echo_n "checking for JAVA... " >&6; }
29970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29971$as_echo "disabled" >&6; }
29972      else
29973        # Check if the provided tool contains a complete path.
29974        tool_specified="$JAVA"
29975        tool_basename="${tool_specified##*/}"
29976        if test "x$tool_basename" = "x$tool_specified"; then
29977          # A command without a complete path is provided, search $PATH.
29978          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29979$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29980          # Extract the first word of "$tool_basename", so it can be a program name with args.
29981set dummy $tool_basename; ac_word=$2
29982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29983$as_echo_n "checking for $ac_word... " >&6; }
29984if ${ac_cv_path_JAVA+:} false; then :
29985  $as_echo_n "(cached) " >&6
29986else
29987  case $JAVA in
29988  [\\/]* | ?:[\\/]*)
29989  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29990  ;;
29991  *)
29992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29993for as_dir in $PATH
29994do
29995  IFS=$as_save_IFS
29996  test -z "$as_dir" && as_dir=.
29997    for ac_exec_ext in '' $ac_executable_extensions; do
29998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29999    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30001    break 2
30002  fi
30003done
30004  done
30005IFS=$as_save_IFS
30006
30007  ;;
30008esac
30009fi
30010JAVA=$ac_cv_path_JAVA
30011if test -n "$JAVA"; then
30012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30013$as_echo "$JAVA" >&6; }
30014else
30015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30016$as_echo "no" >&6; }
30017fi
30018
30019
30020          if test "x$JAVA" = x; then
30021            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30022          fi
30023        else
30024          # Otherwise we believe it is a complete path. Use it as it is.
30025          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30026$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30027          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30028$as_echo_n "checking for JAVA... " >&6; }
30029          if test ! -x "$tool_specified"; then
30030            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30031$as_echo "not found" >&6; }
30032            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30033          fi
30034          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30035$as_echo "$tool_specified" >&6; }
30036        fi
30037      fi
30038    fi
30039
30040  fi
30041
30042
30043
30044  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30045
30046  # Publish this variable in the help.
30047
30048
30049  if [ -z "${JAVAC+x}" ]; then
30050    # The variable is not set by user, try to locate tool using the code snippet
30051
30052      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30053$as_echo_n "checking for javac in Boot JDK... " >&6; }
30054      JAVAC=$BOOT_JDK/bin/javac
30055      if test ! -x $JAVAC; then
30056        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30057$as_echo "not found" >&6; }
30058        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30059$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30060        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30061      fi
30062      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30063$as_echo "ok" >&6; }
30064
30065
30066  else
30067    # The variable is set, but is it from the command line or the environment?
30068
30069    # Try to remove the string !JAVAC! from our list.
30070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30072      # If it failed, the variable was not from the command line. Ignore it,
30073      # but warn the user (except for BASH, which is always set by the calling BASH).
30074      if test "xJAVAC" != xBASH; then
30075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30076$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30077      fi
30078      # Try to locate tool using the code snippet
30079
30080      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30081$as_echo_n "checking for javac in Boot JDK... " >&6; }
30082      JAVAC=$BOOT_JDK/bin/javac
30083      if test ! -x $JAVAC; then
30084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30085$as_echo "not found" >&6; }
30086        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30087$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30088        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30089      fi
30090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30091$as_echo "ok" >&6; }
30092
30093
30094    else
30095      # If it succeeded, then it was overridden by the user. We will use it
30096      # for the tool.
30097
30098      # First remove it from the list of overridden variables, so we can test
30099      # for unknown variables in the end.
30100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30101
30102      # Check if we try to supply an empty value
30103      if test "x$JAVAC" = x; then
30104        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30105$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30106        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30107$as_echo_n "checking for JAVAC... " >&6; }
30108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30109$as_echo "disabled" >&6; }
30110      else
30111        # Check if the provided tool contains a complete path.
30112        tool_specified="$JAVAC"
30113        tool_basename="${tool_specified##*/}"
30114        if test "x$tool_basename" = "x$tool_specified"; then
30115          # A command without a complete path is provided, search $PATH.
30116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30117$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30118          # Extract the first word of "$tool_basename", so it can be a program name with args.
30119set dummy $tool_basename; ac_word=$2
30120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30121$as_echo_n "checking for $ac_word... " >&6; }
30122if ${ac_cv_path_JAVAC+:} false; then :
30123  $as_echo_n "(cached) " >&6
30124else
30125  case $JAVAC in
30126  [\\/]* | ?:[\\/]*)
30127  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30128  ;;
30129  *)
30130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30131for as_dir in $PATH
30132do
30133  IFS=$as_save_IFS
30134  test -z "$as_dir" && as_dir=.
30135    for ac_exec_ext in '' $ac_executable_extensions; do
30136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30137    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30139    break 2
30140  fi
30141done
30142  done
30143IFS=$as_save_IFS
30144
30145  ;;
30146esac
30147fi
30148JAVAC=$ac_cv_path_JAVAC
30149if test -n "$JAVAC"; then
30150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30151$as_echo "$JAVAC" >&6; }
30152else
30153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30154$as_echo "no" >&6; }
30155fi
30156
30157
30158          if test "x$JAVAC" = x; then
30159            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30160          fi
30161        else
30162          # Otherwise we believe it is a complete path. Use it as it is.
30163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30164$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30165          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30166$as_echo_n "checking for JAVAC... " >&6; }
30167          if test ! -x "$tool_specified"; then
30168            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30169$as_echo "not found" >&6; }
30170            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30171          fi
30172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30173$as_echo "$tool_specified" >&6; }
30174        fi
30175      fi
30176    fi
30177
30178  fi
30179
30180
30181
30182  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30183
30184  # Publish this variable in the help.
30185
30186
30187  if [ -z "${JAVAH+x}" ]; then
30188    # The variable is not set by user, try to locate tool using the code snippet
30189
30190      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30191$as_echo_n "checking for javah in Boot JDK... " >&6; }
30192      JAVAH=$BOOT_JDK/bin/javah
30193      if test ! -x $JAVAH; then
30194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30195$as_echo "not found" >&6; }
30196        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30197$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30198        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30199      fi
30200      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30201$as_echo "ok" >&6; }
30202
30203
30204  else
30205    # The variable is set, but is it from the command line or the environment?
30206
30207    # Try to remove the string !JAVAH! from our list.
30208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30210      # If it failed, the variable was not from the command line. Ignore it,
30211      # but warn the user (except for BASH, which is always set by the calling BASH).
30212      if test "xJAVAH" != xBASH; then
30213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30214$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30215      fi
30216      # Try to locate tool using the code snippet
30217
30218      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30219$as_echo_n "checking for javah in Boot JDK... " >&6; }
30220      JAVAH=$BOOT_JDK/bin/javah
30221      if test ! -x $JAVAH; then
30222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30223$as_echo "not found" >&6; }
30224        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30225$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30226        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30227      fi
30228      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30229$as_echo "ok" >&6; }
30230
30231
30232    else
30233      # If it succeeded, then it was overridden by the user. We will use it
30234      # for the tool.
30235
30236      # First remove it from the list of overridden variables, so we can test
30237      # for unknown variables in the end.
30238      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30239
30240      # Check if we try to supply an empty value
30241      if test "x$JAVAH" = x; then
30242        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30243$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30244        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30245$as_echo_n "checking for JAVAH... " >&6; }
30246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30247$as_echo "disabled" >&6; }
30248      else
30249        # Check if the provided tool contains a complete path.
30250        tool_specified="$JAVAH"
30251        tool_basename="${tool_specified##*/}"
30252        if test "x$tool_basename" = "x$tool_specified"; then
30253          # A command without a complete path is provided, search $PATH.
30254          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30255$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30256          # Extract the first word of "$tool_basename", so it can be a program name with args.
30257set dummy $tool_basename; ac_word=$2
30258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30259$as_echo_n "checking for $ac_word... " >&6; }
30260if ${ac_cv_path_JAVAH+:} false; then :
30261  $as_echo_n "(cached) " >&6
30262else
30263  case $JAVAH in
30264  [\\/]* | ?:[\\/]*)
30265  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30266  ;;
30267  *)
30268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30269for as_dir in $PATH
30270do
30271  IFS=$as_save_IFS
30272  test -z "$as_dir" && as_dir=.
30273    for ac_exec_ext in '' $ac_executable_extensions; do
30274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30275    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30277    break 2
30278  fi
30279done
30280  done
30281IFS=$as_save_IFS
30282
30283  ;;
30284esac
30285fi
30286JAVAH=$ac_cv_path_JAVAH
30287if test -n "$JAVAH"; then
30288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30289$as_echo "$JAVAH" >&6; }
30290else
30291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30292$as_echo "no" >&6; }
30293fi
30294
30295
30296          if test "x$JAVAH" = x; then
30297            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30298          fi
30299        else
30300          # Otherwise we believe it is a complete path. Use it as it is.
30301          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30302$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30303          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30304$as_echo_n "checking for JAVAH... " >&6; }
30305          if test ! -x "$tool_specified"; then
30306            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30307$as_echo "not found" >&6; }
30308            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30309          fi
30310          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30311$as_echo "$tool_specified" >&6; }
30312        fi
30313      fi
30314    fi
30315
30316  fi
30317
30318
30319
30320  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30321
30322  # Publish this variable in the help.
30323
30324
30325  if [ -z "${JAR+x}" ]; then
30326    # The variable is not set by user, try to locate tool using the code snippet
30327
30328      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30329$as_echo_n "checking for jar in Boot JDK... " >&6; }
30330      JAR=$BOOT_JDK/bin/jar
30331      if test ! -x $JAR; then
30332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30333$as_echo "not found" >&6; }
30334        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30335$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30336        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30337      fi
30338      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30339$as_echo "ok" >&6; }
30340
30341
30342  else
30343    # The variable is set, but is it from the command line or the environment?
30344
30345    # Try to remove the string !JAR! from our list.
30346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30348      # If it failed, the variable was not from the command line. Ignore it,
30349      # but warn the user (except for BASH, which is always set by the calling BASH).
30350      if test "xJAR" != xBASH; then
30351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30352$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30353      fi
30354      # Try to locate tool using the code snippet
30355
30356      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30357$as_echo_n "checking for jar in Boot JDK... " >&6; }
30358      JAR=$BOOT_JDK/bin/jar
30359      if test ! -x $JAR; then
30360        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30361$as_echo "not found" >&6; }
30362        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30363$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30364        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30365      fi
30366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30367$as_echo "ok" >&6; }
30368
30369
30370    else
30371      # If it succeeded, then it was overridden by the user. We will use it
30372      # for the tool.
30373
30374      # First remove it from the list of overridden variables, so we can test
30375      # for unknown variables in the end.
30376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30377
30378      # Check if we try to supply an empty value
30379      if test "x$JAR" = x; then
30380        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30381$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30382        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30383$as_echo_n "checking for JAR... " >&6; }
30384        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30385$as_echo "disabled" >&6; }
30386      else
30387        # Check if the provided tool contains a complete path.
30388        tool_specified="$JAR"
30389        tool_basename="${tool_specified##*/}"
30390        if test "x$tool_basename" = "x$tool_specified"; then
30391          # A command without a complete path is provided, search $PATH.
30392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30393$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30394          # Extract the first word of "$tool_basename", so it can be a program name with args.
30395set dummy $tool_basename; ac_word=$2
30396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30397$as_echo_n "checking for $ac_word... " >&6; }
30398if ${ac_cv_path_JAR+:} false; then :
30399  $as_echo_n "(cached) " >&6
30400else
30401  case $JAR in
30402  [\\/]* | ?:[\\/]*)
30403  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30404  ;;
30405  *)
30406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30407for as_dir in $PATH
30408do
30409  IFS=$as_save_IFS
30410  test -z "$as_dir" && as_dir=.
30411    for ac_exec_ext in '' $ac_executable_extensions; do
30412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30413    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30415    break 2
30416  fi
30417done
30418  done
30419IFS=$as_save_IFS
30420
30421  ;;
30422esac
30423fi
30424JAR=$ac_cv_path_JAR
30425if test -n "$JAR"; then
30426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30427$as_echo "$JAR" >&6; }
30428else
30429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30430$as_echo "no" >&6; }
30431fi
30432
30433
30434          if test "x$JAR" = x; then
30435            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30436          fi
30437        else
30438          # Otherwise we believe it is a complete path. Use it as it is.
30439          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30440$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30441          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30442$as_echo_n "checking for JAR... " >&6; }
30443          if test ! -x "$tool_specified"; then
30444            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30445$as_echo "not found" >&6; }
30446            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30447          fi
30448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30449$as_echo "$tool_specified" >&6; }
30450        fi
30451      fi
30452    fi
30453
30454  fi
30455
30456
30457
30458  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30459
30460  # Publish this variable in the help.
30461
30462
30463  if [ -z "${JARSIGNER+x}" ]; then
30464    # The variable is not set by user, try to locate tool using the code snippet
30465
30466      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30467$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30468      JARSIGNER=$BOOT_JDK/bin/jarsigner
30469      if test ! -x $JARSIGNER; then
30470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30471$as_echo "not found" >&6; }
30472        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30473$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30474        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30475      fi
30476      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30477$as_echo "ok" >&6; }
30478
30479
30480  else
30481    # The variable is set, but is it from the command line or the environment?
30482
30483    # Try to remove the string !JARSIGNER! from our list.
30484    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30485    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30486      # If it failed, the variable was not from the command line. Ignore it,
30487      # but warn the user (except for BASH, which is always set by the calling BASH).
30488      if test "xJARSIGNER" != xBASH; then
30489        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30490$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30491      fi
30492      # Try to locate tool using the code snippet
30493
30494      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30495$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30496      JARSIGNER=$BOOT_JDK/bin/jarsigner
30497      if test ! -x $JARSIGNER; then
30498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30499$as_echo "not found" >&6; }
30500        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30501$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30502        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30503      fi
30504      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30505$as_echo "ok" >&6; }
30506
30507
30508    else
30509      # If it succeeded, then it was overridden by the user. We will use it
30510      # for the tool.
30511
30512      # First remove it from the list of overridden variables, so we can test
30513      # for unknown variables in the end.
30514      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30515
30516      # Check if we try to supply an empty value
30517      if test "x$JARSIGNER" = x; then
30518        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30519$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30521$as_echo_n "checking for JARSIGNER... " >&6; }
30522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30523$as_echo "disabled" >&6; }
30524      else
30525        # Check if the provided tool contains a complete path.
30526        tool_specified="$JARSIGNER"
30527        tool_basename="${tool_specified##*/}"
30528        if test "x$tool_basename" = "x$tool_specified"; then
30529          # A command without a complete path is provided, search $PATH.
30530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30531$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30532          # Extract the first word of "$tool_basename", so it can be a program name with args.
30533set dummy $tool_basename; ac_word=$2
30534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30535$as_echo_n "checking for $ac_word... " >&6; }
30536if ${ac_cv_path_JARSIGNER+:} false; then :
30537  $as_echo_n "(cached) " >&6
30538else
30539  case $JARSIGNER in
30540  [\\/]* | ?:[\\/]*)
30541  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30542  ;;
30543  *)
30544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30545for as_dir in $PATH
30546do
30547  IFS=$as_save_IFS
30548  test -z "$as_dir" && as_dir=.
30549    for ac_exec_ext in '' $ac_executable_extensions; do
30550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30551    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30553    break 2
30554  fi
30555done
30556  done
30557IFS=$as_save_IFS
30558
30559  ;;
30560esac
30561fi
30562JARSIGNER=$ac_cv_path_JARSIGNER
30563if test -n "$JARSIGNER"; then
30564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30565$as_echo "$JARSIGNER" >&6; }
30566else
30567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30568$as_echo "no" >&6; }
30569fi
30570
30571
30572          if test "x$JARSIGNER" = x; then
30573            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30574          fi
30575        else
30576          # Otherwise we believe it is a complete path. Use it as it is.
30577          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30578$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30579          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30580$as_echo_n "checking for JARSIGNER... " >&6; }
30581          if test ! -x "$tool_specified"; then
30582            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30583$as_echo "not found" >&6; }
30584            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30585          fi
30586          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30587$as_echo "$tool_specified" >&6; }
30588        fi
30589      fi
30590    fi
30591
30592  fi
30593
30594
30595
30596  # Finally, set some other options...
30597
30598  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30599  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30600
30601
30602
30603  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30604  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30605  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30606  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30607  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30608  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30609    dummy="$dummy --patch-module foo=bar"
30610    JVM_ARG_OK=true
30611  else
30612    $ECHO "Arg failed:" >&5
30613    $ECHO "$OUTPUT" >&5
30614    JVM_ARG_OK=false
30615  fi
30616
30617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30618$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30619  if test "x$JVM_ARG_OK" = "xtrue"; then
30620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30621$as_echo "yes" >&6; }
30622    BOOT_JDK_MODULAR="true"
30623  else
30624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30625$as_echo "no" >&6; }
30626    BOOT_JDK_MODULAR="false"
30627  fi
30628
30629
30630
30631
30632  # Check if the boot jdk is 32 or 64 bit
30633  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30634    BOOT_JDK_BITS="64"
30635  else
30636    BOOT_JDK_BITS="32"
30637  fi
30638  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30639$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30641$as_echo "$BOOT_JDK_BITS" >&6; }
30642
30643
30644
30645
30646# Check whether --with-build-jdk was given.
30647if test "${with_build_jdk+set}" = set; then :
30648  withval=$with_build_jdk;
30649fi
30650
30651
30652  CREATE_BUILDJDK=false
30653  EXTERNAL_BUILDJDK=false
30654  BUILD_JDK_FOUND="no"
30655  if test "x$with_build_jdk" != "x"; then
30656
30657  if test "x$BUILD_JDK_FOUND" = xno; then
30658    # Execute the test
30659
30660       if test "x$with_build_jdk" != x; then
30661         BUILD_JDK=$with_build_jdk
30662         BUILD_JDK_FOUND=maybe
30663         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30664$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30665       fi
30666
30667    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30668    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30669      # Do we have a bin/java?
30670      if test ! -x "$BUILD_JDK/bin/java"; then
30671        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30672$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30673        BUILD_JDK_FOUND=no
30674      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30675        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30676$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30677        BUILD_JDK_FOUND=no
30678      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30679        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30680$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30681        BUILD_JDK_FOUND=no
30682      elif test ! -x "$BUILD_JDK/bin/javac"; then
30683        # Do we have a bin/javac?
30684        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30685$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30686        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30687$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30688        BUILD_JDK_FOUND=no
30689      else
30690        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30691        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30692
30693        # Extra M4 quote needed to protect [] in grep expression.
30694        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30695        if test "x$FOUND_CORRECT_VERSION" = x; then
30696          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30697$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30698          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30699$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30700          BUILD_JDK_FOUND=no
30701        else
30702          # We're done!
30703          BUILD_JDK_FOUND=yes
30704
30705  # Only process if variable expands to non-empty
30706
30707  if test "x$BUILD_JDK" != x; then
30708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30709
30710  # Input might be given as Windows format, start by converting to
30711  # unix format.
30712  path="$BUILD_JDK"
30713  new_path=`$CYGPATH -u "$path"`
30714
30715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30718  # "foo.exe" is OK but "foo" is an error.
30719  #
30720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30721  # It is also a way to make sure we got the proper file name for the real test later on.
30722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30723  if test "x$test_shortpath" = x; then
30724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30725$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30726    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30727  fi
30728
30729  # Call helper function which possibly converts this using DOS-style short mode.
30730  # If so, the updated path is stored in $new_path.
30731
30732  input_path="$new_path"
30733  # Check if we need to convert this using DOS-style short mode. If the path
30734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30735  # take no chances and rewrite it.
30736  # Note: m4 eats our [], so we need to use [ and ] instead.
30737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30738  if test "x$has_forbidden_chars" != x; then
30739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30743      # Going to short mode and back again did indeed matter. Since short mode is
30744      # case insensitive, let's make it lowercase to improve readability.
30745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30746      # Now convert it back to Unix-style (cygpath)
30747      input_path=`$CYGPATH -u "$shortmode_path"`
30748      new_path="$input_path"
30749    fi
30750  fi
30751
30752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30753  if test "x$test_cygdrive_prefix" = x; then
30754    # As a simple fix, exclude /usr/bin since it's not a real path.
30755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30757      # a path prefixed by /cygdrive for fixpath to work.
30758      new_path="$CYGWIN_ROOT_PATH$input_path"
30759    fi
30760  fi
30761
30762
30763  if test "x$path" != "x$new_path"; then
30764    BUILD_JDK="$new_path"
30765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30766$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30767  fi
30768
30769    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30770
30771  path="$BUILD_JDK"
30772  has_colon=`$ECHO $path | $GREP ^.:`
30773  new_path="$path"
30774  if test "x$has_colon" = x; then
30775    # Not in mixed or Windows style, start by that.
30776    new_path=`cmd //c echo $path`
30777  fi
30778
30779
30780  input_path="$new_path"
30781  # Check if we need to convert this using DOS-style short mode. If the path
30782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30783  # take no chances and rewrite it.
30784  # Note: m4 eats our [], so we need to use [ and ] instead.
30785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30786  if test "x$has_forbidden_chars" != x; then
30787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30789  fi
30790
30791
30792  windows_path="$new_path"
30793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30794    unix_path=`$CYGPATH -u "$windows_path"`
30795    new_path="$unix_path"
30796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30798    new_path="$unix_path"
30799  fi
30800
30801  if test "x$path" != "x$new_path"; then
30802    BUILD_JDK="$new_path"
30803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30804$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30805  fi
30806
30807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30809
30810    else
30811      # We're on a unix platform. Hooray! :)
30812      path="$BUILD_JDK"
30813      has_space=`$ECHO "$path" | $GREP " "`
30814      if test "x$has_space" != x; then
30815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30816$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30817        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30818      fi
30819
30820      # Use eval to expand a potential ~
30821      eval path="$path"
30822      if test ! -f "$path" && test ! -d "$path"; then
30823        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30824      fi
30825
30826      if test -d "$path"; then
30827        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30828      else
30829        dir="`$DIRNAME "$path"`"
30830        base="`$BASENAME "$path"`"
30831        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30832      fi
30833    fi
30834  fi
30835
30836          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30837$as_echo_n "checking for Build JDK... " >&6; }
30838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30839$as_echo "$BUILD_JDK" >&6; }
30840          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30841$as_echo_n "checking Build JDK version... " >&6; }
30842          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30844$as_echo "$BUILD_JDK_VERSION" >&6; }
30845        fi # end check jdk version
30846      fi # end check java
30847    fi # end check build jdk found
30848  fi
30849
30850    EXTERNAL_BUILDJDK=true
30851  else
30852    if test "x$COMPILE_TYPE" = "xcross"; then
30853      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30854      BUILD_JDK_FOUND=yes
30855      CREATE_BUILDJDK=true
30856      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30857$as_echo_n "checking for Build JDK... " >&6; }
30858      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30859$as_echo "yes, will build it for the host platform" >&6; }
30860    else
30861      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30862      BUILD_JDK_FOUND=yes
30863      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30864$as_echo_n "checking for Build JDK... " >&6; }
30865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30866$as_echo "yes, will use output dir" >&6; }
30867    fi
30868  fi
30869
30870  JMOD="$BUILD_JDK/bin/jmod"
30871  JLINK="$BUILD_JDK/bin/jlink"
30872
30873
30874
30875  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30877$as_echo_n "checking for Build JDK... " >&6; }
30878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30879$as_echo "no" >&6; }
30880    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30881  fi
30882
30883
30884
30885
30886
30887
30888###############################################################################
30889#
30890# Configure the sources to use. We can add or override individual directories.
30891#
30892###############################################################################
30893
30894
30895  # Where are the sources.
30896  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30897  CORBA_TOPDIR="$SRC_ROOT/corba"
30898  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30899  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30900  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30901  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30902  JDK_TOPDIR="$SRC_ROOT/jdk"
30903
30904
30905
30906
30907
30908
30909
30910
30911
30912  # This feature is no longer supported.
30913
30914
30915
30916# Check whether --with-add-source-root was given.
30917if test "${with_add_source_root+set}" = set; then :
30918  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
30919$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30920fi
30921
30922
30923
30924
30925# Check whether --with-override-source-root was given.
30926if test "${with_override_source_root+set}" = set; then :
30927  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
30928$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30929fi
30930
30931
30932
30933
30934# Check whether --with-adds-and-overrides was given.
30935if test "${with_adds_and_overrides+set}" = set; then :
30936  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
30937$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30938fi
30939
30940
30941
30942
30943# Check whether --with-override-langtools was given.
30944if test "${with_override_langtools+set}" = set; then :
30945  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30946$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30947fi
30948
30949
30950
30951
30952# Check whether --with-override-corba was given.
30953if test "${with_override_corba+set}" = set; then :
30954  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30955$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30956fi
30957
30958
30959
30960
30961# Check whether --with-override-jaxp was given.
30962if test "${with_override_jaxp+set}" = set; then :
30963  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30964$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30965fi
30966
30967
30968
30969
30970# Check whether --with-override-jaxws was given.
30971if test "${with_override_jaxws+set}" = set; then :
30972  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30973$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30974fi
30975
30976
30977
30978
30979# Check whether --with-override-hotspot was given.
30980if test "${with_override_hotspot+set}" = set; then :
30981  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30982$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30983fi
30984
30985
30986
30987
30988# Check whether --with-override-nashorn was given.
30989if test "${with_override_nashorn+set}" = set; then :
30990  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30991$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30992fi
30993
30994
30995
30996
30997# Check whether --with-override-jdk was given.
30998if test "${with_override_jdk+set}" = set; then :
30999  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31000$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31001fi
31002
31003
31004
31005
31006  BUILD_OUTPUT="$OUTPUT_ROOT"
31007
31008
31009  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
31010  BUILD_HOTSPOT=true
31011
31012
31013
31014# Check whether --with-import-hotspot was given.
31015if test "${with_import_hotspot+set}" = set; then :
31016  withval=$with_import_hotspot;
31017fi
31018
31019  if test "x$with_import_hotspot" != x; then
31020    CURDIR="$PWD"
31021    cd "$with_import_hotspot"
31022    HOTSPOT_DIST="`pwd`"
31023    cd "$CURDIR"
31024    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31025      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31026    fi
31027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31028$as_echo_n "checking if hotspot should be imported... " >&6; }
31029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31030$as_echo "yes from $HOTSPOT_DIST" >&6; }
31031    BUILD_HOTSPOT=false
31032  fi
31033
31034  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31035
31036
31037
31038
31039# Check whether --with-import-modules was given.
31040if test "${with_import_modules+set}" = set; then :
31041  withval=$with_import_modules;
31042fi
31043
31044
31045  if test "x$with_import_modules" != x \
31046      && test "x$with_import_modules" != "xno"; then
31047    if test -d "$with_import_modules"; then
31048      IMPORT_MODULES_TOPDIR="$with_import_modules"
31049
31050  # Only process if variable expands to non-empty
31051
31052  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31053    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31054
31055  # Input might be given as Windows format, start by converting to
31056  # unix format.
31057  path="$IMPORT_MODULES_TOPDIR"
31058  new_path=`$CYGPATH -u "$path"`
31059
31060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31063  # "foo.exe" is OK but "foo" is an error.
31064  #
31065  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31066  # It is also a way to make sure we got the proper file name for the real test later on.
31067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31068  if test "x$test_shortpath" = x; then
31069    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31070$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31071    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31072  fi
31073
31074  # Call helper function which possibly converts this using DOS-style short mode.
31075  # If so, the updated path is stored in $new_path.
31076
31077  input_path="$new_path"
31078  # Check if we need to convert this using DOS-style short mode. If the path
31079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31080  # take no chances and rewrite it.
31081  # Note: m4 eats our [], so we need to use [ and ] instead.
31082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31083  if test "x$has_forbidden_chars" != x; then
31084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31088      # Going to short mode and back again did indeed matter. Since short mode is
31089      # case insensitive, let's make it lowercase to improve readability.
31090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31091      # Now convert it back to Unix-style (cygpath)
31092      input_path=`$CYGPATH -u "$shortmode_path"`
31093      new_path="$input_path"
31094    fi
31095  fi
31096
31097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31098  if test "x$test_cygdrive_prefix" = x; then
31099    # As a simple fix, exclude /usr/bin since it's not a real path.
31100    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31102      # a path prefixed by /cygdrive for fixpath to work.
31103      new_path="$CYGWIN_ROOT_PATH$input_path"
31104    fi
31105  fi
31106
31107
31108  if test "x$path" != "x$new_path"; then
31109    IMPORT_MODULES_TOPDIR="$new_path"
31110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31111$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31112  fi
31113
31114    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31115
31116  path="$IMPORT_MODULES_TOPDIR"
31117  has_colon=`$ECHO $path | $GREP ^.:`
31118  new_path="$path"
31119  if test "x$has_colon" = x; then
31120    # Not in mixed or Windows style, start by that.
31121    new_path=`cmd //c echo $path`
31122  fi
31123
31124
31125  input_path="$new_path"
31126  # Check if we need to convert this using DOS-style short mode. If the path
31127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31128  # take no chances and rewrite it.
31129  # Note: m4 eats our [], so we need to use [ and ] instead.
31130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31131  if test "x$has_forbidden_chars" != x; then
31132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31134  fi
31135
31136
31137  windows_path="$new_path"
31138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31139    unix_path=`$CYGPATH -u "$windows_path"`
31140    new_path="$unix_path"
31141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31143    new_path="$unix_path"
31144  fi
31145
31146  if test "x$path" != "x$new_path"; then
31147    IMPORT_MODULES_TOPDIR="$new_path"
31148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31149$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31150  fi
31151
31152  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31153  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31154
31155    else
31156      # We're on a unix platform. Hooray! :)
31157      path="$IMPORT_MODULES_TOPDIR"
31158      has_space=`$ECHO "$path" | $GREP " "`
31159      if test "x$has_space" != x; then
31160        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31161$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31162        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31163      fi
31164
31165      # Use eval to expand a potential ~
31166      eval path="$path"
31167      if test ! -f "$path" && test ! -d "$path"; then
31168        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31169      fi
31170
31171      if test -d "$path"; then
31172        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31173      else
31174        dir="`$DIRNAME "$path"`"
31175        base="`$BASENAME "$path"`"
31176        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31177      fi
31178    fi
31179  fi
31180
31181    elif test -e "$with_import_modules"; then
31182      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31183      $RM -rf "$IMPORT_MODULES_TOPDIR"
31184      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31185      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31186        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31187      fi
31188    else
31189      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31190    fi
31191  fi
31192
31193  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31194    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31195  fi
31196  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31197    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31198  fi
31199  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31200    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31201  fi
31202  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31203    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31204  fi
31205  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31206    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31207  fi
31208  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31209    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31210  fi
31211
31212
31213
31214
31215
31216
31217
31218
31219
31220###############################################################################
31221#
31222# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31223# native code.
31224#
31225###############################################################################
31226
31227# See if we are doing a complete static build or not
31228
31229  # Check whether --enable-static-build was given.
31230if test "${enable_static_build+set}" = set; then :
31231  enableval=$enable_static_build;
31232fi
31233
31234  STATIC_BUILD=false
31235  if test "x$enable_static_build" = "xyes"; then
31236    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31237$as_echo_n "checking if static build is enabled... " >&6; }
31238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31239$as_echo "yes" >&6; }
31240    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31241      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31242    fi
31243    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31244    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31245    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31246    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31247    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31248    STATIC_BUILD=true
31249  elif test "x$enable_static_build" = "xno"; then
31250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31251$as_echo_n "checking if static build is enabled... " >&6; }
31252    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31253$as_echo "no" >&6; }
31254  elif test "x$enable_static_build" != "x"; then
31255    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31256  fi
31257
31258
31259
31260
31261# First determine the toolchain type (compiler family)
31262
31263
31264# Check whether --with-toolchain-type was given.
31265if test "${with_toolchain_type+set}" = set; then :
31266  withval=$with_toolchain_type;
31267fi
31268
31269
31270  # Use indirect variable referencing
31271  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31272  VALID_TOOLCHAINS=${!toolchain_var_name}
31273
31274  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31275    if test -n "$XCODEBUILD"; then
31276      # On Mac OS X, default toolchain to clang after Xcode 5
31277      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31278      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31279      if test $? -ne 0; then
31280        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31281      fi
31282      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31283          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31284          $CUT -f 1 -d .`
31285      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31286$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31287      if test $XCODE_MAJOR_VERSION -ge 5; then
31288          DEFAULT_TOOLCHAIN="clang"
31289      else
31290          DEFAULT_TOOLCHAIN="gcc"
31291      fi
31292    else
31293      # If Xcode is not installed, but the command line tools are
31294      # then we can't run xcodebuild. On these systems we should
31295      # default to clang
31296      DEFAULT_TOOLCHAIN="clang"
31297    fi
31298  else
31299    # First toolchain type in the list is the default
31300    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31301  fi
31302
31303  if test "x$with_toolchain_type" = xlist; then
31304    # List all toolchains
31305    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31306$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31307    for toolchain in $VALID_TOOLCHAINS; do
31308      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31309      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31310      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31311    done
31312
31313    exit 0
31314  elif test "x$with_toolchain_type" != x; then
31315    # User override; check that it is valid
31316    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31317      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31318$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31319      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31320$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31321      as_fn_error $? "Cannot continue." "$LINENO" 5
31322    fi
31323    TOOLCHAIN_TYPE=$with_toolchain_type
31324  else
31325    # No flag given, use default
31326    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31327  fi
31328
31329
31330  TOOLCHAIN_CC_BINARY_clang="clang"
31331  TOOLCHAIN_CC_BINARY_gcc="gcc"
31332  TOOLCHAIN_CC_BINARY_microsoft="cl"
31333  TOOLCHAIN_CC_BINARY_solstudio="cc"
31334  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31335
31336  TOOLCHAIN_CXX_BINARY_clang="clang++"
31337  TOOLCHAIN_CXX_BINARY_gcc="g++"
31338  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31339  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31340  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31341
31342  # Use indirect variable referencing
31343  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31344  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31345  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31346  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31347  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31348  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31349  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31350  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31351
31352
31353  # Define filename patterns
31354  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31355    LIBRARY_PREFIX=
31356    SHARED_LIBRARY_SUFFIX='.dll'
31357    STATIC_LIBRARY_SUFFIX='.lib'
31358    SHARED_LIBRARY='$1.dll'
31359    STATIC_LIBRARY='$1.lib'
31360    OBJ_SUFFIX='.obj'
31361    EXE_SUFFIX='.exe'
31362  else
31363    LIBRARY_PREFIX=lib
31364    SHARED_LIBRARY_SUFFIX='.so'
31365    STATIC_LIBRARY_SUFFIX='.a'
31366    SHARED_LIBRARY='lib$1.so'
31367    STATIC_LIBRARY='lib$1.a'
31368    OBJ_SUFFIX='.o'
31369    EXE_SUFFIX=''
31370    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31371      # For full static builds, we're overloading the SHARED_LIBRARY
31372      # variables in order to limit the amount of changes required.
31373      # It would be better to remove SHARED and just use LIBRARY and
31374      # LIBRARY_SUFFIX for libraries that can be built either
31375      # shared or static and use STATIC_* for libraries that are
31376      # always built statically.
31377      if test "x$STATIC_BUILD" = xtrue; then
31378        SHARED_LIBRARY='lib$1.a'
31379        SHARED_LIBRARY_SUFFIX='.a'
31380      else
31381        SHARED_LIBRARY='lib$1.dylib'
31382        SHARED_LIBRARY_SUFFIX='.dylib'
31383      fi
31384    fi
31385  fi
31386
31387
31388
31389
31390
31391
31392
31393
31394
31395
31396  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31397    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31398$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31399  else
31400    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31401$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31402  fi
31403
31404
31405# User supplied flags should be used when configure detects compilers
31406
31407  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31408    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31409$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31410  fi
31411
31412  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31413    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31414$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31415  fi
31416
31417  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31418    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31419$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31420  fi
31421
31422
31423# Check whether --with-extra-cflags was given.
31424if test "${with_extra_cflags+set}" = set; then :
31425  withval=$with_extra_cflags;
31426fi
31427
31428
31429
31430# Check whether --with-extra-cxxflags was given.
31431if test "${with_extra_cxxflags+set}" = set; then :
31432  withval=$with_extra_cxxflags;
31433fi
31434
31435
31436
31437# Check whether --with-extra-ldflags was given.
31438if test "${with_extra_ldflags+set}" = set; then :
31439  withval=$with_extra_ldflags;
31440fi
31441
31442
31443  EXTRA_CFLAGS="$with_extra_cflags"
31444  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31445  EXTRA_LDFLAGS="$with_extra_ldflags"
31446
31447  # Hotspot needs these set in their legacy form
31448  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31449  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31450  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31451
31452
31453
31454
31455
31456
31457
31458
31459
31460  # The global CFLAGS and LDLAGS variables are used by configure tests and
31461  # should include the extra parameters
31462  CFLAGS="$EXTRA_CFLAGS"
31463  CXXFLAGS="$EXTRA_CXXFLAGS"
31464  LDFLAGS="$EXTRA_LDFLAGS"
31465  CPPFLAGS=""
31466
31467# The sysroot cflags are needed for configure to be able to run the compilers
31468
31469  if test "x$SYSROOT" != "x"; then
31470    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31471      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31472        # Solaris Studio does not have a concept of sysroot. Instead we must
31473        # make sure the default include and lib dirs are appended to each
31474        # compile and link command line. Must also add -I-xbuiltin to enable
31475        # inlining of system functions and intrinsics.
31476        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31477        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31478            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
31479            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
31480      fi
31481    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31482      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31483      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31484    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31485      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31486      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31487    fi
31488    # Propagate the sysroot args to hotspot
31489    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31490    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31491    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31492    # The global CFLAGS and LDFLAGS variables need these for configure to function
31493    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31494    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31495    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31496    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31497  fi
31498
31499  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31500    # We also need -iframework<path>/System/Library/Frameworks
31501    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31502    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31503    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31504    # set this here so it doesn't have to be peppered throughout the forest
31505    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31506    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31507  fi
31508
31509
31510
31511
31512
31513# Then detect the actual binaries needed
31514
31515  # FIXME: Is this needed?
31516  ac_ext=cpp
31517ac_cpp='$CXXCPP $CPPFLAGS'
31518ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31519ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31520ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31521
31522
31523  # Store the CFLAGS etc passed to the configure script.
31524  ORG_CFLAGS="$CFLAGS"
31525  ORG_CXXFLAGS="$CXXFLAGS"
31526
31527  # autoconf magic only relies on PATH, so update it if tools dir is specified
31528  OLD_PATH="$PATH"
31529
31530  # On Windows, we need to detect the visual studio installation first.
31531  # This will change the PATH, but we need to keep that new PATH even
31532  # after toolchain detection is done, since the compiler (on x86) uses
31533  # it for DLL resolution in runtime.
31534  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31535      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31536
31537  # Store path to cygwin link.exe to help excluding it when searching for
31538  # VS linker. This must be done before changing the PATH when looking for VS.
31539  # Extract the first word of "link", so it can be a program name with args.
31540set dummy link; ac_word=$2
31541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31542$as_echo_n "checking for $ac_word... " >&6; }
31543if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31544  $as_echo_n "(cached) " >&6
31545else
31546  case $CYGWIN_LINK in
31547  [\\/]* | ?:[\\/]*)
31548  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31549  ;;
31550  *)
31551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31552for as_dir in $PATH
31553do
31554  IFS=$as_save_IFS
31555  test -z "$as_dir" && as_dir=.
31556    for ac_exec_ext in '' $ac_executable_extensions; do
31557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31558    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31560    break 2
31561  fi
31562done
31563  done
31564IFS=$as_save_IFS
31565
31566  ;;
31567esac
31568fi
31569CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31570if test -n "$CYGWIN_LINK"; then
31571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31572$as_echo "$CYGWIN_LINK" >&6; }
31573else
31574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31575$as_echo "no" >&6; }
31576fi
31577
31578
31579  if test "x$CYGWIN_LINK" != x; then
31580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31581$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31582    "$CYGWIN_LINK" --version > /dev/null
31583    if test $? -eq 0 ; then
31584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31585$as_echo "yes" >&6; }
31586    else
31587      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31588$as_echo "no" >&6; }
31589      # This might be the VS linker. Don't exclude it later on.
31590      CYGWIN_LINK=""
31591    fi
31592  fi
31593
31594  # First-hand choice is to locate and run the vsvars bat file.
31595
31596
31597# Check whether --with-toolchain-version was given.
31598if test "${with_toolchain_version+set}" = set; then :
31599  withval=$with_toolchain_version;
31600fi
31601
31602
31603  if test "x$with_toolchain_version" = xlist; then
31604    # List all toolchains
31605    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31606$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31607    for version in $VALID_VS_VERSIONS; do
31608      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31609      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31610    done
31611
31612    exit 0
31613  elif test "x$DEVKIT_VS_VERSION" != x; then
31614    VS_VERSION=$DEVKIT_VS_VERSION
31615    TOOLCHAIN_VERSION=$VS_VERSION
31616    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31617    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31618    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31619    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31620    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31621    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31622
31623    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31624    # can still be exported as INCLUDE for compiler invocations without
31625    # SYSROOT_CFLAGS
31626    OLDIFS="$IFS"
31627    IFS=";"
31628    for i in $DEVKIT_VS_INCLUDE; do
31629      ipath=$i
31630
31631  unix_path="$ipath"
31632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31633    windows_path=`$CYGPATH -m "$unix_path"`
31634    ipath="$windows_path"
31635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31636    windows_path=`cmd //c echo $unix_path`
31637    ipath="$windows_path"
31638  fi
31639
31640      VS_INCLUDE="$VS_INCLUDE;$ipath"
31641    done
31642    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31643    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31644    for i in $DEVKIT_VS_LIB; do
31645      libpath=$i
31646
31647  unix_path="$libpath"
31648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31649    windows_path=`$CYGPATH -m "$unix_path"`
31650    libpath="$windows_path"
31651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31652    windows_path=`cmd //c echo $unix_path`
31653    libpath="$windows_path"
31654  fi
31655
31656      VS_LIB="$VS_LIB;$libpath"
31657    done
31658    IFS="$OLDIFS"
31659
31660    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31661$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31662
31663  elif test "x$with_toolchain_version" != x; then
31664    # User override; check that it is valid
31665    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31666      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31667$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31668      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31669$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31670      as_fn_error $? "Cannot continue." "$LINENO" 5
31671    fi
31672    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31673  else
31674    # No flag given, use default
31675    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31676  fi
31677
31678  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31679
31680  VS_VERSION="$VS_VERSION"
31681  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31682  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31683  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31684  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31685
31686  # When using --with-tools-dir, assume it points to the correct and default
31687  # version of Visual Studio or that --with-toolchain-version was also set.
31688  if test "x$with_tools_dir" != x; then
31689
31690  if test "x$VS_ENV_CMD" = x; then
31691    VS_VERSION="${VS_VERSION}"
31692    VS_BASE="$with_tools_dir/../.."
31693    METHOD="--with-tools-dir"
31694
31695    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31696      VCVARSFILE="vc/bin/vcvars32.bat"
31697    else
31698      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31699    fi
31700
31701
31702  windows_path="$VS_BASE"
31703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31704    unix_path=`$CYGPATH -u "$windows_path"`
31705    VS_BASE="$unix_path"
31706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31708    VS_BASE="$unix_path"
31709  fi
31710
31711    if test -d "$VS_BASE"; then
31712      if test -f "$VS_BASE/$VCVARSFILE"; then
31713        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31714$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31715        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31716        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31717        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31718        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31719      else
31720        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31721$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31722        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31723$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31724      fi
31725    fi
31726  fi
31727
31728
31729  if test "x$VS_ENV_CMD" = x; then
31730    VS_VERSION="${VS_VERSION}"
31731    VS_BASE="$with_tools_dir/../../.."
31732    METHOD="--with-tools-dir"
31733
31734    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31735      VCVARSFILE="vc/bin/vcvars32.bat"
31736    else
31737      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31738    fi
31739
31740
31741  windows_path="$VS_BASE"
31742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31743    unix_path=`$CYGPATH -u "$windows_path"`
31744    VS_BASE="$unix_path"
31745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31747    VS_BASE="$unix_path"
31748  fi
31749
31750    if test -d "$VS_BASE"; then
31751      if test -f "$VS_BASE/$VCVARSFILE"; then
31752        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31753$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31754        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31755        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31756        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31757        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31758      else
31759        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31760$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31761        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31762$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31763      fi
31764    fi
31765  fi
31766
31767    if test "x$VS_ENV_CMD" = x; then
31768      # Having specified an argument which is incorrect will produce an instant failure;
31769      # we should not go on looking
31770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31771$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31772      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31773$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31774      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31775$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31776      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31777    fi
31778  fi
31779
31780  VS_ENV_CMD=""
31781  VS_ENV_ARGS=""
31782
31783  if test "x$VS_COMNTOOLS" != x; then
31784
31785  if test "x$VS_ENV_CMD" = x; then
31786    VS_VERSION="${VS_VERSION}"
31787    VS_BASE="$VS_COMNTOOLS/../.."
31788    METHOD="$VS_COMNTOOLS_VAR variable"
31789
31790    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31791      VCVARSFILE="vc/bin/vcvars32.bat"
31792    else
31793      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31794    fi
31795
31796
31797  windows_path="$VS_BASE"
31798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31799    unix_path=`$CYGPATH -u "$windows_path"`
31800    VS_BASE="$unix_path"
31801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31803    VS_BASE="$unix_path"
31804  fi
31805
31806    if test -d "$VS_BASE"; then
31807      if test -f "$VS_BASE/$VCVARSFILE"; then
31808        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31809$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31810        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31811        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31812        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31813        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31814      else
31815        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31816$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31817        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31818$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31819      fi
31820    fi
31821  fi
31822
31823  fi
31824  if test "x$PROGRAMFILES" != x; then
31825
31826  if test "x$VS_ENV_CMD" = x; then
31827    VS_VERSION="${VS_VERSION}"
31828    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31829    METHOD="well-known name"
31830
31831    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31832      VCVARSFILE="vc/bin/vcvars32.bat"
31833    else
31834      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31835    fi
31836
31837
31838  windows_path="$VS_BASE"
31839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31840    unix_path=`$CYGPATH -u "$windows_path"`
31841    VS_BASE="$unix_path"
31842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31844    VS_BASE="$unix_path"
31845  fi
31846
31847    if test -d "$VS_BASE"; then
31848      if test -f "$VS_BASE/$VCVARSFILE"; then
31849        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31850$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31851        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31852        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31853        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31854        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31855      else
31856        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31857$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31858        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31859$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31860      fi
31861    fi
31862  fi
31863
31864  fi
31865  # Work around the insanely named ProgramFiles(x86) env variable
31866  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31867  if test "x$PROGRAMFILES_X86" != x; then
31868
31869  if test "x$VS_ENV_CMD" = x; then
31870    VS_VERSION="${VS_VERSION}"
31871    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31872    METHOD="well-known name"
31873
31874    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31875      VCVARSFILE="vc/bin/vcvars32.bat"
31876    else
31877      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31878    fi
31879
31880
31881  windows_path="$VS_BASE"
31882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31883    unix_path=`$CYGPATH -u "$windows_path"`
31884    VS_BASE="$unix_path"
31885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31887    VS_BASE="$unix_path"
31888  fi
31889
31890    if test -d "$VS_BASE"; then
31891      if test -f "$VS_BASE/$VCVARSFILE"; then
31892        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31893$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31894        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31895        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31896        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31897        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31898      else
31899        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31900$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31901        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31902$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31903      fi
31904    fi
31905  fi
31906
31907  fi
31908
31909  if test "x$VS_ENV_CMD" = x; then
31910    VS_VERSION="${VS_VERSION}"
31911    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31912    METHOD="well-known name"
31913
31914    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31915      VCVARSFILE="vc/bin/vcvars32.bat"
31916    else
31917      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31918    fi
31919
31920
31921  windows_path="$VS_BASE"
31922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31923    unix_path=`$CYGPATH -u "$windows_path"`
31924    VS_BASE="$unix_path"
31925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31927    VS_BASE="$unix_path"
31928  fi
31929
31930    if test -d "$VS_BASE"; then
31931      if test -f "$VS_BASE/$VCVARSFILE"; then
31932        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31933$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31934        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31935        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31936        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31937        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31938      else
31939        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31940$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31941        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31942$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31943      fi
31944    fi
31945  fi
31946
31947
31948  if test "x$VS_ENV_CMD" = x; then
31949    VS_VERSION="${VS_VERSION}"
31950    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31951    METHOD="well-known name"
31952
31953    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31954      VCVARSFILE="vc/bin/vcvars32.bat"
31955    else
31956      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31957    fi
31958
31959
31960  windows_path="$VS_BASE"
31961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31962    unix_path=`$CYGPATH -u "$windows_path"`
31963    VS_BASE="$unix_path"
31964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31966    VS_BASE="$unix_path"
31967  fi
31968
31969    if test -d "$VS_BASE"; then
31970      if test -f "$VS_BASE/$VCVARSFILE"; then
31971        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31972$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31973        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31974        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31975        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31976        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31977      else
31978        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31979$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31980        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31981$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31982      fi
31983    fi
31984  fi
31985
31986
31987  if test "x$SDK_INSTALL_DIR" != x; then
31988    if test "x$ProgramW6432" != x; then
31989
31990  if test "x$VS_ENV_CMD" = x; then
31991    VS_VERSION="${VS_VERSION}"
31992    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31993    METHOD="well-known name"
31994
31995  windows_path="$WIN_SDK_BASE"
31996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31997    unix_path=`$CYGPATH -u "$windows_path"`
31998    WIN_SDK_BASE="$unix_path"
31999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32001    WIN_SDK_BASE="$unix_path"
32002  fi
32003
32004    if test -d "$WIN_SDK_BASE"; then
32005      # There have been cases of partial or broken SDK installations. A missing
32006      # lib dir is not going to work.
32007      if test ! -d "$WIN_SDK_BASE/lib"; then
32008        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32009$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32010        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32011$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32012      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32013        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32014$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32015        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32016        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32017          VS_ENV_ARGS="/x86"
32018        else
32019          VS_ENV_ARGS="/x64"
32020        fi
32021        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32022        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32023        # TODO: improve detection for other versions of SDK
32024        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32025      else
32026        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32027$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32028        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32029$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32030      fi
32031    fi
32032  fi
32033
32034    fi
32035    if test "x$PROGRAMW6432" != x; then
32036
32037  if test "x$VS_ENV_CMD" = x; then
32038    VS_VERSION="${VS_VERSION}"
32039    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32040    METHOD="well-known name"
32041
32042  windows_path="$WIN_SDK_BASE"
32043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32044    unix_path=`$CYGPATH -u "$windows_path"`
32045    WIN_SDK_BASE="$unix_path"
32046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32048    WIN_SDK_BASE="$unix_path"
32049  fi
32050
32051    if test -d "$WIN_SDK_BASE"; then
32052      # There have been cases of partial or broken SDK installations. A missing
32053      # lib dir is not going to work.
32054      if test ! -d "$WIN_SDK_BASE/lib"; then
32055        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32056$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32057        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32058$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32059      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32060        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32061$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32062        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32063        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32064          VS_ENV_ARGS="/x86"
32065        else
32066          VS_ENV_ARGS="/x64"
32067        fi
32068        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32069        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32070        # TODO: improve detection for other versions of SDK
32071        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32072      else
32073        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32074$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32075        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32076$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32077      fi
32078    fi
32079  fi
32080
32081    fi
32082    if test "x$PROGRAMFILES" != x; then
32083
32084  if test "x$VS_ENV_CMD" = x; then
32085    VS_VERSION="${VS_VERSION}"
32086    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32087    METHOD="well-known name"
32088
32089  windows_path="$WIN_SDK_BASE"
32090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32091    unix_path=`$CYGPATH -u "$windows_path"`
32092    WIN_SDK_BASE="$unix_path"
32093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32095    WIN_SDK_BASE="$unix_path"
32096  fi
32097
32098    if test -d "$WIN_SDK_BASE"; then
32099      # There have been cases of partial or broken SDK installations. A missing
32100      # lib dir is not going to work.
32101      if test ! -d "$WIN_SDK_BASE/lib"; then
32102        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32103$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32104        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32105$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32106      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32107        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32108$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32109        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32110        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32111          VS_ENV_ARGS="/x86"
32112        else
32113          VS_ENV_ARGS="/x64"
32114        fi
32115        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32116        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32117        # TODO: improve detection for other versions of SDK
32118        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32119      else
32120        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32121$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32122        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32123$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32124      fi
32125    fi
32126  fi
32127
32128    fi
32129
32130  if test "x$VS_ENV_CMD" = x; then
32131    VS_VERSION="${VS_VERSION}"
32132    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32133    METHOD="well-known name"
32134
32135  windows_path="$WIN_SDK_BASE"
32136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32137    unix_path=`$CYGPATH -u "$windows_path"`
32138    WIN_SDK_BASE="$unix_path"
32139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32141    WIN_SDK_BASE="$unix_path"
32142  fi
32143
32144    if test -d "$WIN_SDK_BASE"; then
32145      # There have been cases of partial or broken SDK installations. A missing
32146      # lib dir is not going to work.
32147      if test ! -d "$WIN_SDK_BASE/lib"; then
32148        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32149$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32150        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32151$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32152      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32153        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32154$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32155        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32156        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32157          VS_ENV_ARGS="/x86"
32158        else
32159          VS_ENV_ARGS="/x64"
32160        fi
32161        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32162        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32163        # TODO: improve detection for other versions of SDK
32164        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32165      else
32166        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32167$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32168        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32169$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32170      fi
32171    fi
32172  fi
32173
32174
32175  if test "x$VS_ENV_CMD" = x; then
32176    VS_VERSION="${VS_VERSION}"
32177    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32178    METHOD="well-known name"
32179
32180  windows_path="$WIN_SDK_BASE"
32181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32182    unix_path=`$CYGPATH -u "$windows_path"`
32183    WIN_SDK_BASE="$unix_path"
32184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32186    WIN_SDK_BASE="$unix_path"
32187  fi
32188
32189    if test -d "$WIN_SDK_BASE"; then
32190      # There have been cases of partial or broken SDK installations. A missing
32191      # lib dir is not going to work.
32192      if test ! -d "$WIN_SDK_BASE/lib"; then
32193        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32194$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32195        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32196$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32197      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32198        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32199$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32200        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32201        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32202          VS_ENV_ARGS="/x86"
32203        else
32204          VS_ENV_ARGS="/x64"
32205        fi
32206        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32207        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32208        # TODO: improve detection for other versions of SDK
32209        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32210      else
32211        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32212$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32213        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32214$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32215      fi
32216    fi
32217  fi
32218
32219  fi
32220
32221    if test "x$VS_ENV_CMD" != x; then
32222      TOOLCHAIN_VERSION=$VS_VERSION
32223      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32224      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32225      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32226      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32227      # The rest of the variables are already evaled while probing
32228      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32229$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32230      break
32231    fi
32232  done
32233
32234
32235  # If we have a devkit, skip all of the below.
32236  if test "x$DEVKIT_VS_VERSION" = x; then
32237    if test "x$VS_ENV_CMD" != x; then
32238      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32239
32240  # Only process if variable expands to non-empty
32241
32242  if test "x$VS_ENV_CMD" != x; then
32243    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32244
32245  # First separate the path from the arguments. This will split at the first
32246  # space.
32247  complete="$VS_ENV_CMD"
32248  path="${complete%% *}"
32249  tmp="$complete EOL"
32250  arguments="${tmp#* }"
32251
32252  # Input might be given as Windows format, start by converting to
32253  # unix format.
32254  new_path=`$CYGPATH -u "$path"`
32255
32256  # Now try to locate executable using which
32257  new_path=`$WHICH "$new_path" 2> /dev/null`
32258  # bat and cmd files are not always considered executable in cygwin causing which
32259  # to not find them
32260  if test "x$new_path" = x \
32261      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32262      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32263    new_path=`$CYGPATH -u "$path"`
32264  fi
32265  if test "x$new_path" = x; then
32266    # Oops. Which didn't find the executable.
32267    # The splitting of arguments from the executable at a space might have been incorrect,
32268    # since paths with space are more likely in Windows. Give it another try with the whole
32269    # argument.
32270    path="$complete"
32271    arguments="EOL"
32272    new_path=`$CYGPATH -u "$path"`
32273    new_path=`$WHICH "$new_path" 2> /dev/null`
32274    # bat and cmd files are not always considered executable in cygwin causing which
32275    # to not find them
32276    if test "x$new_path" = x \
32277        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32278        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32279      new_path=`$CYGPATH -u "$path"`
32280    fi
32281    if test "x$new_path" = x; then
32282      # It's still not found. Now this is an unrecoverable error.
32283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32284$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32285      has_space=`$ECHO "$complete" | $GREP " "`
32286      if test "x$has_space" != x; then
32287        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32288$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32289      fi
32290      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32291    fi
32292  fi
32293
32294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32297  # "foo.exe" is OK but "foo" is an error.
32298  #
32299  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32300  # It is also a way to make sure we got the proper file name for the real test later on.
32301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32302  if test "x$test_shortpath" = x; then
32303    # Short path failed, file does not exist as specified.
32304    # Try adding .exe or .cmd
32305    if test -f "${new_path}.exe"; then
32306      input_to_shortpath="${new_path}.exe"
32307    elif test -f "${new_path}.cmd"; then
32308      input_to_shortpath="${new_path}.cmd"
32309    else
32310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32311$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32312      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32313$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32314      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32315    fi
32316  else
32317    input_to_shortpath="$new_path"
32318  fi
32319
32320  # Call helper function which possibly converts this using DOS-style short mode.
32321  # If so, the updated path is stored in $new_path.
32322  new_path="$input_to_shortpath"
32323
32324  input_path="$input_to_shortpath"
32325  # Check if we need to convert this using DOS-style short mode. If the path
32326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32327  # take no chances and rewrite it.
32328  # Note: m4 eats our [], so we need to use [ and ] instead.
32329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32330  if test "x$has_forbidden_chars" != x; then
32331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32335      # Going to short mode and back again did indeed matter. Since short mode is
32336      # case insensitive, let's make it lowercase to improve readability.
32337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32338      # Now convert it back to Unix-style (cygpath)
32339      input_path=`$CYGPATH -u "$shortmode_path"`
32340      new_path="$input_path"
32341    fi
32342  fi
32343
32344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32345  if test "x$test_cygdrive_prefix" = x; then
32346    # As a simple fix, exclude /usr/bin since it's not a real path.
32347    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32349      # a path prefixed by /cygdrive for fixpath to work.
32350      new_path="$CYGWIN_ROOT_PATH$input_path"
32351    fi
32352  fi
32353
32354  # remove trailing .exe if any
32355  new_path="${new_path/%.exe/}"
32356
32357    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32358
32359  # First separate the path from the arguments. This will split at the first
32360  # space.
32361  complete="$VS_ENV_CMD"
32362  path="${complete%% *}"
32363  tmp="$complete EOL"
32364  arguments="${tmp#* }"
32365
32366  # Input might be given as Windows format, start by converting to
32367  # unix format.
32368  new_path="$path"
32369
32370  windows_path="$new_path"
32371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32372    unix_path=`$CYGPATH -u "$windows_path"`
32373    new_path="$unix_path"
32374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32376    new_path="$unix_path"
32377  fi
32378
32379
32380  # Now try to locate executable using which
32381  new_path=`$WHICH "$new_path" 2> /dev/null`
32382
32383  if test "x$new_path" = x; then
32384    # Oops. Which didn't find the executable.
32385    # The splitting of arguments from the executable at a space might have been incorrect,
32386    # since paths with space are more likely in Windows. Give it another try with the whole
32387    # argument.
32388    path="$complete"
32389    arguments="EOL"
32390    new_path="$path"
32391
32392  windows_path="$new_path"
32393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32394    unix_path=`$CYGPATH -u "$windows_path"`
32395    new_path="$unix_path"
32396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32398    new_path="$unix_path"
32399  fi
32400
32401
32402    new_path=`$WHICH "$new_path" 2> /dev/null`
32403    # bat and cmd files are not always considered executable in MSYS causing which
32404    # to not find them
32405    if test "x$new_path" = x \
32406        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32407        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32408      new_path="$path"
32409
32410  windows_path="$new_path"
32411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32412    unix_path=`$CYGPATH -u "$windows_path"`
32413    new_path="$unix_path"
32414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32416    new_path="$unix_path"
32417  fi
32418
32419    fi
32420
32421    if test "x$new_path" = x; then
32422      # It's still not found. Now this is an unrecoverable error.
32423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32424$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32425      has_space=`$ECHO "$complete" | $GREP " "`
32426      if test "x$has_space" != x; then
32427        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32428$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32429      fi
32430      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32431    fi
32432  fi
32433
32434  # Now new_path has a complete unix path to the binary
32435  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32436    # Keep paths in /bin as-is, but remove trailing .exe if any
32437    new_path="${new_path/%.exe/}"
32438    # Do not save /bin paths to all_fixpath_prefixes!
32439  else
32440    # Not in mixed or Windows style, start by that.
32441    new_path=`cmd //c echo $new_path`
32442
32443  input_path="$new_path"
32444  # Check if we need to convert this using DOS-style short mode. If the path
32445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32446  # take no chances and rewrite it.
32447  # Note: m4 eats our [], so we need to use [ and ] instead.
32448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32449  if test "x$has_forbidden_chars" != x; then
32450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32452  fi
32453
32454    # Output is in $new_path
32455
32456  windows_path="$new_path"
32457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32458    unix_path=`$CYGPATH -u "$windows_path"`
32459    new_path="$unix_path"
32460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32462    new_path="$unix_path"
32463  fi
32464
32465    # remove trailing .exe if any
32466    new_path="${new_path/%.exe/}"
32467
32468    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32469    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32470  fi
32471
32472    else
32473      # We're on a unix platform. Hooray! :)
32474      # First separate the path from the arguments. This will split at the first
32475      # space.
32476      complete="$VS_ENV_CMD"
32477      path="${complete%% *}"
32478      tmp="$complete EOL"
32479      arguments="${tmp#* }"
32480
32481      # Cannot rely on the command "which" here since it doesn't always work.
32482      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32483      if test -z "$is_absolute_path"; then
32484        # Path to executable is not absolute. Find it.
32485        IFS_save="$IFS"
32486        IFS=:
32487        for p in $PATH; do
32488          if test -f "$p/$path" && test -x "$p/$path"; then
32489            new_path="$p/$path"
32490            break
32491          fi
32492        done
32493        IFS="$IFS_save"
32494      else
32495        # This is an absolute path, we can use it without further modifications.
32496        new_path="$path"
32497      fi
32498
32499      if test "x$new_path" = x; then
32500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32501$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32502        has_space=`$ECHO "$complete" | $GREP " "`
32503        if test "x$has_space" != x; then
32504          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32505$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32506        fi
32507        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32508      fi
32509    fi
32510
32511    # Now join together the path and the arguments once again
32512    if test "x$arguments" != xEOL; then
32513      new_complete="$new_path ${arguments% *}"
32514    else
32515      new_complete="$new_path"
32516    fi
32517
32518    if test "x$complete" != "x$new_complete"; then
32519      VS_ENV_CMD="$new_complete"
32520      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32521$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32522    fi
32523  fi
32524
32525
32526      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32527      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32528$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32529
32530      # We need to create a couple of temporary files.
32531      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32532      $MKDIR -p $VS_ENV_TMP_DIR
32533
32534      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32535      # Instead create a shell script which will set the relevant variables when run.
32536      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32537
32538  unix_path="$WINPATH_VS_ENV_CMD"
32539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32540    windows_path=`$CYGPATH -m "$unix_path"`
32541    WINPATH_VS_ENV_CMD="$windows_path"
32542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32543    windows_path=`cmd //c echo $unix_path`
32544    WINPATH_VS_ENV_CMD="$windows_path"
32545  fi
32546
32547      WINPATH_BASH="$BASH"
32548
32549  unix_path="$WINPATH_BASH"
32550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32551    windows_path=`$CYGPATH -m "$unix_path"`
32552    WINPATH_BASH="$windows_path"
32553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32554    windows_path=`cmd //c echo $unix_path`
32555    WINPATH_BASH="$windows_path"
32556  fi
32557
32558
32559      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32560      # script (executable by bash) that will setup the important variables.
32561      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32562      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32563      # This will end up something like:
32564      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32565      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32566      # These will end up something like:
32567      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32568      # The trailing space for everyone except PATH is no typo, but is needed due
32569      # to trailing \ in the Windows paths. These will be stripped later.
32570      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32571          >> $EXTRACT_VC_ENV_BAT_FILE
32572      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32573          >> $EXTRACT_VC_ENV_BAT_FILE
32574      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32575          >> $EXTRACT_VC_ENV_BAT_FILE
32576      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32577          >> $EXTRACT_VC_ENV_BAT_FILE
32578      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32579          >> $EXTRACT_VC_ENV_BAT_FILE
32580      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32581          >> $EXTRACT_VC_ENV_BAT_FILE
32582
32583      # Now execute the newly created bat file.
32584      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32585      # Change directory so we don't need to mess with Windows paths in redirects.
32586      cd $VS_ENV_TMP_DIR
32587      cmd /c extract-vs-env.bat | $CAT
32588      cd $CURDIR
32589
32590      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32591        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32592$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32593        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32594$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32595        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32596$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32597        as_fn_error $? "Cannot continue" "$LINENO" 5
32598      fi
32599
32600      # Now set all paths and other env variables. This will allow the rest of
32601      # the configure script to find and run the compiler in the proper way.
32602      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32603$as_echo "$as_me: Setting extracted environment variables" >&6;}
32604      . $VS_ENV_TMP_DIR/set-vs-env.sh
32605      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32606      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32607    else
32608      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32609      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32610$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32611    fi
32612  fi
32613
32614  # At this point, we should have correct variables in the environment, or we can't continue.
32615  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32616$as_echo_n "checking for Visual Studio variables... " >&6; }
32617
32618  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32619      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32620    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32622$as_echo "present but broken" >&6; }
32623      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32624    else
32625      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32626$as_echo "ok" >&6; }
32627      # Remove any trailing "\" ";" and " " from the variables.
32628      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32629      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32630      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32631      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32632      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32633      # Remove any paths containing # (typically F#) as that messes up make. This
32634      # is needed if visual studio was installed with F# support.
32635      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32636
32637
32638
32639
32640
32641      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32642      OLDIFS="$IFS"
32643      IFS=";"
32644      for i in $VS_INCLUDE; do
32645        ipath=$i
32646        # Only process non-empty elements
32647        if test "x$ipath" != x; then
32648          IFS="$OLDIFS"
32649          # Check that directory exists before calling fixup_path
32650          testpath=$ipath
32651
32652  windows_path="$testpath"
32653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32654    unix_path=`$CYGPATH -u "$windows_path"`
32655    testpath="$unix_path"
32656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32658    testpath="$unix_path"
32659  fi
32660
32661          if test -d "$testpath"; then
32662
32663  # Only process if variable expands to non-empty
32664
32665  if test "x$ipath" != x; then
32666    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32667
32668  # Input might be given as Windows format, start by converting to
32669  # unix format.
32670  path="$ipath"
32671  new_path=`$CYGPATH -u "$path"`
32672
32673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32676  # "foo.exe" is OK but "foo" is an error.
32677  #
32678  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32679  # It is also a way to make sure we got the proper file name for the real test later on.
32680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32681  if test "x$test_shortpath" = x; then
32682    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32683$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32684    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32685  fi
32686
32687  # Call helper function which possibly converts this using DOS-style short mode.
32688  # If so, the updated path is stored in $new_path.
32689
32690  input_path="$new_path"
32691  # Check if we need to convert this using DOS-style short mode. If the path
32692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32693  # take no chances and rewrite it.
32694  # Note: m4 eats our [], so we need to use [ and ] instead.
32695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32696  if test "x$has_forbidden_chars" != x; then
32697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32698    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32699    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32700    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32701      # Going to short mode and back again did indeed matter. Since short mode is
32702      # case insensitive, let's make it lowercase to improve readability.
32703      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32704      # Now convert it back to Unix-style (cygpath)
32705      input_path=`$CYGPATH -u "$shortmode_path"`
32706      new_path="$input_path"
32707    fi
32708  fi
32709
32710  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32711  if test "x$test_cygdrive_prefix" = x; then
32712    # As a simple fix, exclude /usr/bin since it's not a real path.
32713    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32714      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32715      # a path prefixed by /cygdrive for fixpath to work.
32716      new_path="$CYGWIN_ROOT_PATH$input_path"
32717    fi
32718  fi
32719
32720
32721  if test "x$path" != "x$new_path"; then
32722    ipath="$new_path"
32723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32724$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32725  fi
32726
32727    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32728
32729  path="$ipath"
32730  has_colon=`$ECHO $path | $GREP ^.:`
32731  new_path="$path"
32732  if test "x$has_colon" = x; then
32733    # Not in mixed or Windows style, start by that.
32734    new_path=`cmd //c echo $path`
32735  fi
32736
32737
32738  input_path="$new_path"
32739  # Check if we need to convert this using DOS-style short mode. If the path
32740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32741  # take no chances and rewrite it.
32742  # Note: m4 eats our [], so we need to use [ and ] instead.
32743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32744  if test "x$has_forbidden_chars" != x; then
32745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32746    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32747  fi
32748
32749
32750  windows_path="$new_path"
32751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32752    unix_path=`$CYGPATH -u "$windows_path"`
32753    new_path="$unix_path"
32754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32756    new_path="$unix_path"
32757  fi
32758
32759  if test "x$path" != "x$new_path"; then
32760    ipath="$new_path"
32761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32762$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32763  fi
32764
32765  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32766  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32767
32768    else
32769      # We're on a unix platform. Hooray! :)
32770      path="$ipath"
32771      has_space=`$ECHO "$path" | $GREP " "`
32772      if test "x$has_space" != x; then
32773        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32774$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32775        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32776      fi
32777
32778      # Use eval to expand a potential ~
32779      eval path="$path"
32780      if test ! -f "$path" && test ! -d "$path"; then
32781        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32782      fi
32783
32784      if test -d "$path"; then
32785        ipath="`cd "$path"; $THEPWDCMD -L`"
32786      else
32787        dir="`$DIRNAME "$path"`"
32788        base="`$BASENAME "$path"`"
32789        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32790      fi
32791    fi
32792  fi
32793
32794            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32795          fi
32796          IFS=";"
32797        fi
32798      done
32799      # Convert VS_LIB into SYSROOT_LDFLAGS
32800      for i in $VS_LIB; do
32801        libpath=$i
32802        # Only process non-empty elements
32803        if test "x$libpath" != x; then
32804          IFS="$OLDIFS"
32805          # Check that directory exists before calling fixup_path
32806          testpath=$libpath
32807
32808  windows_path="$testpath"
32809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32810    unix_path=`$CYGPATH -u "$windows_path"`
32811    testpath="$unix_path"
32812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32814    testpath="$unix_path"
32815  fi
32816
32817          if test -d "$testpath"; then
32818
32819  # Only process if variable expands to non-empty
32820
32821  if test "x$libpath" != x; then
32822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32823
32824  # Input might be given as Windows format, start by converting to
32825  # unix format.
32826  path="$libpath"
32827  new_path=`$CYGPATH -u "$path"`
32828
32829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32832  # "foo.exe" is OK but "foo" is an error.
32833  #
32834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32835  # It is also a way to make sure we got the proper file name for the real test later on.
32836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32837  if test "x$test_shortpath" = x; then
32838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32839$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32840    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32841  fi
32842
32843  # Call helper function which possibly converts this using DOS-style short mode.
32844  # If so, the updated path is stored in $new_path.
32845
32846  input_path="$new_path"
32847  # Check if we need to convert this using DOS-style short mode. If the path
32848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32849  # take no chances and rewrite it.
32850  # Note: m4 eats our [], so we need to use [ and ] instead.
32851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32852  if test "x$has_forbidden_chars" != x; then
32853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32857      # Going to short mode and back again did indeed matter. Since short mode is
32858      # case insensitive, let's make it lowercase to improve readability.
32859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32860      # Now convert it back to Unix-style (cygpath)
32861      input_path=`$CYGPATH -u "$shortmode_path"`
32862      new_path="$input_path"
32863    fi
32864  fi
32865
32866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32867  if test "x$test_cygdrive_prefix" = x; then
32868    # As a simple fix, exclude /usr/bin since it's not a real path.
32869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32871      # a path prefixed by /cygdrive for fixpath to work.
32872      new_path="$CYGWIN_ROOT_PATH$input_path"
32873    fi
32874  fi
32875
32876
32877  if test "x$path" != "x$new_path"; then
32878    libpath="$new_path"
32879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32880$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32881  fi
32882
32883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32884
32885  path="$libpath"
32886  has_colon=`$ECHO $path | $GREP ^.:`
32887  new_path="$path"
32888  if test "x$has_colon" = x; then
32889    # Not in mixed or Windows style, start by that.
32890    new_path=`cmd //c echo $path`
32891  fi
32892
32893
32894  input_path="$new_path"
32895  # Check if we need to convert this using DOS-style short mode. If the path
32896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32897  # take no chances and rewrite it.
32898  # Note: m4 eats our [], so we need to use [ and ] instead.
32899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32900  if test "x$has_forbidden_chars" != x; then
32901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32903  fi
32904
32905
32906  windows_path="$new_path"
32907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32908    unix_path=`$CYGPATH -u "$windows_path"`
32909    new_path="$unix_path"
32910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32912    new_path="$unix_path"
32913  fi
32914
32915  if test "x$path" != "x$new_path"; then
32916    libpath="$new_path"
32917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32918$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32919  fi
32920
32921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32923
32924    else
32925      # We're on a unix platform. Hooray! :)
32926      path="$libpath"
32927      has_space=`$ECHO "$path" | $GREP " "`
32928      if test "x$has_space" != x; then
32929        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32930$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32931        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32932      fi
32933
32934      # Use eval to expand a potential ~
32935      eval path="$path"
32936      if test ! -f "$path" && test ! -d "$path"; then
32937        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32938      fi
32939
32940      if test -d "$path"; then
32941        libpath="`cd "$path"; $THEPWDCMD -L`"
32942      else
32943        dir="`$DIRNAME "$path"`"
32944        base="`$BASENAME "$path"`"
32945        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32946      fi
32947    fi
32948  fi
32949
32950            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32951          fi
32952          IFS=";"
32953        fi
32954      done
32955      IFS="$OLDIFS"
32956    fi
32957  else
32958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32959$as_echo "not found" >&6; }
32960
32961    if test "x$VS_ENV_CMD" = x; then
32962      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32963$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32964      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32965$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32966    else
32967      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32968$as_echo "$as_me: Running the extraction script failed." >&6;}
32969    fi
32970    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32971$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32972    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32973$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32974    as_fn_error $? "Cannot continue" "$LINENO" 5
32975  fi
32976
32977    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32978    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32979    PATH="$VS_PATH"
32980    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32981    export INCLUDE="$VS_INCLUDE"
32982    export LIB="$VS_LIB"
32983  else
32984    if test "x$XCODE_VERSION_OUTPUT" != x; then
32985      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32986      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32987      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32988    else
32989      # Currently we do not define this for other toolchains. This might change as the need arise.
32990      TOOLCHAIN_VERSION=
32991    fi
32992  fi
32993
32994
32995  # For solaris we really need solaris tools, and not the GNU equivalent.
32996  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32997  # so add that to path before starting to probe.
32998  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32999  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
33000    PATH="/usr/ccs/bin:$PATH"
33001  fi
33002
33003  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33004  # override all other locations.
33005  if test "x$TOOLCHAIN_PATH" != x; then
33006    PATH=$TOOLCHAIN_PATH:$PATH
33007  fi
33008
33009
33010  #
33011  # Setup the compilers (CC and CXX)
33012  #
33013
33014  COMPILER_NAME=C
33015  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33016
33017  if test "x$CC" != x; then
33018    # User has supplied compiler name already, always let that override.
33019    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33020$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33021    if test "x`basename $CC`" = "x$CC"; then
33022      # A command without a complete path is provided, search $PATH.
33023
33024      for ac_prog in $CC
33025do
33026  # Extract the first word of "$ac_prog", so it can be a program name with args.
33027set dummy $ac_prog; ac_word=$2
33028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33029$as_echo_n "checking for $ac_word... " >&6; }
33030if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33031  $as_echo_n "(cached) " >&6
33032else
33033  case $POTENTIAL_CC in
33034  [\\/]* | ?:[\\/]*)
33035  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33036  ;;
33037  *)
33038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33039for as_dir in $PATH
33040do
33041  IFS=$as_save_IFS
33042  test -z "$as_dir" && as_dir=.
33043    for ac_exec_ext in '' $ac_executable_extensions; do
33044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33045    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33047    break 2
33048  fi
33049done
33050  done
33051IFS=$as_save_IFS
33052
33053  ;;
33054esac
33055fi
33056POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33057if test -n "$POTENTIAL_CC"; then
33058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33059$as_echo "$POTENTIAL_CC" >&6; }
33060else
33061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33062$as_echo "no" >&6; }
33063fi
33064
33065
33066  test -n "$POTENTIAL_CC" && break
33067done
33068
33069      if test "x$POTENTIAL_CC" != x; then
33070        CC=$POTENTIAL_CC
33071      else
33072        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33073      fi
33074    else
33075      # Otherwise it might already be a complete path
33076      if test ! -x "$CC"; then
33077        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33078      fi
33079    fi
33080  else
33081    # No user supplied value. Locate compiler ourselves.
33082
33083    # If we are cross compiling, assume cross compilation tools follows the
33084    # cross compilation standard where they are prefixed with the autoconf
33085    # standard name for the target. For example the binary
33086    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33087    # If we are not cross compiling, then the default compiler name will be
33088    # used.
33089
33090    CC=
33091    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33092    # before checking the rest of the PATH.
33093    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33094    # step, this should not be necessary.
33095    if test -n "$TOOLCHAIN_PATH"; then
33096      PATH_save="$PATH"
33097      PATH="$TOOLCHAIN_PATH"
33098      for ac_prog in $SEARCH_LIST
33099do
33100  # Extract the first word of "$ac_prog", so it can be a program name with args.
33101set dummy $ac_prog; ac_word=$2
33102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33103$as_echo_n "checking for $ac_word... " >&6; }
33104if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33105  $as_echo_n "(cached) " >&6
33106else
33107  case $TOOLCHAIN_PATH_CC in
33108  [\\/]* | ?:[\\/]*)
33109  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33110  ;;
33111  *)
33112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33113for as_dir in $PATH
33114do
33115  IFS=$as_save_IFS
33116  test -z "$as_dir" && as_dir=.
33117    for ac_exec_ext in '' $ac_executable_extensions; do
33118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33119    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33121    break 2
33122  fi
33123done
33124  done
33125IFS=$as_save_IFS
33126
33127  ;;
33128esac
33129fi
33130TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33131if test -n "$TOOLCHAIN_PATH_CC"; then
33132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33133$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33134else
33135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33136$as_echo "no" >&6; }
33137fi
33138
33139
33140  test -n "$TOOLCHAIN_PATH_CC" && break
33141done
33142
33143      CC=$TOOLCHAIN_PATH_CC
33144      PATH="$PATH_save"
33145    fi
33146
33147    # AC_PATH_PROGS can't be run multiple times with the same variable,
33148    # so create a new name for this run.
33149    if test "x$CC" = x; then
33150      for ac_prog in $SEARCH_LIST
33151do
33152  # Extract the first word of "$ac_prog", so it can be a program name with args.
33153set dummy $ac_prog; ac_word=$2
33154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33155$as_echo_n "checking for $ac_word... " >&6; }
33156if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33157  $as_echo_n "(cached) " >&6
33158else
33159  case $POTENTIAL_CC in
33160  [\\/]* | ?:[\\/]*)
33161  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33162  ;;
33163  *)
33164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33165for as_dir in $PATH
33166do
33167  IFS=$as_save_IFS
33168  test -z "$as_dir" && as_dir=.
33169    for ac_exec_ext in '' $ac_executable_extensions; do
33170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33171    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33173    break 2
33174  fi
33175done
33176  done
33177IFS=$as_save_IFS
33178
33179  ;;
33180esac
33181fi
33182POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33183if test -n "$POTENTIAL_CC"; then
33184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33185$as_echo "$POTENTIAL_CC" >&6; }
33186else
33187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33188$as_echo "no" >&6; }
33189fi
33190
33191
33192  test -n "$POTENTIAL_CC" && break
33193done
33194
33195      CC=$POTENTIAL_CC
33196    fi
33197
33198    if test "x$CC" = x; then
33199
33200  # Print a helpful message on how to acquire the necessary build dependency.
33201  # devkit is the help tag: freetype, cups, alsa etc
33202  MISSING_DEPENDENCY=devkit
33203
33204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33205    cygwin_help $MISSING_DEPENDENCY
33206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33207    msys_help $MISSING_DEPENDENCY
33208  else
33209    PKGHANDLER_COMMAND=
33210
33211    case $PKGHANDLER in
33212      apt-get)
33213        apt_help     $MISSING_DEPENDENCY ;;
33214      yum)
33215        yum_help     $MISSING_DEPENDENCY ;;
33216      port)
33217        port_help    $MISSING_DEPENDENCY ;;
33218      pkgutil)
33219        pkgutil_help $MISSING_DEPENDENCY ;;
33220      pkgadd)
33221        pkgadd_help  $MISSING_DEPENDENCY ;;
33222    esac
33223
33224    if test "x$PKGHANDLER_COMMAND" != x; then
33225      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33226    fi
33227  fi
33228
33229      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33230    fi
33231  fi
33232
33233  # Now we have a compiler binary in CC. Make sure it's okay.
33234
33235  # Only process if variable expands to non-empty
33236
33237  if test "x$CC" != x; then
33238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33239
33240  # First separate the path from the arguments. This will split at the first
33241  # space.
33242  complete="$CC"
33243  path="${complete%% *}"
33244  tmp="$complete EOL"
33245  arguments="${tmp#* }"
33246
33247  # Input might be given as Windows format, start by converting to
33248  # unix format.
33249  new_path=`$CYGPATH -u "$path"`
33250
33251  # Now try to locate executable using which
33252  new_path=`$WHICH "$new_path" 2> /dev/null`
33253  # bat and cmd files are not always considered executable in cygwin causing which
33254  # to not find them
33255  if test "x$new_path" = x \
33256      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33257      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33258    new_path=`$CYGPATH -u "$path"`
33259  fi
33260  if test "x$new_path" = x; then
33261    # Oops. Which didn't find the executable.
33262    # The splitting of arguments from the executable at a space might have been incorrect,
33263    # since paths with space are more likely in Windows. Give it another try with the whole
33264    # argument.
33265    path="$complete"
33266    arguments="EOL"
33267    new_path=`$CYGPATH -u "$path"`
33268    new_path=`$WHICH "$new_path" 2> /dev/null`
33269    # bat and cmd files are not always considered executable in cygwin causing which
33270    # to not find them
33271    if test "x$new_path" = x \
33272        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33273        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33274      new_path=`$CYGPATH -u "$path"`
33275    fi
33276    if test "x$new_path" = x; then
33277      # It's still not found. Now this is an unrecoverable error.
33278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33279$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33280      has_space=`$ECHO "$complete" | $GREP " "`
33281      if test "x$has_space" != x; then
33282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33284      fi
33285      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33286    fi
33287  fi
33288
33289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33292  # "foo.exe" is OK but "foo" is an error.
33293  #
33294  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33295  # It is also a way to make sure we got the proper file name for the real test later on.
33296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33297  if test "x$test_shortpath" = x; then
33298    # Short path failed, file does not exist as specified.
33299    # Try adding .exe or .cmd
33300    if test -f "${new_path}.exe"; then
33301      input_to_shortpath="${new_path}.exe"
33302    elif test -f "${new_path}.cmd"; then
33303      input_to_shortpath="${new_path}.cmd"
33304    else
33305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33306$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33307      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33308$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33309      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33310    fi
33311  else
33312    input_to_shortpath="$new_path"
33313  fi
33314
33315  # Call helper function which possibly converts this using DOS-style short mode.
33316  # If so, the updated path is stored in $new_path.
33317  new_path="$input_to_shortpath"
33318
33319  input_path="$input_to_shortpath"
33320  # Check if we need to convert this using DOS-style short mode. If the path
33321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33322  # take no chances and rewrite it.
33323  # Note: m4 eats our [], so we need to use [ and ] instead.
33324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33325  if test "x$has_forbidden_chars" != x; then
33326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33330      # Going to short mode and back again did indeed matter. Since short mode is
33331      # case insensitive, let's make it lowercase to improve readability.
33332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33333      # Now convert it back to Unix-style (cygpath)
33334      input_path=`$CYGPATH -u "$shortmode_path"`
33335      new_path="$input_path"
33336    fi
33337  fi
33338
33339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33340  if test "x$test_cygdrive_prefix" = x; then
33341    # As a simple fix, exclude /usr/bin since it's not a real path.
33342    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33344      # a path prefixed by /cygdrive for fixpath to work.
33345      new_path="$CYGWIN_ROOT_PATH$input_path"
33346    fi
33347  fi
33348
33349  # remove trailing .exe if any
33350  new_path="${new_path/%.exe/}"
33351
33352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33353
33354  # First separate the path from the arguments. This will split at the first
33355  # space.
33356  complete="$CC"
33357  path="${complete%% *}"
33358  tmp="$complete EOL"
33359  arguments="${tmp#* }"
33360
33361  # Input might be given as Windows format, start by converting to
33362  # unix format.
33363  new_path="$path"
33364
33365  windows_path="$new_path"
33366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33367    unix_path=`$CYGPATH -u "$windows_path"`
33368    new_path="$unix_path"
33369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33371    new_path="$unix_path"
33372  fi
33373
33374
33375  # Now try to locate executable using which
33376  new_path=`$WHICH "$new_path" 2> /dev/null`
33377
33378  if test "x$new_path" = x; then
33379    # Oops. Which didn't find the executable.
33380    # The splitting of arguments from the executable at a space might have been incorrect,
33381    # since paths with space are more likely in Windows. Give it another try with the whole
33382    # argument.
33383    path="$complete"
33384    arguments="EOL"
33385    new_path="$path"
33386
33387  windows_path="$new_path"
33388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33389    unix_path=`$CYGPATH -u "$windows_path"`
33390    new_path="$unix_path"
33391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33393    new_path="$unix_path"
33394  fi
33395
33396
33397    new_path=`$WHICH "$new_path" 2> /dev/null`
33398    # bat and cmd files are not always considered executable in MSYS causing which
33399    # to not find them
33400    if test "x$new_path" = x \
33401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33403      new_path="$path"
33404
33405  windows_path="$new_path"
33406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33407    unix_path=`$CYGPATH -u "$windows_path"`
33408    new_path="$unix_path"
33409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33411    new_path="$unix_path"
33412  fi
33413
33414    fi
33415
33416    if test "x$new_path" = x; then
33417      # It's still not found. Now this is an unrecoverable error.
33418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33419$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33420      has_space=`$ECHO "$complete" | $GREP " "`
33421      if test "x$has_space" != x; then
33422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33424      fi
33425      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33426    fi
33427  fi
33428
33429  # Now new_path has a complete unix path to the binary
33430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33431    # Keep paths in /bin as-is, but remove trailing .exe if any
33432    new_path="${new_path/%.exe/}"
33433    # Do not save /bin paths to all_fixpath_prefixes!
33434  else
33435    # Not in mixed or Windows style, start by that.
33436    new_path=`cmd //c echo $new_path`
33437
33438  input_path="$new_path"
33439  # Check if we need to convert this using DOS-style short mode. If the path
33440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33441  # take no chances and rewrite it.
33442  # Note: m4 eats our [], so we need to use [ and ] instead.
33443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33444  if test "x$has_forbidden_chars" != x; then
33445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33447  fi
33448
33449    # Output is in $new_path
33450
33451  windows_path="$new_path"
33452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33453    unix_path=`$CYGPATH -u "$windows_path"`
33454    new_path="$unix_path"
33455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33457    new_path="$unix_path"
33458  fi
33459
33460    # remove trailing .exe if any
33461    new_path="${new_path/%.exe/}"
33462
33463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33465  fi
33466
33467    else
33468      # We're on a unix platform. Hooray! :)
33469      # First separate the path from the arguments. This will split at the first
33470      # space.
33471      complete="$CC"
33472      path="${complete%% *}"
33473      tmp="$complete EOL"
33474      arguments="${tmp#* }"
33475
33476      # Cannot rely on the command "which" here since it doesn't always work.
33477      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33478      if test -z "$is_absolute_path"; then
33479        # Path to executable is not absolute. Find it.
33480        IFS_save="$IFS"
33481        IFS=:
33482        for p in $PATH; do
33483          if test -f "$p/$path" && test -x "$p/$path"; then
33484            new_path="$p/$path"
33485            break
33486          fi
33487        done
33488        IFS="$IFS_save"
33489      else
33490        # This is an absolute path, we can use it without further modifications.
33491        new_path="$path"
33492      fi
33493
33494      if test "x$new_path" = x; then
33495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33496$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33497        has_space=`$ECHO "$complete" | $GREP " "`
33498        if test "x$has_space" != x; then
33499          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33500$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33501        fi
33502        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33503      fi
33504    fi
33505
33506    # Now join together the path and the arguments once again
33507    if test "x$arguments" != xEOL; then
33508      new_complete="$new_path ${arguments% *}"
33509    else
33510      new_complete="$new_path"
33511    fi
33512
33513    if test "x$complete" != "x$new_complete"; then
33514      CC="$new_complete"
33515      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33516$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33517    fi
33518  fi
33519
33520  TEST_COMPILER="$CC"
33521
33522  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33523$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33524  SYMLINK_ORIGINAL="$TEST_COMPILER"
33525
33526  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33527    # Follow a chain of symbolic links. Use readlink
33528    # where it exists, else fall back to horribly
33529    # complicated shell code.
33530    if test "x$READLINK_TESTED" != yes; then
33531      # On MacOSX there is a readlink tool with a different
33532      # purpose than the GNU readlink tool. Check the found readlink.
33533      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33534      if test "x$ISGNU" = x; then
33535        # A readlink that we do not know how to use.
33536        # Are there other non-GNU readlinks out there?
33537        READLINK_TESTED=yes
33538        READLINK=
33539      fi
33540    fi
33541
33542    if test "x$READLINK" != x; then
33543      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33544    else
33545      # Save the current directory for restoring afterwards
33546      STARTDIR=$PWD
33547      COUNTER=0
33548      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33549      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33550      cd $sym_link_dir
33551      # Use -P flag to resolve symlinks in directories.
33552      cd `$THEPWDCMD -P`
33553      sym_link_dir=`$THEPWDCMD -P`
33554      # Resolve file symlinks
33555      while test $COUNTER -lt 20; do
33556        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33557        if test "x$ISLINK" == x; then
33558          # This is not a symbolic link! We are done!
33559          break
33560        fi
33561        # Again resolve directory symlinks since the target of the just found
33562        # link could be in a different directory
33563        cd `$DIRNAME $ISLINK`
33564        sym_link_dir=`$THEPWDCMD -P`
33565        sym_link_file=`$BASENAME $ISLINK`
33566        let COUNTER=COUNTER+1
33567      done
33568      cd $STARTDIR
33569      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33570    fi
33571  fi
33572
33573  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33574    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33575$as_echo "no symlink" >&6; }
33576  else
33577    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33578$as_echo "$SYMLINK_ORIGINAL" >&6; }
33579
33580    # We can't handle ccache by gcc wrappers, since we need to know if we're
33581    # using ccache. Instead ccache usage must be controlled by a configure option.
33582    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33583    if test "x$COMPILER_BASENAME" = "xccache"; then
33584      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33585$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33586      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33587    fi
33588  fi
33589
33590
33591  COMPILER=$CC
33592  COMPILER_NAME=$COMPILER_NAME
33593
33594  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33595    # cc -V output typically looks like
33596    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33597    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33598    # Check that this is likely to be the Solaris Studio cc.
33599    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33600    if test $? -ne 0; then
33601      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33602      { $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
33603$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33604      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33605$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33606      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33607$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33608      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33609    fi
33610    # Remove usage instructions (if present), and
33611    # collapse compiler output into a single line
33612    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33613        $SED -e 's/ *[Uu]sage:.*//'`
33614    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33615        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33616  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33617    # xlc -qversion output typically looks like
33618    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33619    #     Version: 11.01.0000.0015
33620    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33621    # Check that this is likely to be the IBM XL C compiler.
33622    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33623    if test $? -ne 0; then
33624      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33625      { $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
33626$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33627      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33628$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33629      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33630$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33631      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33632    fi
33633    # Collapse compiler output into a single line
33634    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33635    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33636        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33637  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33638    # There is no specific version flag, but all output starts with a version string.
33639    # First line typically looks something like:
33640    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33641    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33642    # Check that this is likely to be Microsoft CL.EXE.
33643    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33644    if test $? -ne 0; then
33645      { $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
33646$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33647      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33648$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33649      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33650    fi
33651    # Collapse compiler output into a single line
33652    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33653    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33654        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33655  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33656    # gcc --version output typically looks like
33657    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33658    #     Copyright (C) 2013 Free Software Foundation, Inc.
33659    #     This is free software; see the source for copying conditions.  There is NO
33660    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33661    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33662    # Check that this is likely to be GCC.
33663    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33664    if test $? -ne 0; then
33665      { $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
33666$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33667      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33668$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33669      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33670    fi
33671    # Remove Copyright and legalese from version string, and
33672    # collapse into a single line
33673    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33674        $SED -e 's/ *Copyright .*//'`
33675    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33676        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33677  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33678    # clang --version output typically looks like
33679    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33680    #    clang version 3.3 (tags/RELEASE_33/final)
33681    # or
33682    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33683    #    Target: x86_64-pc-linux-gnu
33684    #    Thread model: posix
33685    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33686    # Check that this is likely to be clang
33687    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33688    if test $? -ne 0; then
33689      { $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
33690$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33691      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33692$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33693      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33694    fi
33695    # Collapse compiler output into a single line
33696    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33697    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33698        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33699  else
33700      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33701  fi
33702  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33703  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33704  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33705  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33706
33707  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33708$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33709
33710
33711  # Now that we have resolved CC ourself, let autoconf have its go at it
33712  ac_ext=c
33713ac_cpp='$CPP $CPPFLAGS'
33714ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33715ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33716ac_compiler_gnu=$ac_cv_c_compiler_gnu
33717if test -n "$ac_tool_prefix"; then
33718  for ac_prog in $CC
33719  do
33720    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33721set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33723$as_echo_n "checking for $ac_word... " >&6; }
33724if ${ac_cv_prog_CC+:} false; then :
33725  $as_echo_n "(cached) " >&6
33726else
33727  if test -n "$CC"; then
33728  ac_cv_prog_CC="$CC" # Let the user override the test.
33729else
33730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33731for as_dir in $PATH
33732do
33733  IFS=$as_save_IFS
33734  test -z "$as_dir" && as_dir=.
33735    for ac_exec_ext in '' $ac_executable_extensions; do
33736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33737    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33739    break 2
33740  fi
33741done
33742  done
33743IFS=$as_save_IFS
33744
33745fi
33746fi
33747CC=$ac_cv_prog_CC
33748if test -n "$CC"; then
33749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33750$as_echo "$CC" >&6; }
33751else
33752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33753$as_echo "no" >&6; }
33754fi
33755
33756
33757    test -n "$CC" && break
33758  done
33759fi
33760if test -z "$CC"; then
33761  ac_ct_CC=$CC
33762  for ac_prog in $CC
33763do
33764  # Extract the first word of "$ac_prog", so it can be a program name with args.
33765set dummy $ac_prog; ac_word=$2
33766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33767$as_echo_n "checking for $ac_word... " >&6; }
33768if ${ac_cv_prog_ac_ct_CC+:} false; then :
33769  $as_echo_n "(cached) " >&6
33770else
33771  if test -n "$ac_ct_CC"; then
33772  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33773else
33774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33775for as_dir in $PATH
33776do
33777  IFS=$as_save_IFS
33778  test -z "$as_dir" && as_dir=.
33779    for ac_exec_ext in '' $ac_executable_extensions; do
33780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33781    ac_cv_prog_ac_ct_CC="$ac_prog"
33782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33783    break 2
33784  fi
33785done
33786  done
33787IFS=$as_save_IFS
33788
33789fi
33790fi
33791ac_ct_CC=$ac_cv_prog_ac_ct_CC
33792if test -n "$ac_ct_CC"; then
33793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33794$as_echo "$ac_ct_CC" >&6; }
33795else
33796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33797$as_echo "no" >&6; }
33798fi
33799
33800
33801  test -n "$ac_ct_CC" && break
33802done
33803
33804  if test "x$ac_ct_CC" = x; then
33805    CC=""
33806  else
33807    case $cross_compiling:$ac_tool_warned in
33808yes:)
33809{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33810$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33811ac_tool_warned=yes ;;
33812esac
33813    CC=$ac_ct_CC
33814  fi
33815fi
33816
33817
33818test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33819$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33820as_fn_error $? "no acceptable C compiler found in \$PATH
33821See \`config.log' for more details" "$LINENO" 5; }
33822
33823# Provide some information about the compiler.
33824$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33825set X $ac_compile
33826ac_compiler=$2
33827for ac_option in --version -v -V -qversion; do
33828  { { ac_try="$ac_compiler $ac_option >&5"
33829case "(($ac_try" in
33830  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33831  *) ac_try_echo=$ac_try;;
33832esac
33833eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33834$as_echo "$ac_try_echo"; } >&5
33835  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33836  ac_status=$?
33837  if test -s conftest.err; then
33838    sed '10a\
33839... rest of stderr output deleted ...
33840         10q' conftest.err >conftest.er1
33841    cat conftest.er1 >&5
33842  fi
33843  rm -f conftest.er1 conftest.err
33844  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33845  test $ac_status = 0; }
33846done
33847
33848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33849/* end confdefs.h.  */
33850
33851int
33852main ()
33853{
33854
33855  ;
33856  return 0;
33857}
33858_ACEOF
33859ac_clean_files_save=$ac_clean_files
33860ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33861# Try to create an executable without -o first, disregard a.out.
33862# It will help us diagnose broken compilers, and finding out an intuition
33863# of exeext.
33864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33865$as_echo_n "checking whether the C compiler works... " >&6; }
33866ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33867
33868# The possible output files:
33869ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33870
33871ac_rmfiles=
33872for ac_file in $ac_files
33873do
33874  case $ac_file in
33875    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33876    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33877  esac
33878done
33879rm -f $ac_rmfiles
33880
33881if { { ac_try="$ac_link_default"
33882case "(($ac_try" in
33883  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33884  *) ac_try_echo=$ac_try;;
33885esac
33886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33887$as_echo "$ac_try_echo"; } >&5
33888  (eval "$ac_link_default") 2>&5
33889  ac_status=$?
33890  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33891  test $ac_status = 0; }; then :
33892  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33893# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33894# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33895# so that the user can short-circuit this test for compilers unknown to
33896# Autoconf.
33897for ac_file in $ac_files ''
33898do
33899  test -f "$ac_file" || continue
33900  case $ac_file in
33901    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33902	;;
33903    [ab].out )
33904	# We found the default executable, but exeext='' is most
33905	# certainly right.
33906	break;;
33907    *.* )
33908	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33909	then :; else
33910	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33911	fi
33912	# We set ac_cv_exeext here because the later test for it is not
33913	# safe: cross compilers may not add the suffix if given an `-o'
33914	# argument, so we may need to know it at that point already.
33915	# Even if this section looks crufty: it has the advantage of
33916	# actually working.
33917	break;;
33918    * )
33919	break;;
33920  esac
33921done
33922test "$ac_cv_exeext" = no && ac_cv_exeext=
33923
33924else
33925  ac_file=''
33926fi
33927if test -z "$ac_file"; then :
33928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33929$as_echo "no" >&6; }
33930$as_echo "$as_me: failed program was:" >&5
33931sed 's/^/| /' conftest.$ac_ext >&5
33932
33933{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33935as_fn_error 77 "C compiler cannot create executables
33936See \`config.log' for more details" "$LINENO" 5; }
33937else
33938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33939$as_echo "yes" >&6; }
33940fi
33941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33942$as_echo_n "checking for C compiler default output file name... " >&6; }
33943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33944$as_echo "$ac_file" >&6; }
33945ac_exeext=$ac_cv_exeext
33946
33947rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33948ac_clean_files=$ac_clean_files_save
33949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33950$as_echo_n "checking for suffix of executables... " >&6; }
33951if { { ac_try="$ac_link"
33952case "(($ac_try" in
33953  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33954  *) ac_try_echo=$ac_try;;
33955esac
33956eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33957$as_echo "$ac_try_echo"; } >&5
33958  (eval "$ac_link") 2>&5
33959  ac_status=$?
33960  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33961  test $ac_status = 0; }; then :
33962  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33963# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33964# work properly (i.e., refer to `conftest.exe'), while it won't with
33965# `rm'.
33966for ac_file in conftest.exe conftest conftest.*; do
33967  test -f "$ac_file" || continue
33968  case $ac_file in
33969    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33970    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33971	  break;;
33972    * ) break;;
33973  esac
33974done
33975else
33976  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33978as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33979See \`config.log' for more details" "$LINENO" 5; }
33980fi
33981rm -f conftest conftest$ac_cv_exeext
33982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33983$as_echo "$ac_cv_exeext" >&6; }
33984
33985rm -f conftest.$ac_ext
33986EXEEXT=$ac_cv_exeext
33987ac_exeext=$EXEEXT
33988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33989/* end confdefs.h.  */
33990#include <stdio.h>
33991int
33992main ()
33993{
33994FILE *f = fopen ("conftest.out", "w");
33995 return ferror (f) || fclose (f) != 0;
33996
33997  ;
33998  return 0;
33999}
34000_ACEOF
34001ac_clean_files="$ac_clean_files conftest.out"
34002# Check that the compiler produces executables we can run.  If not, either
34003# the compiler is broken, or we cross compile.
34004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34005$as_echo_n "checking whether we are cross compiling... " >&6; }
34006if test "$cross_compiling" != yes; then
34007  { { ac_try="$ac_link"
34008case "(($ac_try" in
34009  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34010  *) ac_try_echo=$ac_try;;
34011esac
34012eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34013$as_echo "$ac_try_echo"; } >&5
34014  (eval "$ac_link") 2>&5
34015  ac_status=$?
34016  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34017  test $ac_status = 0; }
34018  if { ac_try='./conftest$ac_cv_exeext'
34019  { { case "(($ac_try" in
34020  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34021  *) ac_try_echo=$ac_try;;
34022esac
34023eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34024$as_echo "$ac_try_echo"; } >&5
34025  (eval "$ac_try") 2>&5
34026  ac_status=$?
34027  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34028  test $ac_status = 0; }; }; then
34029    cross_compiling=no
34030  else
34031    if test "$cross_compiling" = maybe; then
34032	cross_compiling=yes
34033    else
34034	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34035$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34036as_fn_error $? "cannot run C compiled programs.
34037If you meant to cross compile, use \`--host'.
34038See \`config.log' for more details" "$LINENO" 5; }
34039    fi
34040  fi
34041fi
34042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34043$as_echo "$cross_compiling" >&6; }
34044
34045rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34046ac_clean_files=$ac_clean_files_save
34047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34048$as_echo_n "checking for suffix of object files... " >&6; }
34049if ${ac_cv_objext+:} false; then :
34050  $as_echo_n "(cached) " >&6
34051else
34052  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34053/* end confdefs.h.  */
34054
34055int
34056main ()
34057{
34058
34059  ;
34060  return 0;
34061}
34062_ACEOF
34063rm -f conftest.o conftest.obj
34064if { { ac_try="$ac_compile"
34065case "(($ac_try" in
34066  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34067  *) ac_try_echo=$ac_try;;
34068esac
34069eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34070$as_echo "$ac_try_echo"; } >&5
34071  (eval "$ac_compile") 2>&5
34072  ac_status=$?
34073  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34074  test $ac_status = 0; }; then :
34075  for ac_file in conftest.o conftest.obj conftest.*; do
34076  test -f "$ac_file" || continue;
34077  case $ac_file in
34078    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34079    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34080       break;;
34081  esac
34082done
34083else
34084  $as_echo "$as_me: failed program was:" >&5
34085sed 's/^/| /' conftest.$ac_ext >&5
34086
34087{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34089as_fn_error $? "cannot compute suffix of object files: cannot compile
34090See \`config.log' for more details" "$LINENO" 5; }
34091fi
34092rm -f conftest.$ac_cv_objext conftest.$ac_ext
34093fi
34094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34095$as_echo "$ac_cv_objext" >&6; }
34096OBJEXT=$ac_cv_objext
34097ac_objext=$OBJEXT
34098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34099$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34100if ${ac_cv_c_compiler_gnu+:} false; then :
34101  $as_echo_n "(cached) " >&6
34102else
34103  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34104/* end confdefs.h.  */
34105
34106int
34107main ()
34108{
34109#ifndef __GNUC__
34110       choke me
34111#endif
34112
34113  ;
34114  return 0;
34115}
34116_ACEOF
34117if ac_fn_c_try_compile "$LINENO"; then :
34118  ac_compiler_gnu=yes
34119else
34120  ac_compiler_gnu=no
34121fi
34122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34123ac_cv_c_compiler_gnu=$ac_compiler_gnu
34124
34125fi
34126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34127$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34128if test $ac_compiler_gnu = yes; then
34129  GCC=yes
34130else
34131  GCC=
34132fi
34133ac_test_CFLAGS=${CFLAGS+set}
34134ac_save_CFLAGS=$CFLAGS
34135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34136$as_echo_n "checking whether $CC accepts -g... " >&6; }
34137if ${ac_cv_prog_cc_g+:} false; then :
34138  $as_echo_n "(cached) " >&6
34139else
34140  ac_save_c_werror_flag=$ac_c_werror_flag
34141   ac_c_werror_flag=yes
34142   ac_cv_prog_cc_g=no
34143   CFLAGS="-g"
34144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34145/* end confdefs.h.  */
34146
34147int
34148main ()
34149{
34150
34151  ;
34152  return 0;
34153}
34154_ACEOF
34155if ac_fn_c_try_compile "$LINENO"; then :
34156  ac_cv_prog_cc_g=yes
34157else
34158  CFLAGS=""
34159      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34160/* end confdefs.h.  */
34161
34162int
34163main ()
34164{
34165
34166  ;
34167  return 0;
34168}
34169_ACEOF
34170if ac_fn_c_try_compile "$LINENO"; then :
34171
34172else
34173  ac_c_werror_flag=$ac_save_c_werror_flag
34174	 CFLAGS="-g"
34175	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34176/* end confdefs.h.  */
34177
34178int
34179main ()
34180{
34181
34182  ;
34183  return 0;
34184}
34185_ACEOF
34186if ac_fn_c_try_compile "$LINENO"; then :
34187  ac_cv_prog_cc_g=yes
34188fi
34189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34190fi
34191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34192fi
34193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34194   ac_c_werror_flag=$ac_save_c_werror_flag
34195fi
34196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34197$as_echo "$ac_cv_prog_cc_g" >&6; }
34198if test "$ac_test_CFLAGS" = set; then
34199  CFLAGS=$ac_save_CFLAGS
34200elif test $ac_cv_prog_cc_g = yes; then
34201  if test "$GCC" = yes; then
34202    CFLAGS="-g -O2"
34203  else
34204    CFLAGS="-g"
34205  fi
34206else
34207  if test "$GCC" = yes; then
34208    CFLAGS="-O2"
34209  else
34210    CFLAGS=
34211  fi
34212fi
34213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34214$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34215if ${ac_cv_prog_cc_c89+:} false; then :
34216  $as_echo_n "(cached) " >&6
34217else
34218  ac_cv_prog_cc_c89=no
34219ac_save_CC=$CC
34220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34221/* end confdefs.h.  */
34222#include <stdarg.h>
34223#include <stdio.h>
34224struct stat;
34225/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34226struct buf { int x; };
34227FILE * (*rcsopen) (struct buf *, struct stat *, int);
34228static char *e (p, i)
34229     char **p;
34230     int i;
34231{
34232  return p[i];
34233}
34234static char *f (char * (*g) (char **, int), char **p, ...)
34235{
34236  char *s;
34237  va_list v;
34238  va_start (v,p);
34239  s = g (p, va_arg (v,int));
34240  va_end (v);
34241  return s;
34242}
34243
34244/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34245   function prototypes and stuff, but not '\xHH' hex character constants.
34246   These don't provoke an error unfortunately, instead are silently treated
34247   as 'x'.  The following induces an error, until -std is added to get
34248   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34249   array size at least.  It's necessary to write '\x00'==0 to get something
34250   that's true only with -std.  */
34251int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34252
34253/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34254   inside strings and character constants.  */
34255#define FOO(x) 'x'
34256int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34257
34258int test (int i, double x);
34259struct s1 {int (*f) (int a);};
34260struct s2 {int (*f) (double a);};
34261int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34262int argc;
34263char **argv;
34264int
34265main ()
34266{
34267return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34268  ;
34269  return 0;
34270}
34271_ACEOF
34272for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34273	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34274do
34275  CC="$ac_save_CC $ac_arg"
34276  if ac_fn_c_try_compile "$LINENO"; then :
34277  ac_cv_prog_cc_c89=$ac_arg
34278fi
34279rm -f core conftest.err conftest.$ac_objext
34280  test "x$ac_cv_prog_cc_c89" != "xno" && break
34281done
34282rm -f conftest.$ac_ext
34283CC=$ac_save_CC
34284
34285fi
34286# AC_CACHE_VAL
34287case "x$ac_cv_prog_cc_c89" in
34288  x)
34289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34290$as_echo "none needed" >&6; } ;;
34291  xno)
34292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34293$as_echo "unsupported" >&6; } ;;
34294  *)
34295    CC="$CC $ac_cv_prog_cc_c89"
34296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34297$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34298esac
34299if test "x$ac_cv_prog_cc_c89" != xno; then :
34300
34301fi
34302
34303ac_ext=cpp
34304ac_cpp='$CXXCPP $CPPFLAGS'
34305ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34306ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34307ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34308
34309
34310
34311  COMPILER_NAME=C++
34312  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34313
34314  if test "x$CXX" != x; then
34315    # User has supplied compiler name already, always let that override.
34316    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34317$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34318    if test "x`basename $CXX`" = "x$CXX"; then
34319      # A command without a complete path is provided, search $PATH.
34320
34321      for ac_prog in $CXX
34322do
34323  # Extract the first word of "$ac_prog", so it can be a program name with args.
34324set dummy $ac_prog; ac_word=$2
34325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34326$as_echo_n "checking for $ac_word... " >&6; }
34327if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34328  $as_echo_n "(cached) " >&6
34329else
34330  case $POTENTIAL_CXX in
34331  [\\/]* | ?:[\\/]*)
34332  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34333  ;;
34334  *)
34335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34336for as_dir in $PATH
34337do
34338  IFS=$as_save_IFS
34339  test -z "$as_dir" && as_dir=.
34340    for ac_exec_ext in '' $ac_executable_extensions; do
34341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34342    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34344    break 2
34345  fi
34346done
34347  done
34348IFS=$as_save_IFS
34349
34350  ;;
34351esac
34352fi
34353POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34354if test -n "$POTENTIAL_CXX"; then
34355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34356$as_echo "$POTENTIAL_CXX" >&6; }
34357else
34358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34359$as_echo "no" >&6; }
34360fi
34361
34362
34363  test -n "$POTENTIAL_CXX" && break
34364done
34365
34366      if test "x$POTENTIAL_CXX" != x; then
34367        CXX=$POTENTIAL_CXX
34368      else
34369        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34370      fi
34371    else
34372      # Otherwise it might already be a complete path
34373      if test ! -x "$CXX"; then
34374        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34375      fi
34376    fi
34377  else
34378    # No user supplied value. Locate compiler ourselves.
34379
34380    # If we are cross compiling, assume cross compilation tools follows the
34381    # cross compilation standard where they are prefixed with the autoconf
34382    # standard name for the target. For example the binary
34383    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34384    # If we are not cross compiling, then the default compiler name will be
34385    # used.
34386
34387    CXX=
34388    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34389    # before checking the rest of the PATH.
34390    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34391    # step, this should not be necessary.
34392    if test -n "$TOOLCHAIN_PATH"; then
34393      PATH_save="$PATH"
34394      PATH="$TOOLCHAIN_PATH"
34395      for ac_prog in $SEARCH_LIST
34396do
34397  # Extract the first word of "$ac_prog", so it can be a program name with args.
34398set dummy $ac_prog; ac_word=$2
34399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34400$as_echo_n "checking for $ac_word... " >&6; }
34401if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34402  $as_echo_n "(cached) " >&6
34403else
34404  case $TOOLCHAIN_PATH_CXX in
34405  [\\/]* | ?:[\\/]*)
34406  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34407  ;;
34408  *)
34409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34410for as_dir in $PATH
34411do
34412  IFS=$as_save_IFS
34413  test -z "$as_dir" && as_dir=.
34414    for ac_exec_ext in '' $ac_executable_extensions; do
34415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34416    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34418    break 2
34419  fi
34420done
34421  done
34422IFS=$as_save_IFS
34423
34424  ;;
34425esac
34426fi
34427TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34428if test -n "$TOOLCHAIN_PATH_CXX"; then
34429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34430$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34431else
34432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34433$as_echo "no" >&6; }
34434fi
34435
34436
34437  test -n "$TOOLCHAIN_PATH_CXX" && break
34438done
34439
34440      CXX=$TOOLCHAIN_PATH_CXX
34441      PATH="$PATH_save"
34442    fi
34443
34444    # AC_PATH_PROGS can't be run multiple times with the same variable,
34445    # so create a new name for this run.
34446    if test "x$CXX" = x; then
34447      for ac_prog in $SEARCH_LIST
34448do
34449  # Extract the first word of "$ac_prog", so it can be a program name with args.
34450set dummy $ac_prog; ac_word=$2
34451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34452$as_echo_n "checking for $ac_word... " >&6; }
34453if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34454  $as_echo_n "(cached) " >&6
34455else
34456  case $POTENTIAL_CXX in
34457  [\\/]* | ?:[\\/]*)
34458  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34459  ;;
34460  *)
34461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34462for as_dir in $PATH
34463do
34464  IFS=$as_save_IFS
34465  test -z "$as_dir" && as_dir=.
34466    for ac_exec_ext in '' $ac_executable_extensions; do
34467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34468    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34470    break 2
34471  fi
34472done
34473  done
34474IFS=$as_save_IFS
34475
34476  ;;
34477esac
34478fi
34479POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34480if test -n "$POTENTIAL_CXX"; then
34481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34482$as_echo "$POTENTIAL_CXX" >&6; }
34483else
34484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34485$as_echo "no" >&6; }
34486fi
34487
34488
34489  test -n "$POTENTIAL_CXX" && break
34490done
34491
34492      CXX=$POTENTIAL_CXX
34493    fi
34494
34495    if test "x$CXX" = x; then
34496
34497  # Print a helpful message on how to acquire the necessary build dependency.
34498  # devkit is the help tag: freetype, cups, alsa etc
34499  MISSING_DEPENDENCY=devkit
34500
34501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34502    cygwin_help $MISSING_DEPENDENCY
34503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34504    msys_help $MISSING_DEPENDENCY
34505  else
34506    PKGHANDLER_COMMAND=
34507
34508    case $PKGHANDLER in
34509      apt-get)
34510        apt_help     $MISSING_DEPENDENCY ;;
34511      yum)
34512        yum_help     $MISSING_DEPENDENCY ;;
34513      port)
34514        port_help    $MISSING_DEPENDENCY ;;
34515      pkgutil)
34516        pkgutil_help $MISSING_DEPENDENCY ;;
34517      pkgadd)
34518        pkgadd_help  $MISSING_DEPENDENCY ;;
34519    esac
34520
34521    if test "x$PKGHANDLER_COMMAND" != x; then
34522      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34523    fi
34524  fi
34525
34526      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34527    fi
34528  fi
34529
34530  # Now we have a compiler binary in CXX. Make sure it's okay.
34531
34532  # Only process if variable expands to non-empty
34533
34534  if test "x$CXX" != x; then
34535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34536
34537  # First separate the path from the arguments. This will split at the first
34538  # space.
34539  complete="$CXX"
34540  path="${complete%% *}"
34541  tmp="$complete EOL"
34542  arguments="${tmp#* }"
34543
34544  # Input might be given as Windows format, start by converting to
34545  # unix format.
34546  new_path=`$CYGPATH -u "$path"`
34547
34548  # Now try to locate executable using which
34549  new_path=`$WHICH "$new_path" 2> /dev/null`
34550  # bat and cmd files are not always considered executable in cygwin causing which
34551  # to not find them
34552  if test "x$new_path" = x \
34553      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34554      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34555    new_path=`$CYGPATH -u "$path"`
34556  fi
34557  if test "x$new_path" = x; then
34558    # Oops. Which didn't find the executable.
34559    # The splitting of arguments from the executable at a space might have been incorrect,
34560    # since paths with space are more likely in Windows. Give it another try with the whole
34561    # argument.
34562    path="$complete"
34563    arguments="EOL"
34564    new_path=`$CYGPATH -u "$path"`
34565    new_path=`$WHICH "$new_path" 2> /dev/null`
34566    # bat and cmd files are not always considered executable in cygwin causing which
34567    # to not find them
34568    if test "x$new_path" = x \
34569        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34570        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34571      new_path=`$CYGPATH -u "$path"`
34572    fi
34573    if test "x$new_path" = x; then
34574      # It's still not found. Now this is an unrecoverable error.
34575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34576$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34577      has_space=`$ECHO "$complete" | $GREP " "`
34578      if test "x$has_space" != x; then
34579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34581      fi
34582      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34583    fi
34584  fi
34585
34586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34589  # "foo.exe" is OK but "foo" is an error.
34590  #
34591  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34592  # It is also a way to make sure we got the proper file name for the real test later on.
34593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34594  if test "x$test_shortpath" = x; then
34595    # Short path failed, file does not exist as specified.
34596    # Try adding .exe or .cmd
34597    if test -f "${new_path}.exe"; then
34598      input_to_shortpath="${new_path}.exe"
34599    elif test -f "${new_path}.cmd"; then
34600      input_to_shortpath="${new_path}.cmd"
34601    else
34602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34603$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34604      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34605$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34606      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34607    fi
34608  else
34609    input_to_shortpath="$new_path"
34610  fi
34611
34612  # Call helper function which possibly converts this using DOS-style short mode.
34613  # If so, the updated path is stored in $new_path.
34614  new_path="$input_to_shortpath"
34615
34616  input_path="$input_to_shortpath"
34617  # Check if we need to convert this using DOS-style short mode. If the path
34618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34619  # take no chances and rewrite it.
34620  # Note: m4 eats our [], so we need to use [ and ] instead.
34621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34622  if test "x$has_forbidden_chars" != x; then
34623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34627      # Going to short mode and back again did indeed matter. Since short mode is
34628      # case insensitive, let's make it lowercase to improve readability.
34629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34630      # Now convert it back to Unix-style (cygpath)
34631      input_path=`$CYGPATH -u "$shortmode_path"`
34632      new_path="$input_path"
34633    fi
34634  fi
34635
34636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34637  if test "x$test_cygdrive_prefix" = x; then
34638    # As a simple fix, exclude /usr/bin since it's not a real path.
34639    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34641      # a path prefixed by /cygdrive for fixpath to work.
34642      new_path="$CYGWIN_ROOT_PATH$input_path"
34643    fi
34644  fi
34645
34646  # remove trailing .exe if any
34647  new_path="${new_path/%.exe/}"
34648
34649    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34650
34651  # First separate the path from the arguments. This will split at the first
34652  # space.
34653  complete="$CXX"
34654  path="${complete%% *}"
34655  tmp="$complete EOL"
34656  arguments="${tmp#* }"
34657
34658  # Input might be given as Windows format, start by converting to
34659  # unix format.
34660  new_path="$path"
34661
34662  windows_path="$new_path"
34663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34664    unix_path=`$CYGPATH -u "$windows_path"`
34665    new_path="$unix_path"
34666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34668    new_path="$unix_path"
34669  fi
34670
34671
34672  # Now try to locate executable using which
34673  new_path=`$WHICH "$new_path" 2> /dev/null`
34674
34675  if test "x$new_path" = x; then
34676    # Oops. Which didn't find the executable.
34677    # The splitting of arguments from the executable at a space might have been incorrect,
34678    # since paths with space are more likely in Windows. Give it another try with the whole
34679    # argument.
34680    path="$complete"
34681    arguments="EOL"
34682    new_path="$path"
34683
34684  windows_path="$new_path"
34685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34686    unix_path=`$CYGPATH -u "$windows_path"`
34687    new_path="$unix_path"
34688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34690    new_path="$unix_path"
34691  fi
34692
34693
34694    new_path=`$WHICH "$new_path" 2> /dev/null`
34695    # bat and cmd files are not always considered executable in MSYS causing which
34696    # to not find them
34697    if test "x$new_path" = x \
34698        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34699        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34700      new_path="$path"
34701
34702  windows_path="$new_path"
34703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34704    unix_path=`$CYGPATH -u "$windows_path"`
34705    new_path="$unix_path"
34706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34708    new_path="$unix_path"
34709  fi
34710
34711    fi
34712
34713    if test "x$new_path" = x; then
34714      # It's still not found. Now this is an unrecoverable error.
34715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34716$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34717      has_space=`$ECHO "$complete" | $GREP " "`
34718      if test "x$has_space" != x; then
34719        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34720$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34721      fi
34722      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34723    fi
34724  fi
34725
34726  # Now new_path has a complete unix path to the binary
34727  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34728    # Keep paths in /bin as-is, but remove trailing .exe if any
34729    new_path="${new_path/%.exe/}"
34730    # Do not save /bin paths to all_fixpath_prefixes!
34731  else
34732    # Not in mixed or Windows style, start by that.
34733    new_path=`cmd //c echo $new_path`
34734
34735  input_path="$new_path"
34736  # Check if we need to convert this using DOS-style short mode. If the path
34737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34738  # take no chances and rewrite it.
34739  # Note: m4 eats our [], so we need to use [ and ] instead.
34740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34741  if test "x$has_forbidden_chars" != x; then
34742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34744  fi
34745
34746    # Output is in $new_path
34747
34748  windows_path="$new_path"
34749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34750    unix_path=`$CYGPATH -u "$windows_path"`
34751    new_path="$unix_path"
34752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34754    new_path="$unix_path"
34755  fi
34756
34757    # remove trailing .exe if any
34758    new_path="${new_path/%.exe/}"
34759
34760    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34761    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34762  fi
34763
34764    else
34765      # We're on a unix platform. Hooray! :)
34766      # First separate the path from the arguments. This will split at the first
34767      # space.
34768      complete="$CXX"
34769      path="${complete%% *}"
34770      tmp="$complete EOL"
34771      arguments="${tmp#* }"
34772
34773      # Cannot rely on the command "which" here since it doesn't always work.
34774      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34775      if test -z "$is_absolute_path"; then
34776        # Path to executable is not absolute. Find it.
34777        IFS_save="$IFS"
34778        IFS=:
34779        for p in $PATH; do
34780          if test -f "$p/$path" && test -x "$p/$path"; then
34781            new_path="$p/$path"
34782            break
34783          fi
34784        done
34785        IFS="$IFS_save"
34786      else
34787        # This is an absolute path, we can use it without further modifications.
34788        new_path="$path"
34789      fi
34790
34791      if test "x$new_path" = x; then
34792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34793$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34794        has_space=`$ECHO "$complete" | $GREP " "`
34795        if test "x$has_space" != x; then
34796          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34797$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34798        fi
34799        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34800      fi
34801    fi
34802
34803    # Now join together the path and the arguments once again
34804    if test "x$arguments" != xEOL; then
34805      new_complete="$new_path ${arguments% *}"
34806    else
34807      new_complete="$new_path"
34808    fi
34809
34810    if test "x$complete" != "x$new_complete"; then
34811      CXX="$new_complete"
34812      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34813$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34814    fi
34815  fi
34816
34817  TEST_COMPILER="$CXX"
34818
34819  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34820$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34821  SYMLINK_ORIGINAL="$TEST_COMPILER"
34822
34823  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34824    # Follow a chain of symbolic links. Use readlink
34825    # where it exists, else fall back to horribly
34826    # complicated shell code.
34827    if test "x$READLINK_TESTED" != yes; then
34828      # On MacOSX there is a readlink tool with a different
34829      # purpose than the GNU readlink tool. Check the found readlink.
34830      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34831      if test "x$ISGNU" = x; then
34832        # A readlink that we do not know how to use.
34833        # Are there other non-GNU readlinks out there?
34834        READLINK_TESTED=yes
34835        READLINK=
34836      fi
34837    fi
34838
34839    if test "x$READLINK" != x; then
34840      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34841    else
34842      # Save the current directory for restoring afterwards
34843      STARTDIR=$PWD
34844      COUNTER=0
34845      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34846      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34847      cd $sym_link_dir
34848      # Use -P flag to resolve symlinks in directories.
34849      cd `$THEPWDCMD -P`
34850      sym_link_dir=`$THEPWDCMD -P`
34851      # Resolve file symlinks
34852      while test $COUNTER -lt 20; do
34853        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34854        if test "x$ISLINK" == x; then
34855          # This is not a symbolic link! We are done!
34856          break
34857        fi
34858        # Again resolve directory symlinks since the target of the just found
34859        # link could be in a different directory
34860        cd `$DIRNAME $ISLINK`
34861        sym_link_dir=`$THEPWDCMD -P`
34862        sym_link_file=`$BASENAME $ISLINK`
34863        let COUNTER=COUNTER+1
34864      done
34865      cd $STARTDIR
34866      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34867    fi
34868  fi
34869
34870  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34872$as_echo "no symlink" >&6; }
34873  else
34874    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34875$as_echo "$SYMLINK_ORIGINAL" >&6; }
34876
34877    # We can't handle ccache by gcc wrappers, since we need to know if we're
34878    # using ccache. Instead ccache usage must be controlled by a configure option.
34879    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34880    if test "x$COMPILER_BASENAME" = "xccache"; then
34881      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34882$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34883      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34884    fi
34885  fi
34886
34887
34888  COMPILER=$CXX
34889  COMPILER_NAME=$COMPILER_NAME
34890
34891  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34892    # cc -V output typically looks like
34893    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34894    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34895    # Check that this is likely to be the Solaris Studio cc.
34896    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34897    if test $? -ne 0; then
34898      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34899      { $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
34900$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34901      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34902$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34903      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34904$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34905      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34906    fi
34907    # Remove usage instructions (if present), and
34908    # collapse compiler output into a single line
34909    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34910        $SED -e 's/ *[Uu]sage:.*//'`
34911    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34912        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34913  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34914    # xlc -qversion output typically looks like
34915    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34916    #     Version: 11.01.0000.0015
34917    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34918    # Check that this is likely to be the IBM XL C compiler.
34919    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34920    if test $? -ne 0; then
34921      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34922      { $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
34923$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34924      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34925$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34926      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34927$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34928      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34929    fi
34930    # Collapse compiler output into a single line
34931    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34932    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34933        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34934  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34935    # There is no specific version flag, but all output starts with a version string.
34936    # First line typically looks something like:
34937    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34938    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34939    # Check that this is likely to be Microsoft CL.EXE.
34940    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34941    if test $? -ne 0; then
34942      { $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
34943$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34944      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34945$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34946      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34947    fi
34948    # Collapse compiler output into a single line
34949    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34950    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34951        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34952  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34953    # gcc --version output typically looks like
34954    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34955    #     Copyright (C) 2013 Free Software Foundation, Inc.
34956    #     This is free software; see the source for copying conditions.  There is NO
34957    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34958    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34959    # Check that this is likely to be GCC.
34960    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34961    if test $? -ne 0; then
34962      { $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
34963$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34964      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34965$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34966      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34967    fi
34968    # Remove Copyright and legalese from version string, and
34969    # collapse into a single line
34970    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34971        $SED -e 's/ *Copyright .*//'`
34972    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34973        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34974  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34975    # clang --version output typically looks like
34976    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34977    #    clang version 3.3 (tags/RELEASE_33/final)
34978    # or
34979    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34980    #    Target: x86_64-pc-linux-gnu
34981    #    Thread model: posix
34982    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34983    # Check that this is likely to be clang
34984    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34985    if test $? -ne 0; then
34986      { $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
34987$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34988      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34989$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34990      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34991    fi
34992    # Collapse compiler output into a single line
34993    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34994    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34995        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34996  else
34997      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34998  fi
34999  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35000  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35001  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35002  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35003
35004  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35005$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35006
35007
35008  # Now that we have resolved CXX ourself, let autoconf have its go at it
35009  ac_ext=cpp
35010ac_cpp='$CXXCPP $CPPFLAGS'
35011ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35012ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35013ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35014if test -z "$CXX"; then
35015  if test -n "$CCC"; then
35016    CXX=$CCC
35017  else
35018    if test -n "$ac_tool_prefix"; then
35019  for ac_prog in $CXX
35020  do
35021    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35022set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35024$as_echo_n "checking for $ac_word... " >&6; }
35025if ${ac_cv_prog_CXX+:} false; then :
35026  $as_echo_n "(cached) " >&6
35027else
35028  if test -n "$CXX"; then
35029  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35030else
35031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35032for as_dir in $PATH
35033do
35034  IFS=$as_save_IFS
35035  test -z "$as_dir" && as_dir=.
35036    for ac_exec_ext in '' $ac_executable_extensions; do
35037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35038    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35040    break 2
35041  fi
35042done
35043  done
35044IFS=$as_save_IFS
35045
35046fi
35047fi
35048CXX=$ac_cv_prog_CXX
35049if test -n "$CXX"; then
35050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35051$as_echo "$CXX" >&6; }
35052else
35053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35054$as_echo "no" >&6; }
35055fi
35056
35057
35058    test -n "$CXX" && break
35059  done
35060fi
35061if test -z "$CXX"; then
35062  ac_ct_CXX=$CXX
35063  for ac_prog in $CXX
35064do
35065  # Extract the first word of "$ac_prog", so it can be a program name with args.
35066set dummy $ac_prog; ac_word=$2
35067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35068$as_echo_n "checking for $ac_word... " >&6; }
35069if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35070  $as_echo_n "(cached) " >&6
35071else
35072  if test -n "$ac_ct_CXX"; then
35073  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35074else
35075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35076for as_dir in $PATH
35077do
35078  IFS=$as_save_IFS
35079  test -z "$as_dir" && as_dir=.
35080    for ac_exec_ext in '' $ac_executable_extensions; do
35081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35082    ac_cv_prog_ac_ct_CXX="$ac_prog"
35083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35084    break 2
35085  fi
35086done
35087  done
35088IFS=$as_save_IFS
35089
35090fi
35091fi
35092ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35093if test -n "$ac_ct_CXX"; then
35094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35095$as_echo "$ac_ct_CXX" >&6; }
35096else
35097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35098$as_echo "no" >&6; }
35099fi
35100
35101
35102  test -n "$ac_ct_CXX" && break
35103done
35104
35105  if test "x$ac_ct_CXX" = x; then
35106    CXX="g++"
35107  else
35108    case $cross_compiling:$ac_tool_warned in
35109yes:)
35110{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35111$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35112ac_tool_warned=yes ;;
35113esac
35114    CXX=$ac_ct_CXX
35115  fi
35116fi
35117
35118  fi
35119fi
35120# Provide some information about the compiler.
35121$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35122set X $ac_compile
35123ac_compiler=$2
35124for ac_option in --version -v -V -qversion; do
35125  { { ac_try="$ac_compiler $ac_option >&5"
35126case "(($ac_try" in
35127  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35128  *) ac_try_echo=$ac_try;;
35129esac
35130eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35131$as_echo "$ac_try_echo"; } >&5
35132  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35133  ac_status=$?
35134  if test -s conftest.err; then
35135    sed '10a\
35136... rest of stderr output deleted ...
35137         10q' conftest.err >conftest.er1
35138    cat conftest.er1 >&5
35139  fi
35140  rm -f conftest.er1 conftest.err
35141  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35142  test $ac_status = 0; }
35143done
35144
35145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35146$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35147if ${ac_cv_cxx_compiler_gnu+:} false; then :
35148  $as_echo_n "(cached) " >&6
35149else
35150  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35151/* end confdefs.h.  */
35152
35153int
35154main ()
35155{
35156#ifndef __GNUC__
35157       choke me
35158#endif
35159
35160  ;
35161  return 0;
35162}
35163_ACEOF
35164if ac_fn_cxx_try_compile "$LINENO"; then :
35165  ac_compiler_gnu=yes
35166else
35167  ac_compiler_gnu=no
35168fi
35169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35170ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35171
35172fi
35173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35174$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35175if test $ac_compiler_gnu = yes; then
35176  GXX=yes
35177else
35178  GXX=
35179fi
35180ac_test_CXXFLAGS=${CXXFLAGS+set}
35181ac_save_CXXFLAGS=$CXXFLAGS
35182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35183$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35184if ${ac_cv_prog_cxx_g+:} false; then :
35185  $as_echo_n "(cached) " >&6
35186else
35187  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35188   ac_cxx_werror_flag=yes
35189   ac_cv_prog_cxx_g=no
35190   CXXFLAGS="-g"
35191   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35192/* end confdefs.h.  */
35193
35194int
35195main ()
35196{
35197
35198  ;
35199  return 0;
35200}
35201_ACEOF
35202if ac_fn_cxx_try_compile "$LINENO"; then :
35203  ac_cv_prog_cxx_g=yes
35204else
35205  CXXFLAGS=""
35206      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35207/* end confdefs.h.  */
35208
35209int
35210main ()
35211{
35212
35213  ;
35214  return 0;
35215}
35216_ACEOF
35217if ac_fn_cxx_try_compile "$LINENO"; then :
35218
35219else
35220  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35221	 CXXFLAGS="-g"
35222	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35223/* end confdefs.h.  */
35224
35225int
35226main ()
35227{
35228
35229  ;
35230  return 0;
35231}
35232_ACEOF
35233if ac_fn_cxx_try_compile "$LINENO"; then :
35234  ac_cv_prog_cxx_g=yes
35235fi
35236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35237fi
35238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35239fi
35240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35241   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35242fi
35243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35244$as_echo "$ac_cv_prog_cxx_g" >&6; }
35245if test "$ac_test_CXXFLAGS" = set; then
35246  CXXFLAGS=$ac_save_CXXFLAGS
35247elif test $ac_cv_prog_cxx_g = yes; then
35248  if test "$GXX" = yes; then
35249    CXXFLAGS="-g -O2"
35250  else
35251    CXXFLAGS="-g"
35252  fi
35253else
35254  if test "$GXX" = yes; then
35255    CXXFLAGS="-O2"
35256  else
35257    CXXFLAGS=
35258  fi
35259fi
35260ac_ext=cpp
35261ac_cpp='$CXXCPP $CPPFLAGS'
35262ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35263ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35264ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35265
35266
35267  # This is the compiler version number on the form X.Y[.Z]
35268
35269
35270
35271
35272  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35273    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35274$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35275    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35276$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35277  fi
35278
35279  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35280  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35281    { $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
35282$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;}
35283  fi
35284
35285  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35286    { $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
35287$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35288  fi
35289
35290  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35291
35292
35293  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331
35332
35333
35334
35335
35336
35337
35338
35339
35340
35341
35342
35343    # Execute function body
35344
35345  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35346  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35347
35348  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35349    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35350  fi
35351
35352  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35353    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35354  fi
35355
35356  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35357  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35358
35359  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35360    :
35361
35362  else
35363    :
35364
35365          { $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
35366$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35367
35368
35369  fi
35370
35371
35372
35373
35374
35375
35376
35377
35378
35379
35380
35381
35382
35383
35384  fi
35385
35386  #
35387  # Setup the preprocessor (CPP and CXXCPP)
35388  #
35389  ac_ext=c
35390ac_cpp='$CPP $CPPFLAGS'
35391ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35392ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35393ac_compiler_gnu=$ac_cv_c_compiler_gnu
35394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35395$as_echo_n "checking how to run the C preprocessor... " >&6; }
35396# On Suns, sometimes $CPP names a directory.
35397if test -n "$CPP" && test -d "$CPP"; then
35398  CPP=
35399fi
35400if test -z "$CPP"; then
35401  if ${ac_cv_prog_CPP+:} false; then :
35402  $as_echo_n "(cached) " >&6
35403else
35404      # Double quotes because CPP needs to be expanded
35405    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35406    do
35407      ac_preproc_ok=false
35408for ac_c_preproc_warn_flag in '' yes
35409do
35410  # Use a header file that comes with gcc, so configuring glibc
35411  # with a fresh cross-compiler works.
35412  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35413  # <limits.h> exists even on freestanding compilers.
35414  # On the NeXT, cc -E runs the code through the compiler's parser,
35415  # not just through cpp. "Syntax error" is here to catch this case.
35416  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35417/* end confdefs.h.  */
35418#ifdef __STDC__
35419# include <limits.h>
35420#else
35421# include <assert.h>
35422#endif
35423		     Syntax error
35424_ACEOF
35425if ac_fn_c_try_cpp "$LINENO"; then :
35426
35427else
35428  # Broken: fails on valid input.
35429continue
35430fi
35431rm -f conftest.err conftest.i conftest.$ac_ext
35432
35433  # OK, works on sane cases.  Now check whether nonexistent headers
35434  # can be detected and how.
35435  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35436/* end confdefs.h.  */
35437#include <ac_nonexistent.h>
35438_ACEOF
35439if ac_fn_c_try_cpp "$LINENO"; then :
35440  # Broken: success on invalid input.
35441continue
35442else
35443  # Passes both tests.
35444ac_preproc_ok=:
35445break
35446fi
35447rm -f conftest.err conftest.i conftest.$ac_ext
35448
35449done
35450# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35451rm -f conftest.i conftest.err conftest.$ac_ext
35452if $ac_preproc_ok; then :
35453  break
35454fi
35455
35456    done
35457    ac_cv_prog_CPP=$CPP
35458
35459fi
35460  CPP=$ac_cv_prog_CPP
35461else
35462  ac_cv_prog_CPP=$CPP
35463fi
35464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35465$as_echo "$CPP" >&6; }
35466ac_preproc_ok=false
35467for ac_c_preproc_warn_flag in '' yes
35468do
35469  # Use a header file that comes with gcc, so configuring glibc
35470  # with a fresh cross-compiler works.
35471  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35472  # <limits.h> exists even on freestanding compilers.
35473  # On the NeXT, cc -E runs the code through the compiler's parser,
35474  # not just through cpp. "Syntax error" is here to catch this case.
35475  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35476/* end confdefs.h.  */
35477#ifdef __STDC__
35478# include <limits.h>
35479#else
35480# include <assert.h>
35481#endif
35482		     Syntax error
35483_ACEOF
35484if ac_fn_c_try_cpp "$LINENO"; then :
35485
35486else
35487  # Broken: fails on valid input.
35488continue
35489fi
35490rm -f conftest.err conftest.i conftest.$ac_ext
35491
35492  # OK, works on sane cases.  Now check whether nonexistent headers
35493  # can be detected and how.
35494  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35495/* end confdefs.h.  */
35496#include <ac_nonexistent.h>
35497_ACEOF
35498if ac_fn_c_try_cpp "$LINENO"; then :
35499  # Broken: success on invalid input.
35500continue
35501else
35502  # Passes both tests.
35503ac_preproc_ok=:
35504break
35505fi
35506rm -f conftest.err conftest.i conftest.$ac_ext
35507
35508done
35509# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35510rm -f conftest.i conftest.err conftest.$ac_ext
35511if $ac_preproc_ok; then :
35512
35513else
35514  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35515$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35516as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35517See \`config.log' for more details" "$LINENO" 5; }
35518fi
35519
35520ac_ext=cpp
35521ac_cpp='$CXXCPP $CPPFLAGS'
35522ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35523ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35524ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35525
35526
35527  # Only process if variable expands to non-empty
35528
35529  if test "x$CPP" != x; then
35530    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35531
35532  # First separate the path from the arguments. This will split at the first
35533  # space.
35534  complete="$CPP"
35535  path="${complete%% *}"
35536  tmp="$complete EOL"
35537  arguments="${tmp#* }"
35538
35539  # Input might be given as Windows format, start by converting to
35540  # unix format.
35541  new_path=`$CYGPATH -u "$path"`
35542
35543  # Now try to locate executable using which
35544  new_path=`$WHICH "$new_path" 2> /dev/null`
35545  # bat and cmd files are not always considered executable in cygwin causing which
35546  # to not find them
35547  if test "x$new_path" = x \
35548      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35549      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35550    new_path=`$CYGPATH -u "$path"`
35551  fi
35552  if test "x$new_path" = x; then
35553    # Oops. Which didn't find the executable.
35554    # The splitting of arguments from the executable at a space might have been incorrect,
35555    # since paths with space are more likely in Windows. Give it another try with the whole
35556    # argument.
35557    path="$complete"
35558    arguments="EOL"
35559    new_path=`$CYGPATH -u "$path"`
35560    new_path=`$WHICH "$new_path" 2> /dev/null`
35561    # bat and cmd files are not always considered executable in cygwin causing which
35562    # to not find them
35563    if test "x$new_path" = x \
35564        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35565        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35566      new_path=`$CYGPATH -u "$path"`
35567    fi
35568    if test "x$new_path" = x; then
35569      # It's still not found. Now this is an unrecoverable error.
35570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35571$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35572      has_space=`$ECHO "$complete" | $GREP " "`
35573      if test "x$has_space" != x; then
35574        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35575$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35576      fi
35577      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35578    fi
35579  fi
35580
35581  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35582  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35583  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35584  # "foo.exe" is OK but "foo" is an error.
35585  #
35586  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35587  # It is also a way to make sure we got the proper file name for the real test later on.
35588  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35589  if test "x$test_shortpath" = x; then
35590    # Short path failed, file does not exist as specified.
35591    # Try adding .exe or .cmd
35592    if test -f "${new_path}.exe"; then
35593      input_to_shortpath="${new_path}.exe"
35594    elif test -f "${new_path}.cmd"; then
35595      input_to_shortpath="${new_path}.cmd"
35596    else
35597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35598$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35599      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35600$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35601      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35602    fi
35603  else
35604    input_to_shortpath="$new_path"
35605  fi
35606
35607  # Call helper function which possibly converts this using DOS-style short mode.
35608  # If so, the updated path is stored in $new_path.
35609  new_path="$input_to_shortpath"
35610
35611  input_path="$input_to_shortpath"
35612  # Check if we need to convert this using DOS-style short mode. If the path
35613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35614  # take no chances and rewrite it.
35615  # Note: m4 eats our [], so we need to use [ and ] instead.
35616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35617  if test "x$has_forbidden_chars" != x; then
35618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35622      # Going to short mode and back again did indeed matter. Since short mode is
35623      # case insensitive, let's make it lowercase to improve readability.
35624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35625      # Now convert it back to Unix-style (cygpath)
35626      input_path=`$CYGPATH -u "$shortmode_path"`
35627      new_path="$input_path"
35628    fi
35629  fi
35630
35631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35632  if test "x$test_cygdrive_prefix" = x; then
35633    # As a simple fix, exclude /usr/bin since it's not a real path.
35634    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35636      # a path prefixed by /cygdrive for fixpath to work.
35637      new_path="$CYGWIN_ROOT_PATH$input_path"
35638    fi
35639  fi
35640
35641  # remove trailing .exe if any
35642  new_path="${new_path/%.exe/}"
35643
35644    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35645
35646  # First separate the path from the arguments. This will split at the first
35647  # space.
35648  complete="$CPP"
35649  path="${complete%% *}"
35650  tmp="$complete EOL"
35651  arguments="${tmp#* }"
35652
35653  # Input might be given as Windows format, start by converting to
35654  # unix format.
35655  new_path="$path"
35656
35657  windows_path="$new_path"
35658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35659    unix_path=`$CYGPATH -u "$windows_path"`
35660    new_path="$unix_path"
35661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35663    new_path="$unix_path"
35664  fi
35665
35666
35667  # Now try to locate executable using which
35668  new_path=`$WHICH "$new_path" 2> /dev/null`
35669
35670  if test "x$new_path" = x; then
35671    # Oops. Which didn't find the executable.
35672    # The splitting of arguments from the executable at a space might have been incorrect,
35673    # since paths with space are more likely in Windows. Give it another try with the whole
35674    # argument.
35675    path="$complete"
35676    arguments="EOL"
35677    new_path="$path"
35678
35679  windows_path="$new_path"
35680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35681    unix_path=`$CYGPATH -u "$windows_path"`
35682    new_path="$unix_path"
35683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35685    new_path="$unix_path"
35686  fi
35687
35688
35689    new_path=`$WHICH "$new_path" 2> /dev/null`
35690    # bat and cmd files are not always considered executable in MSYS causing which
35691    # to not find them
35692    if test "x$new_path" = x \
35693        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35694        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35695      new_path="$path"
35696
35697  windows_path="$new_path"
35698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35699    unix_path=`$CYGPATH -u "$windows_path"`
35700    new_path="$unix_path"
35701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35703    new_path="$unix_path"
35704  fi
35705
35706    fi
35707
35708    if test "x$new_path" = x; then
35709      # It's still not found. Now this is an unrecoverable error.
35710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35711$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35712      has_space=`$ECHO "$complete" | $GREP " "`
35713      if test "x$has_space" != x; then
35714        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35715$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35716      fi
35717      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35718    fi
35719  fi
35720
35721  # Now new_path has a complete unix path to the binary
35722  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35723    # Keep paths in /bin as-is, but remove trailing .exe if any
35724    new_path="${new_path/%.exe/}"
35725    # Do not save /bin paths to all_fixpath_prefixes!
35726  else
35727    # Not in mixed or Windows style, start by that.
35728    new_path=`cmd //c echo $new_path`
35729
35730  input_path="$new_path"
35731  # Check if we need to convert this using DOS-style short mode. If the path
35732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35733  # take no chances and rewrite it.
35734  # Note: m4 eats our [], so we need to use [ and ] instead.
35735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35736  if test "x$has_forbidden_chars" != x; then
35737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35739  fi
35740
35741    # Output is in $new_path
35742
35743  windows_path="$new_path"
35744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35745    unix_path=`$CYGPATH -u "$windows_path"`
35746    new_path="$unix_path"
35747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35749    new_path="$unix_path"
35750  fi
35751
35752    # remove trailing .exe if any
35753    new_path="${new_path/%.exe/}"
35754
35755    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35756    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35757  fi
35758
35759    else
35760      # We're on a unix platform. Hooray! :)
35761      # First separate the path from the arguments. This will split at the first
35762      # space.
35763      complete="$CPP"
35764      path="${complete%% *}"
35765      tmp="$complete EOL"
35766      arguments="${tmp#* }"
35767
35768      # Cannot rely on the command "which" here since it doesn't always work.
35769      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35770      if test -z "$is_absolute_path"; then
35771        # Path to executable is not absolute. Find it.
35772        IFS_save="$IFS"
35773        IFS=:
35774        for p in $PATH; do
35775          if test -f "$p/$path" && test -x "$p/$path"; then
35776            new_path="$p/$path"
35777            break
35778          fi
35779        done
35780        IFS="$IFS_save"
35781      else
35782        # This is an absolute path, we can use it without further modifications.
35783        new_path="$path"
35784      fi
35785
35786      if test "x$new_path" = x; then
35787        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35788$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35789        has_space=`$ECHO "$complete" | $GREP " "`
35790        if test "x$has_space" != x; then
35791          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35792$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35793        fi
35794        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35795      fi
35796    fi
35797
35798    # Now join together the path and the arguments once again
35799    if test "x$arguments" != xEOL; then
35800      new_complete="$new_path ${arguments% *}"
35801    else
35802      new_complete="$new_path"
35803    fi
35804
35805    if test "x$complete" != "x$new_complete"; then
35806      CPP="$new_complete"
35807      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35808$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35809    fi
35810  fi
35811
35812  ac_ext=cpp
35813ac_cpp='$CXXCPP $CPPFLAGS'
35814ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35815ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35816ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35818$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35819if test -z "$CXXCPP"; then
35820  if ${ac_cv_prog_CXXCPP+:} false; then :
35821  $as_echo_n "(cached) " >&6
35822else
35823      # Double quotes because CXXCPP needs to be expanded
35824    for CXXCPP in "$CXX -E" "/lib/cpp"
35825    do
35826      ac_preproc_ok=false
35827for ac_cxx_preproc_warn_flag in '' yes
35828do
35829  # Use a header file that comes with gcc, so configuring glibc
35830  # with a fresh cross-compiler works.
35831  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35832  # <limits.h> exists even on freestanding compilers.
35833  # On the NeXT, cc -E runs the code through the compiler's parser,
35834  # not just through cpp. "Syntax error" is here to catch this case.
35835  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35836/* end confdefs.h.  */
35837#ifdef __STDC__
35838# include <limits.h>
35839#else
35840# include <assert.h>
35841#endif
35842		     Syntax error
35843_ACEOF
35844if ac_fn_cxx_try_cpp "$LINENO"; then :
35845
35846else
35847  # Broken: fails on valid input.
35848continue
35849fi
35850rm -f conftest.err conftest.i conftest.$ac_ext
35851
35852  # OK, works on sane cases.  Now check whether nonexistent headers
35853  # can be detected and how.
35854  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35855/* end confdefs.h.  */
35856#include <ac_nonexistent.h>
35857_ACEOF
35858if ac_fn_cxx_try_cpp "$LINENO"; then :
35859  # Broken: success on invalid input.
35860continue
35861else
35862  # Passes both tests.
35863ac_preproc_ok=:
35864break
35865fi
35866rm -f conftest.err conftest.i conftest.$ac_ext
35867
35868done
35869# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35870rm -f conftest.i conftest.err conftest.$ac_ext
35871if $ac_preproc_ok; then :
35872  break
35873fi
35874
35875    done
35876    ac_cv_prog_CXXCPP=$CXXCPP
35877
35878fi
35879  CXXCPP=$ac_cv_prog_CXXCPP
35880else
35881  ac_cv_prog_CXXCPP=$CXXCPP
35882fi
35883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35884$as_echo "$CXXCPP" >&6; }
35885ac_preproc_ok=false
35886for ac_cxx_preproc_warn_flag in '' yes
35887do
35888  # Use a header file that comes with gcc, so configuring glibc
35889  # with a fresh cross-compiler works.
35890  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35891  # <limits.h> exists even on freestanding compilers.
35892  # On the NeXT, cc -E runs the code through the compiler's parser,
35893  # not just through cpp. "Syntax error" is here to catch this case.
35894  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35895/* end confdefs.h.  */
35896#ifdef __STDC__
35897# include <limits.h>
35898#else
35899# include <assert.h>
35900#endif
35901		     Syntax error
35902_ACEOF
35903if ac_fn_cxx_try_cpp "$LINENO"; then :
35904
35905else
35906  # Broken: fails on valid input.
35907continue
35908fi
35909rm -f conftest.err conftest.i conftest.$ac_ext
35910
35911  # OK, works on sane cases.  Now check whether nonexistent headers
35912  # can be detected and how.
35913  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35914/* end confdefs.h.  */
35915#include <ac_nonexistent.h>
35916_ACEOF
35917if ac_fn_cxx_try_cpp "$LINENO"; then :
35918  # Broken: success on invalid input.
35919continue
35920else
35921  # Passes both tests.
35922ac_preproc_ok=:
35923break
35924fi
35925rm -f conftest.err conftest.i conftest.$ac_ext
35926
35927done
35928# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35929rm -f conftest.i conftest.err conftest.$ac_ext
35930if $ac_preproc_ok; then :
35931
35932else
35933  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35935as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35936See \`config.log' for more details" "$LINENO" 5; }
35937fi
35938
35939ac_ext=cpp
35940ac_cpp='$CXXCPP $CPPFLAGS'
35941ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35942ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35943ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35944
35945
35946  # Only process if variable expands to non-empty
35947
35948  if test "x$CXXCPP" != x; then
35949    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35950
35951  # First separate the path from the arguments. This will split at the first
35952  # space.
35953  complete="$CXXCPP"
35954  path="${complete%% *}"
35955  tmp="$complete EOL"
35956  arguments="${tmp#* }"
35957
35958  # Input might be given as Windows format, start by converting to
35959  # unix format.
35960  new_path=`$CYGPATH -u "$path"`
35961
35962  # Now try to locate executable using which
35963  new_path=`$WHICH "$new_path" 2> /dev/null`
35964  # bat and cmd files are not always considered executable in cygwin causing which
35965  # to not find them
35966  if test "x$new_path" = x \
35967      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35968      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35969    new_path=`$CYGPATH -u "$path"`
35970  fi
35971  if test "x$new_path" = x; then
35972    # Oops. Which didn't find the executable.
35973    # The splitting of arguments from the executable at a space might have been incorrect,
35974    # since paths with space are more likely in Windows. Give it another try with the whole
35975    # argument.
35976    path="$complete"
35977    arguments="EOL"
35978    new_path=`$CYGPATH -u "$path"`
35979    new_path=`$WHICH "$new_path" 2> /dev/null`
35980    # bat and cmd files are not always considered executable in cygwin causing which
35981    # to not find them
35982    if test "x$new_path" = x \
35983        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35984        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35985      new_path=`$CYGPATH -u "$path"`
35986    fi
35987    if test "x$new_path" = x; then
35988      # It's still not found. Now this is an unrecoverable error.
35989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35990$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35991      has_space=`$ECHO "$complete" | $GREP " "`
35992      if test "x$has_space" != x; then
35993        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35994$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35995      fi
35996      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35997    fi
35998  fi
35999
36000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36003  # "foo.exe" is OK but "foo" is an error.
36004  #
36005  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36006  # It is also a way to make sure we got the proper file name for the real test later on.
36007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36008  if test "x$test_shortpath" = x; then
36009    # Short path failed, file does not exist as specified.
36010    # Try adding .exe or .cmd
36011    if test -f "${new_path}.exe"; then
36012      input_to_shortpath="${new_path}.exe"
36013    elif test -f "${new_path}.cmd"; then
36014      input_to_shortpath="${new_path}.cmd"
36015    else
36016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36017$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36018      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36019$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36020      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36021    fi
36022  else
36023    input_to_shortpath="$new_path"
36024  fi
36025
36026  # Call helper function which possibly converts this using DOS-style short mode.
36027  # If so, the updated path is stored in $new_path.
36028  new_path="$input_to_shortpath"
36029
36030  input_path="$input_to_shortpath"
36031  # Check if we need to convert this using DOS-style short mode. If the path
36032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36033  # take no chances and rewrite it.
36034  # Note: m4 eats our [], so we need to use [ and ] instead.
36035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36036  if test "x$has_forbidden_chars" != x; then
36037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36041      # Going to short mode and back again did indeed matter. Since short mode is
36042      # case insensitive, let's make it lowercase to improve readability.
36043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36044      # Now convert it back to Unix-style (cygpath)
36045      input_path=`$CYGPATH -u "$shortmode_path"`
36046      new_path="$input_path"
36047    fi
36048  fi
36049
36050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36051  if test "x$test_cygdrive_prefix" = x; then
36052    # As a simple fix, exclude /usr/bin since it's not a real path.
36053    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36055      # a path prefixed by /cygdrive for fixpath to work.
36056      new_path="$CYGWIN_ROOT_PATH$input_path"
36057    fi
36058  fi
36059
36060  # remove trailing .exe if any
36061  new_path="${new_path/%.exe/}"
36062
36063    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36064
36065  # First separate the path from the arguments. This will split at the first
36066  # space.
36067  complete="$CXXCPP"
36068  path="${complete%% *}"
36069  tmp="$complete EOL"
36070  arguments="${tmp#* }"
36071
36072  # Input might be given as Windows format, start by converting to
36073  # unix format.
36074  new_path="$path"
36075
36076  windows_path="$new_path"
36077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36078    unix_path=`$CYGPATH -u "$windows_path"`
36079    new_path="$unix_path"
36080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36082    new_path="$unix_path"
36083  fi
36084
36085
36086  # Now try to locate executable using which
36087  new_path=`$WHICH "$new_path" 2> /dev/null`
36088
36089  if test "x$new_path" = x; then
36090    # Oops. Which didn't find the executable.
36091    # The splitting of arguments from the executable at a space might have been incorrect,
36092    # since paths with space are more likely in Windows. Give it another try with the whole
36093    # argument.
36094    path="$complete"
36095    arguments="EOL"
36096    new_path="$path"
36097
36098  windows_path="$new_path"
36099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36100    unix_path=`$CYGPATH -u "$windows_path"`
36101    new_path="$unix_path"
36102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36104    new_path="$unix_path"
36105  fi
36106
36107
36108    new_path=`$WHICH "$new_path" 2> /dev/null`
36109    # bat and cmd files are not always considered executable in MSYS causing which
36110    # to not find them
36111    if test "x$new_path" = x \
36112        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36113        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36114      new_path="$path"
36115
36116  windows_path="$new_path"
36117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36118    unix_path=`$CYGPATH -u "$windows_path"`
36119    new_path="$unix_path"
36120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36122    new_path="$unix_path"
36123  fi
36124
36125    fi
36126
36127    if test "x$new_path" = x; then
36128      # It's still not found. Now this is an unrecoverable error.
36129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36130$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36131      has_space=`$ECHO "$complete" | $GREP " "`
36132      if test "x$has_space" != x; then
36133        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36134$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36135      fi
36136      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36137    fi
36138  fi
36139
36140  # Now new_path has a complete unix path to the binary
36141  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36142    # Keep paths in /bin as-is, but remove trailing .exe if any
36143    new_path="${new_path/%.exe/}"
36144    # Do not save /bin paths to all_fixpath_prefixes!
36145  else
36146    # Not in mixed or Windows style, start by that.
36147    new_path=`cmd //c echo $new_path`
36148
36149  input_path="$new_path"
36150  # Check if we need to convert this using DOS-style short mode. If the path
36151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36152  # take no chances and rewrite it.
36153  # Note: m4 eats our [], so we need to use [ and ] instead.
36154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36155  if test "x$has_forbidden_chars" != x; then
36156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36158  fi
36159
36160    # Output is in $new_path
36161
36162  windows_path="$new_path"
36163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36164    unix_path=`$CYGPATH -u "$windows_path"`
36165    new_path="$unix_path"
36166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36168    new_path="$unix_path"
36169  fi
36170
36171    # remove trailing .exe if any
36172    new_path="${new_path/%.exe/}"
36173
36174    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36175    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36176  fi
36177
36178    else
36179      # We're on a unix platform. Hooray! :)
36180      # First separate the path from the arguments. This will split at the first
36181      # space.
36182      complete="$CXXCPP"
36183      path="${complete%% *}"
36184      tmp="$complete EOL"
36185      arguments="${tmp#* }"
36186
36187      # Cannot rely on the command "which" here since it doesn't always work.
36188      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36189      if test -z "$is_absolute_path"; then
36190        # Path to executable is not absolute. Find it.
36191        IFS_save="$IFS"
36192        IFS=:
36193        for p in $PATH; do
36194          if test -f "$p/$path" && test -x "$p/$path"; then
36195            new_path="$p/$path"
36196            break
36197          fi
36198        done
36199        IFS="$IFS_save"
36200      else
36201        # This is an absolute path, we can use it without further modifications.
36202        new_path="$path"
36203      fi
36204
36205      if test "x$new_path" = x; then
36206        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36207$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36208        has_space=`$ECHO "$complete" | $GREP " "`
36209        if test "x$has_space" != x; then
36210          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36211$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36212        fi
36213        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36214      fi
36215    fi
36216
36217    # Now join together the path and the arguments once again
36218    if test "x$arguments" != xEOL; then
36219      new_complete="$new_path ${arguments% *}"
36220    else
36221      new_complete="$new_path"
36222    fi
36223
36224    if test "x$complete" != "x$new_complete"; then
36225      CXXCPP="$new_complete"
36226      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36227$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36228    fi
36229  fi
36230
36231
36232  #
36233  # Setup the linker (LD)
36234  #
36235  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36236    # In the Microsoft toolchain we have a separate LD command "link".
36237    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36238    # a cygwin program for something completely different.
36239    # Extract the first word of "link", so it can be a program name with args.
36240set dummy link; ac_word=$2
36241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36242$as_echo_n "checking for $ac_word... " >&6; }
36243if ${ac_cv_prog_LD+:} false; then :
36244  $as_echo_n "(cached) " >&6
36245else
36246  if test -n "$LD"; then
36247  ac_cv_prog_LD="$LD" # Let the user override the test.
36248else
36249  ac_prog_rejected=no
36250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36251for as_dir in $PATH
36252do
36253  IFS=$as_save_IFS
36254  test -z "$as_dir" && as_dir=.
36255    for ac_exec_ext in '' $ac_executable_extensions; do
36256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36257    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36258       ac_prog_rejected=yes
36259       continue
36260     fi
36261    ac_cv_prog_LD="link"
36262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36263    break 2
36264  fi
36265done
36266  done
36267IFS=$as_save_IFS
36268
36269if test $ac_prog_rejected = yes; then
36270  # We found a bogon in the path, so make sure we never use it.
36271  set dummy $ac_cv_prog_LD
36272  shift
36273  if test $# != 0; then
36274    # We chose a different compiler from the bogus one.
36275    # However, it has the same basename, so the bogon will be chosen
36276    # first if we set LD to just the basename; use the full file name.
36277    shift
36278    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36279  fi
36280fi
36281fi
36282fi
36283LD=$ac_cv_prog_LD
36284if test -n "$LD"; then
36285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36286$as_echo "$LD" >&6; }
36287else
36288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36289$as_echo "no" >&6; }
36290fi
36291
36292
36293
36294  # Only process if variable expands to non-empty
36295
36296  if test "x$LD" != x; then
36297    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36298
36299  # First separate the path from the arguments. This will split at the first
36300  # space.
36301  complete="$LD"
36302  path="${complete%% *}"
36303  tmp="$complete EOL"
36304  arguments="${tmp#* }"
36305
36306  # Input might be given as Windows format, start by converting to
36307  # unix format.
36308  new_path=`$CYGPATH -u "$path"`
36309
36310  # Now try to locate executable using which
36311  new_path=`$WHICH "$new_path" 2> /dev/null`
36312  # bat and cmd files are not always considered executable in cygwin causing which
36313  # to not find them
36314  if test "x$new_path" = x \
36315      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36316      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36317    new_path=`$CYGPATH -u "$path"`
36318  fi
36319  if test "x$new_path" = x; then
36320    # Oops. Which didn't find the executable.
36321    # The splitting of arguments from the executable at a space might have been incorrect,
36322    # since paths with space are more likely in Windows. Give it another try with the whole
36323    # argument.
36324    path="$complete"
36325    arguments="EOL"
36326    new_path=`$CYGPATH -u "$path"`
36327    new_path=`$WHICH "$new_path" 2> /dev/null`
36328    # bat and cmd files are not always considered executable in cygwin causing which
36329    # to not find them
36330    if test "x$new_path" = x \
36331        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36332        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36333      new_path=`$CYGPATH -u "$path"`
36334    fi
36335    if test "x$new_path" = x; then
36336      # It's still not found. Now this is an unrecoverable error.
36337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36338$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36339      has_space=`$ECHO "$complete" | $GREP " "`
36340      if test "x$has_space" != x; then
36341        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36342$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36343      fi
36344      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36345    fi
36346  fi
36347
36348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36351  # "foo.exe" is OK but "foo" is an error.
36352  #
36353  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36354  # It is also a way to make sure we got the proper file name for the real test later on.
36355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36356  if test "x$test_shortpath" = x; then
36357    # Short path failed, file does not exist as specified.
36358    # Try adding .exe or .cmd
36359    if test -f "${new_path}.exe"; then
36360      input_to_shortpath="${new_path}.exe"
36361    elif test -f "${new_path}.cmd"; then
36362      input_to_shortpath="${new_path}.cmd"
36363    else
36364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36365$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36366      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36367$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36368      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36369    fi
36370  else
36371    input_to_shortpath="$new_path"
36372  fi
36373
36374  # Call helper function which possibly converts this using DOS-style short mode.
36375  # If so, the updated path is stored in $new_path.
36376  new_path="$input_to_shortpath"
36377
36378  input_path="$input_to_shortpath"
36379  # Check if we need to convert this using DOS-style short mode. If the path
36380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36381  # take no chances and rewrite it.
36382  # Note: m4 eats our [], so we need to use [ and ] instead.
36383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36384  if test "x$has_forbidden_chars" != x; then
36385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36389      # Going to short mode and back again did indeed matter. Since short mode is
36390      # case insensitive, let's make it lowercase to improve readability.
36391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36392      # Now convert it back to Unix-style (cygpath)
36393      input_path=`$CYGPATH -u "$shortmode_path"`
36394      new_path="$input_path"
36395    fi
36396  fi
36397
36398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36399  if test "x$test_cygdrive_prefix" = x; then
36400    # As a simple fix, exclude /usr/bin since it's not a real path.
36401    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36403      # a path prefixed by /cygdrive for fixpath to work.
36404      new_path="$CYGWIN_ROOT_PATH$input_path"
36405    fi
36406  fi
36407
36408  # remove trailing .exe if any
36409  new_path="${new_path/%.exe/}"
36410
36411    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36412
36413  # First separate the path from the arguments. This will split at the first
36414  # space.
36415  complete="$LD"
36416  path="${complete%% *}"
36417  tmp="$complete EOL"
36418  arguments="${tmp#* }"
36419
36420  # Input might be given as Windows format, start by converting to
36421  # unix format.
36422  new_path="$path"
36423
36424  windows_path="$new_path"
36425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36426    unix_path=`$CYGPATH -u "$windows_path"`
36427    new_path="$unix_path"
36428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36430    new_path="$unix_path"
36431  fi
36432
36433
36434  # Now try to locate executable using which
36435  new_path=`$WHICH "$new_path" 2> /dev/null`
36436
36437  if test "x$new_path" = x; then
36438    # Oops. Which didn't find the executable.
36439    # The splitting of arguments from the executable at a space might have been incorrect,
36440    # since paths with space are more likely in Windows. Give it another try with the whole
36441    # argument.
36442    path="$complete"
36443    arguments="EOL"
36444    new_path="$path"
36445
36446  windows_path="$new_path"
36447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36448    unix_path=`$CYGPATH -u "$windows_path"`
36449    new_path="$unix_path"
36450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36452    new_path="$unix_path"
36453  fi
36454
36455
36456    new_path=`$WHICH "$new_path" 2> /dev/null`
36457    # bat and cmd files are not always considered executable in MSYS causing which
36458    # to not find them
36459    if test "x$new_path" = x \
36460        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36461        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36462      new_path="$path"
36463
36464  windows_path="$new_path"
36465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36466    unix_path=`$CYGPATH -u "$windows_path"`
36467    new_path="$unix_path"
36468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36470    new_path="$unix_path"
36471  fi
36472
36473    fi
36474
36475    if test "x$new_path" = x; then
36476      # It's still not found. Now this is an unrecoverable error.
36477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36478$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36479      has_space=`$ECHO "$complete" | $GREP " "`
36480      if test "x$has_space" != x; then
36481        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36482$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36483      fi
36484      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36485    fi
36486  fi
36487
36488  # Now new_path has a complete unix path to the binary
36489  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36490    # Keep paths in /bin as-is, but remove trailing .exe if any
36491    new_path="${new_path/%.exe/}"
36492    # Do not save /bin paths to all_fixpath_prefixes!
36493  else
36494    # Not in mixed or Windows style, start by that.
36495    new_path=`cmd //c echo $new_path`
36496
36497  input_path="$new_path"
36498  # Check if we need to convert this using DOS-style short mode. If the path
36499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36500  # take no chances and rewrite it.
36501  # Note: m4 eats our [], so we need to use [ and ] instead.
36502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36503  if test "x$has_forbidden_chars" != x; then
36504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36506  fi
36507
36508    # Output is in $new_path
36509
36510  windows_path="$new_path"
36511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36512    unix_path=`$CYGPATH -u "$windows_path"`
36513    new_path="$unix_path"
36514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36516    new_path="$unix_path"
36517  fi
36518
36519    # remove trailing .exe if any
36520    new_path="${new_path/%.exe/}"
36521
36522    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36523    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36524  fi
36525
36526    else
36527      # We're on a unix platform. Hooray! :)
36528      # First separate the path from the arguments. This will split at the first
36529      # space.
36530      complete="$LD"
36531      path="${complete%% *}"
36532      tmp="$complete EOL"
36533      arguments="${tmp#* }"
36534
36535      # Cannot rely on the command "which" here since it doesn't always work.
36536      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36537      if test -z "$is_absolute_path"; then
36538        # Path to executable is not absolute. Find it.
36539        IFS_save="$IFS"
36540        IFS=:
36541        for p in $PATH; do
36542          if test -f "$p/$path" && test -x "$p/$path"; then
36543            new_path="$p/$path"
36544            break
36545          fi
36546        done
36547        IFS="$IFS_save"
36548      else
36549        # This is an absolute path, we can use it without further modifications.
36550        new_path="$path"
36551      fi
36552
36553      if test "x$new_path" = x; then
36554        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36555$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36556        has_space=`$ECHO "$complete" | $GREP " "`
36557        if test "x$has_space" != x; then
36558          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36559$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36560        fi
36561        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36562      fi
36563    fi
36564
36565    # Now join together the path and the arguments once again
36566    if test "x$arguments" != xEOL; then
36567      new_complete="$new_path ${arguments% *}"
36568    else
36569      new_complete="$new_path"
36570    fi
36571
36572    if test "x$complete" != "x$new_complete"; then
36573      LD="$new_complete"
36574      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36575$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36576    fi
36577  fi
36578
36579    # Verify that we indeed succeeded with this trick.
36580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36581$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36582    "$LD" --version > /dev/null
36583    if test $? -eq 0 ; then
36584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36585$as_echo "no" >&6; }
36586      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36587    else
36588      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36589$as_echo "yes" >&6; }
36590    fi
36591    LDCXX="$LD"
36592  else
36593    # All other toolchains use the compiler to link.
36594    LD="$CC"
36595    LDCXX="$CXX"
36596  fi
36597
36598  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36599
36600
36601  #
36602  # Setup the assembler (AS)
36603  #
36604  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36605
36606
36607  # Publish this variable in the help.
36608
36609
36610  if [ -z "${AS+x}" ]; then
36611    # The variable is not set by user, try to locate tool using the code snippet
36612    for ac_prog in as
36613do
36614  # Extract the first word of "$ac_prog", so it can be a program name with args.
36615set dummy $ac_prog; ac_word=$2
36616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36617$as_echo_n "checking for $ac_word... " >&6; }
36618if ${ac_cv_path_AS+:} false; then :
36619  $as_echo_n "(cached) " >&6
36620else
36621  case $AS in
36622  [\\/]* | ?:[\\/]*)
36623  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36624  ;;
36625  *)
36626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36627for as_dir in $PATH
36628do
36629  IFS=$as_save_IFS
36630  test -z "$as_dir" && as_dir=.
36631    for ac_exec_ext in '' $ac_executable_extensions; do
36632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36633    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36635    break 2
36636  fi
36637done
36638  done
36639IFS=$as_save_IFS
36640
36641  ;;
36642esac
36643fi
36644AS=$ac_cv_path_AS
36645if test -n "$AS"; then
36646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36647$as_echo "$AS" >&6; }
36648else
36649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36650$as_echo "no" >&6; }
36651fi
36652
36653
36654  test -n "$AS" && break
36655done
36656
36657  else
36658    # The variable is set, but is it from the command line or the environment?
36659
36660    # Try to remove the string !AS! from our list.
36661    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36662    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36663      # If it failed, the variable was not from the command line. Ignore it,
36664      # but warn the user (except for BASH, which is always set by the calling BASH).
36665      if test "xAS" != xBASH; then
36666        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36667$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36668      fi
36669      # Try to locate tool using the code snippet
36670      for ac_prog in as
36671do
36672  # Extract the first word of "$ac_prog", so it can be a program name with args.
36673set dummy $ac_prog; ac_word=$2
36674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36675$as_echo_n "checking for $ac_word... " >&6; }
36676if ${ac_cv_path_AS+:} false; then :
36677  $as_echo_n "(cached) " >&6
36678else
36679  case $AS in
36680  [\\/]* | ?:[\\/]*)
36681  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36682  ;;
36683  *)
36684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36685for as_dir in $PATH
36686do
36687  IFS=$as_save_IFS
36688  test -z "$as_dir" && as_dir=.
36689    for ac_exec_ext in '' $ac_executable_extensions; do
36690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36691    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36693    break 2
36694  fi
36695done
36696  done
36697IFS=$as_save_IFS
36698
36699  ;;
36700esac
36701fi
36702AS=$ac_cv_path_AS
36703if test -n "$AS"; then
36704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36705$as_echo "$AS" >&6; }
36706else
36707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36708$as_echo "no" >&6; }
36709fi
36710
36711
36712  test -n "$AS" && break
36713done
36714
36715    else
36716      # If it succeeded, then it was overridden by the user. We will use it
36717      # for the tool.
36718
36719      # First remove it from the list of overridden variables, so we can test
36720      # for unknown variables in the end.
36721      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36722
36723      # Check if we try to supply an empty value
36724      if test "x$AS" = x; then
36725        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36726$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36727        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36728$as_echo_n "checking for AS... " >&6; }
36729        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36730$as_echo "disabled" >&6; }
36731      else
36732        # Check if the provided tool contains a complete path.
36733        tool_specified="$AS"
36734        tool_basename="${tool_specified##*/}"
36735        if test "x$tool_basename" = "x$tool_specified"; then
36736          # A command without a complete path is provided, search $PATH.
36737          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36738$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36739          # Extract the first word of "$tool_basename", so it can be a program name with args.
36740set dummy $tool_basename; ac_word=$2
36741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36742$as_echo_n "checking for $ac_word... " >&6; }
36743if ${ac_cv_path_AS+:} false; then :
36744  $as_echo_n "(cached) " >&6
36745else
36746  case $AS in
36747  [\\/]* | ?:[\\/]*)
36748  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36749  ;;
36750  *)
36751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36752for as_dir in $PATH
36753do
36754  IFS=$as_save_IFS
36755  test -z "$as_dir" && as_dir=.
36756    for ac_exec_ext in '' $ac_executable_extensions; do
36757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36758    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36760    break 2
36761  fi
36762done
36763  done
36764IFS=$as_save_IFS
36765
36766  ;;
36767esac
36768fi
36769AS=$ac_cv_path_AS
36770if test -n "$AS"; then
36771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36772$as_echo "$AS" >&6; }
36773else
36774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36775$as_echo "no" >&6; }
36776fi
36777
36778
36779          if test "x$AS" = x; then
36780            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36781          fi
36782        else
36783          # Otherwise we believe it is a complete path. Use it as it is.
36784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36785$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36786          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36787$as_echo_n "checking for AS... " >&6; }
36788          if test ! -x "$tool_specified"; then
36789            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36790$as_echo "not found" >&6; }
36791            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36792          fi
36793          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36794$as_echo "$tool_specified" >&6; }
36795        fi
36796      fi
36797    fi
36798
36799  fi
36800
36801
36802
36803  # Only process if variable expands to non-empty
36804
36805  if test "x$AS" != x; then
36806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36807
36808  # First separate the path from the arguments. This will split at the first
36809  # space.
36810  complete="$AS"
36811  path="${complete%% *}"
36812  tmp="$complete EOL"
36813  arguments="${tmp#* }"
36814
36815  # Input might be given as Windows format, start by converting to
36816  # unix format.
36817  new_path=`$CYGPATH -u "$path"`
36818
36819  # Now try to locate executable using which
36820  new_path=`$WHICH "$new_path" 2> /dev/null`
36821  # bat and cmd files are not always considered executable in cygwin causing which
36822  # to not find them
36823  if test "x$new_path" = x \
36824      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36825      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36826    new_path=`$CYGPATH -u "$path"`
36827  fi
36828  if test "x$new_path" = x; then
36829    # Oops. Which didn't find the executable.
36830    # The splitting of arguments from the executable at a space might have been incorrect,
36831    # since paths with space are more likely in Windows. Give it another try with the whole
36832    # argument.
36833    path="$complete"
36834    arguments="EOL"
36835    new_path=`$CYGPATH -u "$path"`
36836    new_path=`$WHICH "$new_path" 2> /dev/null`
36837    # bat and cmd files are not always considered executable in cygwin causing which
36838    # to not find them
36839    if test "x$new_path" = x \
36840        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36841        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36842      new_path=`$CYGPATH -u "$path"`
36843    fi
36844    if test "x$new_path" = x; then
36845      # It's still not found. Now this is an unrecoverable error.
36846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36847$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36848      has_space=`$ECHO "$complete" | $GREP " "`
36849      if test "x$has_space" != x; then
36850        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36851$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36852      fi
36853      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36854    fi
36855  fi
36856
36857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36860  # "foo.exe" is OK but "foo" is an error.
36861  #
36862  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36863  # It is also a way to make sure we got the proper file name for the real test later on.
36864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36865  if test "x$test_shortpath" = x; then
36866    # Short path failed, file does not exist as specified.
36867    # Try adding .exe or .cmd
36868    if test -f "${new_path}.exe"; then
36869      input_to_shortpath="${new_path}.exe"
36870    elif test -f "${new_path}.cmd"; then
36871      input_to_shortpath="${new_path}.cmd"
36872    else
36873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36874$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36875      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36876$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36877      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36878    fi
36879  else
36880    input_to_shortpath="$new_path"
36881  fi
36882
36883  # Call helper function which possibly converts this using DOS-style short mode.
36884  # If so, the updated path is stored in $new_path.
36885  new_path="$input_to_shortpath"
36886
36887  input_path="$input_to_shortpath"
36888  # Check if we need to convert this using DOS-style short mode. If the path
36889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36890  # take no chances and rewrite it.
36891  # Note: m4 eats our [], so we need to use [ and ] instead.
36892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36893  if test "x$has_forbidden_chars" != x; then
36894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36898      # Going to short mode and back again did indeed matter. Since short mode is
36899      # case insensitive, let's make it lowercase to improve readability.
36900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36901      # Now convert it back to Unix-style (cygpath)
36902      input_path=`$CYGPATH -u "$shortmode_path"`
36903      new_path="$input_path"
36904    fi
36905  fi
36906
36907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36908  if test "x$test_cygdrive_prefix" = x; then
36909    # As a simple fix, exclude /usr/bin since it's not a real path.
36910    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36912      # a path prefixed by /cygdrive for fixpath to work.
36913      new_path="$CYGWIN_ROOT_PATH$input_path"
36914    fi
36915  fi
36916
36917  # remove trailing .exe if any
36918  new_path="${new_path/%.exe/}"
36919
36920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36921
36922  # First separate the path from the arguments. This will split at the first
36923  # space.
36924  complete="$AS"
36925  path="${complete%% *}"
36926  tmp="$complete EOL"
36927  arguments="${tmp#* }"
36928
36929  # Input might be given as Windows format, start by converting to
36930  # unix format.
36931  new_path="$path"
36932
36933  windows_path="$new_path"
36934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36935    unix_path=`$CYGPATH -u "$windows_path"`
36936    new_path="$unix_path"
36937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36939    new_path="$unix_path"
36940  fi
36941
36942
36943  # Now try to locate executable using which
36944  new_path=`$WHICH "$new_path" 2> /dev/null`
36945
36946  if test "x$new_path" = x; then
36947    # Oops. Which didn't find the executable.
36948    # The splitting of arguments from the executable at a space might have been incorrect,
36949    # since paths with space are more likely in Windows. Give it another try with the whole
36950    # argument.
36951    path="$complete"
36952    arguments="EOL"
36953    new_path="$path"
36954
36955  windows_path="$new_path"
36956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36957    unix_path=`$CYGPATH -u "$windows_path"`
36958    new_path="$unix_path"
36959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36961    new_path="$unix_path"
36962  fi
36963
36964
36965    new_path=`$WHICH "$new_path" 2> /dev/null`
36966    # bat and cmd files are not always considered executable in MSYS causing which
36967    # to not find them
36968    if test "x$new_path" = x \
36969        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36970        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36971      new_path="$path"
36972
36973  windows_path="$new_path"
36974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36975    unix_path=`$CYGPATH -u "$windows_path"`
36976    new_path="$unix_path"
36977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36979    new_path="$unix_path"
36980  fi
36981
36982    fi
36983
36984    if test "x$new_path" = x; then
36985      # It's still not found. Now this is an unrecoverable error.
36986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36987$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36988      has_space=`$ECHO "$complete" | $GREP " "`
36989      if test "x$has_space" != x; then
36990        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36991$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36992      fi
36993      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36994    fi
36995  fi
36996
36997  # Now new_path has a complete unix path to the binary
36998  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36999    # Keep paths in /bin as-is, but remove trailing .exe if any
37000    new_path="${new_path/%.exe/}"
37001    # Do not save /bin paths to all_fixpath_prefixes!
37002  else
37003    # Not in mixed or Windows style, start by that.
37004    new_path=`cmd //c echo $new_path`
37005
37006  input_path="$new_path"
37007  # Check if we need to convert this using DOS-style short mode. If the path
37008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37009  # take no chances and rewrite it.
37010  # Note: m4 eats our [], so we need to use [ and ] instead.
37011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37012  if test "x$has_forbidden_chars" != x; then
37013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37014    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37015  fi
37016
37017    # Output is in $new_path
37018
37019  windows_path="$new_path"
37020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37021    unix_path=`$CYGPATH -u "$windows_path"`
37022    new_path="$unix_path"
37023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37025    new_path="$unix_path"
37026  fi
37027
37028    # remove trailing .exe if any
37029    new_path="${new_path/%.exe/}"
37030
37031    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37032    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37033  fi
37034
37035    else
37036      # We're on a unix platform. Hooray! :)
37037      # First separate the path from the arguments. This will split at the first
37038      # space.
37039      complete="$AS"
37040      path="${complete%% *}"
37041      tmp="$complete EOL"
37042      arguments="${tmp#* }"
37043
37044      # Cannot rely on the command "which" here since it doesn't always work.
37045      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37046      if test -z "$is_absolute_path"; then
37047        # Path to executable is not absolute. Find it.
37048        IFS_save="$IFS"
37049        IFS=:
37050        for p in $PATH; do
37051          if test -f "$p/$path" && test -x "$p/$path"; then
37052            new_path="$p/$path"
37053            break
37054          fi
37055        done
37056        IFS="$IFS_save"
37057      else
37058        # This is an absolute path, we can use it without further modifications.
37059        new_path="$path"
37060      fi
37061
37062      if test "x$new_path" = x; then
37063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37064$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37065        has_space=`$ECHO "$complete" | $GREP " "`
37066        if test "x$has_space" != x; then
37067          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37068$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37069        fi
37070        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37071      fi
37072    fi
37073
37074    # Now join together the path and the arguments once again
37075    if test "x$arguments" != xEOL; then
37076      new_complete="$new_path ${arguments% *}"
37077    else
37078      new_complete="$new_path"
37079    fi
37080
37081    if test "x$complete" != "x$new_complete"; then
37082      AS="$new_complete"
37083      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37084$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37085    fi
37086  fi
37087
37088    if test "x$AS" = x; then
37089      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37090    fi
37091  else
37092    # FIXME: is this correct for microsoft?
37093    AS="$CC -c"
37094  fi
37095
37096
37097  #
37098  # Setup the archiver (AR)
37099  #
37100  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37101    # The corresponding ar tool is lib.exe (used to create static libraries)
37102    # Extract the first word of "lib", so it can be a program name with args.
37103set dummy lib; ac_word=$2
37104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37105$as_echo_n "checking for $ac_word... " >&6; }
37106if ${ac_cv_prog_AR+:} false; then :
37107  $as_echo_n "(cached) " >&6
37108else
37109  if test -n "$AR"; then
37110  ac_cv_prog_AR="$AR" # Let the user override the test.
37111else
37112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37113for as_dir in $PATH
37114do
37115  IFS=$as_save_IFS
37116  test -z "$as_dir" && as_dir=.
37117    for ac_exec_ext in '' $ac_executable_extensions; do
37118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37119    ac_cv_prog_AR="lib"
37120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37121    break 2
37122  fi
37123done
37124  done
37125IFS=$as_save_IFS
37126
37127fi
37128fi
37129AR=$ac_cv_prog_AR
37130if test -n "$AR"; then
37131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37132$as_echo "$AR" >&6; }
37133else
37134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37135$as_echo "no" >&6; }
37136fi
37137
37138
37139  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37140
37141
37142  # Publish this variable in the help.
37143
37144
37145  if [ -z "${AR+x}" ]; then
37146    # The variable is not set by user, try to locate tool using the code snippet
37147    if test -n "$ac_tool_prefix"; then
37148  for ac_prog in ar gcc-ar
37149  do
37150    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37151set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37153$as_echo_n "checking for $ac_word... " >&6; }
37154if ${ac_cv_prog_AR+:} false; then :
37155  $as_echo_n "(cached) " >&6
37156else
37157  if test -n "$AR"; then
37158  ac_cv_prog_AR="$AR" # Let the user override the test.
37159else
37160as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37161for as_dir in $PATH
37162do
37163  IFS=$as_save_IFS
37164  test -z "$as_dir" && as_dir=.
37165    for ac_exec_ext in '' $ac_executable_extensions; do
37166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37167    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37169    break 2
37170  fi
37171done
37172  done
37173IFS=$as_save_IFS
37174
37175fi
37176fi
37177AR=$ac_cv_prog_AR
37178if test -n "$AR"; then
37179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37180$as_echo "$AR" >&6; }
37181else
37182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37183$as_echo "no" >&6; }
37184fi
37185
37186
37187    test -n "$AR" && break
37188  done
37189fi
37190if test -z "$AR"; then
37191  ac_ct_AR=$AR
37192  for ac_prog in ar gcc-ar
37193do
37194  # Extract the first word of "$ac_prog", so it can be a program name with args.
37195set dummy $ac_prog; ac_word=$2
37196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37197$as_echo_n "checking for $ac_word... " >&6; }
37198if ${ac_cv_prog_ac_ct_AR+:} false; then :
37199  $as_echo_n "(cached) " >&6
37200else
37201  if test -n "$ac_ct_AR"; then
37202  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37203else
37204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37205for as_dir in $PATH
37206do
37207  IFS=$as_save_IFS
37208  test -z "$as_dir" && as_dir=.
37209    for ac_exec_ext in '' $ac_executable_extensions; do
37210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37211    ac_cv_prog_ac_ct_AR="$ac_prog"
37212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37213    break 2
37214  fi
37215done
37216  done
37217IFS=$as_save_IFS
37218
37219fi
37220fi
37221ac_ct_AR=$ac_cv_prog_ac_ct_AR
37222if test -n "$ac_ct_AR"; then
37223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37224$as_echo "$ac_ct_AR" >&6; }
37225else
37226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37227$as_echo "no" >&6; }
37228fi
37229
37230
37231  test -n "$ac_ct_AR" && break
37232done
37233
37234  if test "x$ac_ct_AR" = x; then
37235    AR=""
37236  else
37237    case $cross_compiling:$ac_tool_warned in
37238yes:)
37239{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37240$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37241ac_tool_warned=yes ;;
37242esac
37243    AR=$ac_ct_AR
37244  fi
37245fi
37246
37247  else
37248    # The variable is set, but is it from the command line or the environment?
37249
37250    # Try to remove the string !AR! from our list.
37251    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37252    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37253      # If it failed, the variable was not from the command line. Ignore it,
37254      # but warn the user (except for BASH, which is always set by the calling BASH).
37255      if test "xAR" != xBASH; then
37256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37257$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37258      fi
37259      # Try to locate tool using the code snippet
37260      if test -n "$ac_tool_prefix"; then
37261  for ac_prog in ar gcc-ar
37262  do
37263    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37264set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37266$as_echo_n "checking for $ac_word... " >&6; }
37267if ${ac_cv_prog_AR+:} false; then :
37268  $as_echo_n "(cached) " >&6
37269else
37270  if test -n "$AR"; then
37271  ac_cv_prog_AR="$AR" # Let the user override the test.
37272else
37273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37274for as_dir in $PATH
37275do
37276  IFS=$as_save_IFS
37277  test -z "$as_dir" && as_dir=.
37278    for ac_exec_ext in '' $ac_executable_extensions; do
37279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37280    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37282    break 2
37283  fi
37284done
37285  done
37286IFS=$as_save_IFS
37287
37288fi
37289fi
37290AR=$ac_cv_prog_AR
37291if test -n "$AR"; then
37292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37293$as_echo "$AR" >&6; }
37294else
37295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37296$as_echo "no" >&6; }
37297fi
37298
37299
37300    test -n "$AR" && break
37301  done
37302fi
37303if test -z "$AR"; then
37304  ac_ct_AR=$AR
37305  for ac_prog in ar gcc-ar
37306do
37307  # Extract the first word of "$ac_prog", so it can be a program name with args.
37308set dummy $ac_prog; ac_word=$2
37309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37310$as_echo_n "checking for $ac_word... " >&6; }
37311if ${ac_cv_prog_ac_ct_AR+:} false; then :
37312  $as_echo_n "(cached) " >&6
37313else
37314  if test -n "$ac_ct_AR"; then
37315  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37316else
37317as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37318for as_dir in $PATH
37319do
37320  IFS=$as_save_IFS
37321  test -z "$as_dir" && as_dir=.
37322    for ac_exec_ext in '' $ac_executable_extensions; do
37323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37324    ac_cv_prog_ac_ct_AR="$ac_prog"
37325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37326    break 2
37327  fi
37328done
37329  done
37330IFS=$as_save_IFS
37331
37332fi
37333fi
37334ac_ct_AR=$ac_cv_prog_ac_ct_AR
37335if test -n "$ac_ct_AR"; then
37336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37337$as_echo "$ac_ct_AR" >&6; }
37338else
37339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37340$as_echo "no" >&6; }
37341fi
37342
37343
37344  test -n "$ac_ct_AR" && break
37345done
37346
37347  if test "x$ac_ct_AR" = x; then
37348    AR=""
37349  else
37350    case $cross_compiling:$ac_tool_warned in
37351yes:)
37352{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37353$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37354ac_tool_warned=yes ;;
37355esac
37356    AR=$ac_ct_AR
37357  fi
37358fi
37359
37360    else
37361      # If it succeeded, then it was overridden by the user. We will use it
37362      # for the tool.
37363
37364      # First remove it from the list of overridden variables, so we can test
37365      # for unknown variables in the end.
37366      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37367
37368      # Check if we try to supply an empty value
37369      if test "x$AR" = x; then
37370        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37371$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37372        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37373$as_echo_n "checking for AR... " >&6; }
37374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37375$as_echo "disabled" >&6; }
37376      else
37377        # Check if the provided tool contains a complete path.
37378        tool_specified="$AR"
37379        tool_basename="${tool_specified##*/}"
37380        if test "x$tool_basename" = "x$tool_specified"; then
37381          # A command without a complete path is provided, search $PATH.
37382          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37383$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37384          # Extract the first word of "$tool_basename", so it can be a program name with args.
37385set dummy $tool_basename; ac_word=$2
37386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37387$as_echo_n "checking for $ac_word... " >&6; }
37388if ${ac_cv_path_AR+:} false; then :
37389  $as_echo_n "(cached) " >&6
37390else
37391  case $AR in
37392  [\\/]* | ?:[\\/]*)
37393  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37394  ;;
37395  *)
37396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37397for as_dir in $PATH
37398do
37399  IFS=$as_save_IFS
37400  test -z "$as_dir" && as_dir=.
37401    for ac_exec_ext in '' $ac_executable_extensions; do
37402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37403    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37405    break 2
37406  fi
37407done
37408  done
37409IFS=$as_save_IFS
37410
37411  ;;
37412esac
37413fi
37414AR=$ac_cv_path_AR
37415if test -n "$AR"; then
37416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37417$as_echo "$AR" >&6; }
37418else
37419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37420$as_echo "no" >&6; }
37421fi
37422
37423
37424          if test "x$AR" = x; then
37425            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37426          fi
37427        else
37428          # Otherwise we believe it is a complete path. Use it as it is.
37429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37430$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37431          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37432$as_echo_n "checking for AR... " >&6; }
37433          if test ! -x "$tool_specified"; then
37434            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37435$as_echo "not found" >&6; }
37436            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37437          fi
37438          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37439$as_echo "$tool_specified" >&6; }
37440        fi
37441      fi
37442    fi
37443
37444  fi
37445
37446
37447  else
37448
37449
37450  # Publish this variable in the help.
37451
37452
37453  if [ -z "${AR+x}" ]; then
37454    # The variable is not set by user, try to locate tool using the code snippet
37455    if test -n "$ac_tool_prefix"; then
37456  for ac_prog in ar
37457  do
37458    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37459set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37461$as_echo_n "checking for $ac_word... " >&6; }
37462if ${ac_cv_prog_AR+:} false; then :
37463  $as_echo_n "(cached) " >&6
37464else
37465  if test -n "$AR"; then
37466  ac_cv_prog_AR="$AR" # Let the user override the test.
37467else
37468as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37469for as_dir in $PATH
37470do
37471  IFS=$as_save_IFS
37472  test -z "$as_dir" && as_dir=.
37473    for ac_exec_ext in '' $ac_executable_extensions; do
37474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37475    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37477    break 2
37478  fi
37479done
37480  done
37481IFS=$as_save_IFS
37482
37483fi
37484fi
37485AR=$ac_cv_prog_AR
37486if test -n "$AR"; then
37487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37488$as_echo "$AR" >&6; }
37489else
37490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37491$as_echo "no" >&6; }
37492fi
37493
37494
37495    test -n "$AR" && break
37496  done
37497fi
37498if test -z "$AR"; then
37499  ac_ct_AR=$AR
37500  for ac_prog in ar
37501do
37502  # Extract the first word of "$ac_prog", so it can be a program name with args.
37503set dummy $ac_prog; ac_word=$2
37504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37505$as_echo_n "checking for $ac_word... " >&6; }
37506if ${ac_cv_prog_ac_ct_AR+:} false; then :
37507  $as_echo_n "(cached) " >&6
37508else
37509  if test -n "$ac_ct_AR"; then
37510  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37511else
37512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37513for as_dir in $PATH
37514do
37515  IFS=$as_save_IFS
37516  test -z "$as_dir" && as_dir=.
37517    for ac_exec_ext in '' $ac_executable_extensions; do
37518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37519    ac_cv_prog_ac_ct_AR="$ac_prog"
37520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37521    break 2
37522  fi
37523done
37524  done
37525IFS=$as_save_IFS
37526
37527fi
37528fi
37529ac_ct_AR=$ac_cv_prog_ac_ct_AR
37530if test -n "$ac_ct_AR"; then
37531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37532$as_echo "$ac_ct_AR" >&6; }
37533else
37534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37535$as_echo "no" >&6; }
37536fi
37537
37538
37539  test -n "$ac_ct_AR" && break
37540done
37541
37542  if test "x$ac_ct_AR" = x; then
37543    AR=""
37544  else
37545    case $cross_compiling:$ac_tool_warned in
37546yes:)
37547{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37548$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37549ac_tool_warned=yes ;;
37550esac
37551    AR=$ac_ct_AR
37552  fi
37553fi
37554
37555  else
37556    # The variable is set, but is it from the command line or the environment?
37557
37558    # Try to remove the string !AR! from our list.
37559    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37560    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37561      # If it failed, the variable was not from the command line. Ignore it,
37562      # but warn the user (except for BASH, which is always set by the calling BASH).
37563      if test "xAR" != xBASH; then
37564        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37565$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37566      fi
37567      # Try to locate tool using the code snippet
37568      if test -n "$ac_tool_prefix"; then
37569  for ac_prog in ar
37570  do
37571    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37572set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37574$as_echo_n "checking for $ac_word... " >&6; }
37575if ${ac_cv_prog_AR+:} false; then :
37576  $as_echo_n "(cached) " >&6
37577else
37578  if test -n "$AR"; then
37579  ac_cv_prog_AR="$AR" # Let the user override the test.
37580else
37581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37582for as_dir in $PATH
37583do
37584  IFS=$as_save_IFS
37585  test -z "$as_dir" && as_dir=.
37586    for ac_exec_ext in '' $ac_executable_extensions; do
37587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37588    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37590    break 2
37591  fi
37592done
37593  done
37594IFS=$as_save_IFS
37595
37596fi
37597fi
37598AR=$ac_cv_prog_AR
37599if test -n "$AR"; then
37600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37601$as_echo "$AR" >&6; }
37602else
37603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37604$as_echo "no" >&6; }
37605fi
37606
37607
37608    test -n "$AR" && break
37609  done
37610fi
37611if test -z "$AR"; then
37612  ac_ct_AR=$AR
37613  for ac_prog in ar
37614do
37615  # Extract the first word of "$ac_prog", so it can be a program name with args.
37616set dummy $ac_prog; ac_word=$2
37617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37618$as_echo_n "checking for $ac_word... " >&6; }
37619if ${ac_cv_prog_ac_ct_AR+:} false; then :
37620  $as_echo_n "(cached) " >&6
37621else
37622  if test -n "$ac_ct_AR"; then
37623  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37624else
37625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37626for as_dir in $PATH
37627do
37628  IFS=$as_save_IFS
37629  test -z "$as_dir" && as_dir=.
37630    for ac_exec_ext in '' $ac_executable_extensions; do
37631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37632    ac_cv_prog_ac_ct_AR="$ac_prog"
37633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37634    break 2
37635  fi
37636done
37637  done
37638IFS=$as_save_IFS
37639
37640fi
37641fi
37642ac_ct_AR=$ac_cv_prog_ac_ct_AR
37643if test -n "$ac_ct_AR"; then
37644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37645$as_echo "$ac_ct_AR" >&6; }
37646else
37647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37648$as_echo "no" >&6; }
37649fi
37650
37651
37652  test -n "$ac_ct_AR" && break
37653done
37654
37655  if test "x$ac_ct_AR" = x; then
37656    AR=""
37657  else
37658    case $cross_compiling:$ac_tool_warned in
37659yes:)
37660{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37661$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37662ac_tool_warned=yes ;;
37663esac
37664    AR=$ac_ct_AR
37665  fi
37666fi
37667
37668    else
37669      # If it succeeded, then it was overridden by the user. We will use it
37670      # for the tool.
37671
37672      # First remove it from the list of overridden variables, so we can test
37673      # for unknown variables in the end.
37674      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37675
37676      # Check if we try to supply an empty value
37677      if test "x$AR" = x; then
37678        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37679$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37680        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37681$as_echo_n "checking for AR... " >&6; }
37682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37683$as_echo "disabled" >&6; }
37684      else
37685        # Check if the provided tool contains a complete path.
37686        tool_specified="$AR"
37687        tool_basename="${tool_specified##*/}"
37688        if test "x$tool_basename" = "x$tool_specified"; then
37689          # A command without a complete path is provided, search $PATH.
37690          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37691$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37692          # Extract the first word of "$tool_basename", so it can be a program name with args.
37693set dummy $tool_basename; ac_word=$2
37694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37695$as_echo_n "checking for $ac_word... " >&6; }
37696if ${ac_cv_path_AR+:} false; then :
37697  $as_echo_n "(cached) " >&6
37698else
37699  case $AR in
37700  [\\/]* | ?:[\\/]*)
37701  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37702  ;;
37703  *)
37704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37705for as_dir in $PATH
37706do
37707  IFS=$as_save_IFS
37708  test -z "$as_dir" && as_dir=.
37709    for ac_exec_ext in '' $ac_executable_extensions; do
37710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37711    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37713    break 2
37714  fi
37715done
37716  done
37717IFS=$as_save_IFS
37718
37719  ;;
37720esac
37721fi
37722AR=$ac_cv_path_AR
37723if test -n "$AR"; then
37724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37725$as_echo "$AR" >&6; }
37726else
37727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37728$as_echo "no" >&6; }
37729fi
37730
37731
37732          if test "x$AR" = x; then
37733            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37734          fi
37735        else
37736          # Otherwise we believe it is a complete path. Use it as it is.
37737          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37738$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37739          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37740$as_echo_n "checking for AR... " >&6; }
37741          if test ! -x "$tool_specified"; then
37742            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37743$as_echo "not found" >&6; }
37744            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37745          fi
37746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37747$as_echo "$tool_specified" >&6; }
37748        fi
37749      fi
37750    fi
37751
37752  fi
37753
37754
37755  fi
37756
37757  # Only process if variable expands to non-empty
37758
37759  if test "x$AR" != x; then
37760    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37761
37762  # First separate the path from the arguments. This will split at the first
37763  # space.
37764  complete="$AR"
37765  path="${complete%% *}"
37766  tmp="$complete EOL"
37767  arguments="${tmp#* }"
37768
37769  # Input might be given as Windows format, start by converting to
37770  # unix format.
37771  new_path=`$CYGPATH -u "$path"`
37772
37773  # Now try to locate executable using which
37774  new_path=`$WHICH "$new_path" 2> /dev/null`
37775  # bat and cmd files are not always considered executable in cygwin causing which
37776  # to not find them
37777  if test "x$new_path" = x \
37778      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37779      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37780    new_path=`$CYGPATH -u "$path"`
37781  fi
37782  if test "x$new_path" = x; then
37783    # Oops. Which didn't find the executable.
37784    # The splitting of arguments from the executable at a space might have been incorrect,
37785    # since paths with space are more likely in Windows. Give it another try with the whole
37786    # argument.
37787    path="$complete"
37788    arguments="EOL"
37789    new_path=`$CYGPATH -u "$path"`
37790    new_path=`$WHICH "$new_path" 2> /dev/null`
37791    # bat and cmd files are not always considered executable in cygwin causing which
37792    # to not find them
37793    if test "x$new_path" = x \
37794        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37795        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37796      new_path=`$CYGPATH -u "$path"`
37797    fi
37798    if test "x$new_path" = x; then
37799      # It's still not found. Now this is an unrecoverable error.
37800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37801$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37802      has_space=`$ECHO "$complete" | $GREP " "`
37803      if test "x$has_space" != x; then
37804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37806      fi
37807      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37808    fi
37809  fi
37810
37811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37814  # "foo.exe" is OK but "foo" is an error.
37815  #
37816  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37817  # It is also a way to make sure we got the proper file name for the real test later on.
37818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37819  if test "x$test_shortpath" = x; then
37820    # Short path failed, file does not exist as specified.
37821    # Try adding .exe or .cmd
37822    if test -f "${new_path}.exe"; then
37823      input_to_shortpath="${new_path}.exe"
37824    elif test -f "${new_path}.cmd"; then
37825      input_to_shortpath="${new_path}.cmd"
37826    else
37827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37828$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37829      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37830$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37831      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37832    fi
37833  else
37834    input_to_shortpath="$new_path"
37835  fi
37836
37837  # Call helper function which possibly converts this using DOS-style short mode.
37838  # If so, the updated path is stored in $new_path.
37839  new_path="$input_to_shortpath"
37840
37841  input_path="$input_to_shortpath"
37842  # Check if we need to convert this using DOS-style short mode. If the path
37843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37844  # take no chances and rewrite it.
37845  # Note: m4 eats our [], so we need to use [ and ] instead.
37846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37847  if test "x$has_forbidden_chars" != x; then
37848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37852      # Going to short mode and back again did indeed matter. Since short mode is
37853      # case insensitive, let's make it lowercase to improve readability.
37854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37855      # Now convert it back to Unix-style (cygpath)
37856      input_path=`$CYGPATH -u "$shortmode_path"`
37857      new_path="$input_path"
37858    fi
37859  fi
37860
37861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37862  if test "x$test_cygdrive_prefix" = x; then
37863    # As a simple fix, exclude /usr/bin since it's not a real path.
37864    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37866      # a path prefixed by /cygdrive for fixpath to work.
37867      new_path="$CYGWIN_ROOT_PATH$input_path"
37868    fi
37869  fi
37870
37871  # remove trailing .exe if any
37872  new_path="${new_path/%.exe/}"
37873
37874    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37875
37876  # First separate the path from the arguments. This will split at the first
37877  # space.
37878  complete="$AR"
37879  path="${complete%% *}"
37880  tmp="$complete EOL"
37881  arguments="${tmp#* }"
37882
37883  # Input might be given as Windows format, start by converting to
37884  # unix format.
37885  new_path="$path"
37886
37887  windows_path="$new_path"
37888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37889    unix_path=`$CYGPATH -u "$windows_path"`
37890    new_path="$unix_path"
37891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37893    new_path="$unix_path"
37894  fi
37895
37896
37897  # Now try to locate executable using which
37898  new_path=`$WHICH "$new_path" 2> /dev/null`
37899
37900  if test "x$new_path" = x; then
37901    # Oops. Which didn't find the executable.
37902    # The splitting of arguments from the executable at a space might have been incorrect,
37903    # since paths with space are more likely in Windows. Give it another try with the whole
37904    # argument.
37905    path="$complete"
37906    arguments="EOL"
37907    new_path="$path"
37908
37909  windows_path="$new_path"
37910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37911    unix_path=`$CYGPATH -u "$windows_path"`
37912    new_path="$unix_path"
37913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37915    new_path="$unix_path"
37916  fi
37917
37918
37919    new_path=`$WHICH "$new_path" 2> /dev/null`
37920    # bat and cmd files are not always considered executable in MSYS causing which
37921    # to not find them
37922    if test "x$new_path" = x \
37923        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37924        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37925      new_path="$path"
37926
37927  windows_path="$new_path"
37928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37929    unix_path=`$CYGPATH -u "$windows_path"`
37930    new_path="$unix_path"
37931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37933    new_path="$unix_path"
37934  fi
37935
37936    fi
37937
37938    if test "x$new_path" = x; then
37939      # It's still not found. Now this is an unrecoverable error.
37940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37941$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37942      has_space=`$ECHO "$complete" | $GREP " "`
37943      if test "x$has_space" != x; then
37944        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37945$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37946      fi
37947      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37948    fi
37949  fi
37950
37951  # Now new_path has a complete unix path to the binary
37952  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37953    # Keep paths in /bin as-is, but remove trailing .exe if any
37954    new_path="${new_path/%.exe/}"
37955    # Do not save /bin paths to all_fixpath_prefixes!
37956  else
37957    # Not in mixed or Windows style, start by that.
37958    new_path=`cmd //c echo $new_path`
37959
37960  input_path="$new_path"
37961  # Check if we need to convert this using DOS-style short mode. If the path
37962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37963  # take no chances and rewrite it.
37964  # Note: m4 eats our [], so we need to use [ and ] instead.
37965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37966  if test "x$has_forbidden_chars" != x; then
37967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37969  fi
37970
37971    # Output is in $new_path
37972
37973  windows_path="$new_path"
37974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37975    unix_path=`$CYGPATH -u "$windows_path"`
37976    new_path="$unix_path"
37977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37979    new_path="$unix_path"
37980  fi
37981
37982    # remove trailing .exe if any
37983    new_path="${new_path/%.exe/}"
37984
37985    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37986    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37987  fi
37988
37989    else
37990      # We're on a unix platform. Hooray! :)
37991      # First separate the path from the arguments. This will split at the first
37992      # space.
37993      complete="$AR"
37994      path="${complete%% *}"
37995      tmp="$complete EOL"
37996      arguments="${tmp#* }"
37997
37998      # Cannot rely on the command "which" here since it doesn't always work.
37999      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38000      if test -z "$is_absolute_path"; then
38001        # Path to executable is not absolute. Find it.
38002        IFS_save="$IFS"
38003        IFS=:
38004        for p in $PATH; do
38005          if test -f "$p/$path" && test -x "$p/$path"; then
38006            new_path="$p/$path"
38007            break
38008          fi
38009        done
38010        IFS="$IFS_save"
38011      else
38012        # This is an absolute path, we can use it without further modifications.
38013        new_path="$path"
38014      fi
38015
38016      if test "x$new_path" = x; then
38017        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38018$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38019        has_space=`$ECHO "$complete" | $GREP " "`
38020        if test "x$has_space" != x; then
38021          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38022$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38023        fi
38024        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38025      fi
38026    fi
38027
38028    # Now join together the path and the arguments once again
38029    if test "x$arguments" != xEOL; then
38030      new_complete="$new_path ${arguments% *}"
38031    else
38032      new_complete="$new_path"
38033    fi
38034
38035    if test "x$complete" != "x$new_complete"; then
38036      AR="$new_complete"
38037      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38038$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38039    fi
38040  fi
38041
38042
38043
38044  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38045
38046
38047  # Publish this variable in the help.
38048
38049
38050  if [ -z "${LIPO+x}" ]; then
38051    # The variable is not set by user, try to locate tool using the code snippet
38052    for ac_prog in lipo
38053do
38054  # Extract the first word of "$ac_prog", so it can be a program name with args.
38055set dummy $ac_prog; ac_word=$2
38056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38057$as_echo_n "checking for $ac_word... " >&6; }
38058if ${ac_cv_path_LIPO+:} false; then :
38059  $as_echo_n "(cached) " >&6
38060else
38061  case $LIPO in
38062  [\\/]* | ?:[\\/]*)
38063  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38064  ;;
38065  *)
38066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38067for as_dir in $PATH
38068do
38069  IFS=$as_save_IFS
38070  test -z "$as_dir" && as_dir=.
38071    for ac_exec_ext in '' $ac_executable_extensions; do
38072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38073    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38075    break 2
38076  fi
38077done
38078  done
38079IFS=$as_save_IFS
38080
38081  ;;
38082esac
38083fi
38084LIPO=$ac_cv_path_LIPO
38085if test -n "$LIPO"; then
38086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38087$as_echo "$LIPO" >&6; }
38088else
38089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38090$as_echo "no" >&6; }
38091fi
38092
38093
38094  test -n "$LIPO" && break
38095done
38096
38097  else
38098    # The variable is set, but is it from the command line or the environment?
38099
38100    # Try to remove the string !LIPO! from our list.
38101    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38102    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38103      # If it failed, the variable was not from the command line. Ignore it,
38104      # but warn the user (except for BASH, which is always set by the calling BASH).
38105      if test "xLIPO" != xBASH; then
38106        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38107$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38108      fi
38109      # Try to locate tool using the code snippet
38110      for ac_prog in lipo
38111do
38112  # Extract the first word of "$ac_prog", so it can be a program name with args.
38113set dummy $ac_prog; ac_word=$2
38114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38115$as_echo_n "checking for $ac_word... " >&6; }
38116if ${ac_cv_path_LIPO+:} false; then :
38117  $as_echo_n "(cached) " >&6
38118else
38119  case $LIPO in
38120  [\\/]* | ?:[\\/]*)
38121  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38122  ;;
38123  *)
38124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38125for as_dir in $PATH
38126do
38127  IFS=$as_save_IFS
38128  test -z "$as_dir" && as_dir=.
38129    for ac_exec_ext in '' $ac_executable_extensions; do
38130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38131    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38133    break 2
38134  fi
38135done
38136  done
38137IFS=$as_save_IFS
38138
38139  ;;
38140esac
38141fi
38142LIPO=$ac_cv_path_LIPO
38143if test -n "$LIPO"; then
38144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38145$as_echo "$LIPO" >&6; }
38146else
38147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38148$as_echo "no" >&6; }
38149fi
38150
38151
38152  test -n "$LIPO" && break
38153done
38154
38155    else
38156      # If it succeeded, then it was overridden by the user. We will use it
38157      # for the tool.
38158
38159      # First remove it from the list of overridden variables, so we can test
38160      # for unknown variables in the end.
38161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38162
38163      # Check if we try to supply an empty value
38164      if test "x$LIPO" = x; then
38165        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38166$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38167        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38168$as_echo_n "checking for LIPO... " >&6; }
38169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38170$as_echo "disabled" >&6; }
38171      else
38172        # Check if the provided tool contains a complete path.
38173        tool_specified="$LIPO"
38174        tool_basename="${tool_specified##*/}"
38175        if test "x$tool_basename" = "x$tool_specified"; then
38176          # A command without a complete path is provided, search $PATH.
38177          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38178$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38179          # Extract the first word of "$tool_basename", so it can be a program name with args.
38180set dummy $tool_basename; ac_word=$2
38181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38182$as_echo_n "checking for $ac_word... " >&6; }
38183if ${ac_cv_path_LIPO+:} false; then :
38184  $as_echo_n "(cached) " >&6
38185else
38186  case $LIPO in
38187  [\\/]* | ?:[\\/]*)
38188  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38189  ;;
38190  *)
38191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38192for as_dir in $PATH
38193do
38194  IFS=$as_save_IFS
38195  test -z "$as_dir" && as_dir=.
38196    for ac_exec_ext in '' $ac_executable_extensions; do
38197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38198    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38200    break 2
38201  fi
38202done
38203  done
38204IFS=$as_save_IFS
38205
38206  ;;
38207esac
38208fi
38209LIPO=$ac_cv_path_LIPO
38210if test -n "$LIPO"; then
38211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38212$as_echo "$LIPO" >&6; }
38213else
38214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38215$as_echo "no" >&6; }
38216fi
38217
38218
38219          if test "x$LIPO" = x; then
38220            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38221          fi
38222        else
38223          # Otherwise we believe it is a complete path. Use it as it is.
38224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38225$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38226          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38227$as_echo_n "checking for LIPO... " >&6; }
38228          if test ! -x "$tool_specified"; then
38229            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38230$as_echo "not found" >&6; }
38231            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38232          fi
38233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38234$as_echo "$tool_specified" >&6; }
38235        fi
38236      fi
38237    fi
38238
38239  fi
38240
38241
38242
38243  # Only process if variable expands to non-empty
38244
38245  if test "x$LIPO" != x; then
38246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38247
38248  # First separate the path from the arguments. This will split at the first
38249  # space.
38250  complete="$LIPO"
38251  path="${complete%% *}"
38252  tmp="$complete EOL"
38253  arguments="${tmp#* }"
38254
38255  # Input might be given as Windows format, start by converting to
38256  # unix format.
38257  new_path=`$CYGPATH -u "$path"`
38258
38259  # Now try to locate executable using which
38260  new_path=`$WHICH "$new_path" 2> /dev/null`
38261  # bat and cmd files are not always considered executable in cygwin causing which
38262  # to not find them
38263  if test "x$new_path" = x \
38264      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38265      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38266    new_path=`$CYGPATH -u "$path"`
38267  fi
38268  if test "x$new_path" = x; then
38269    # Oops. Which didn't find the executable.
38270    # The splitting of arguments from the executable at a space might have been incorrect,
38271    # since paths with space are more likely in Windows. Give it another try with the whole
38272    # argument.
38273    path="$complete"
38274    arguments="EOL"
38275    new_path=`$CYGPATH -u "$path"`
38276    new_path=`$WHICH "$new_path" 2> /dev/null`
38277    # bat and cmd files are not always considered executable in cygwin causing which
38278    # to not find them
38279    if test "x$new_path" = x \
38280        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38281        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38282      new_path=`$CYGPATH -u "$path"`
38283    fi
38284    if test "x$new_path" = x; then
38285      # It's still not found. Now this is an unrecoverable error.
38286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38287$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38288      has_space=`$ECHO "$complete" | $GREP " "`
38289      if test "x$has_space" != x; then
38290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38292      fi
38293      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38294    fi
38295  fi
38296
38297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38300  # "foo.exe" is OK but "foo" is an error.
38301  #
38302  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38303  # It is also a way to make sure we got the proper file name for the real test later on.
38304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38305  if test "x$test_shortpath" = x; then
38306    # Short path failed, file does not exist as specified.
38307    # Try adding .exe or .cmd
38308    if test -f "${new_path}.exe"; then
38309      input_to_shortpath="${new_path}.exe"
38310    elif test -f "${new_path}.cmd"; then
38311      input_to_shortpath="${new_path}.cmd"
38312    else
38313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38314$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38315      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38316$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38317      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38318    fi
38319  else
38320    input_to_shortpath="$new_path"
38321  fi
38322
38323  # Call helper function which possibly converts this using DOS-style short mode.
38324  # If so, the updated path is stored in $new_path.
38325  new_path="$input_to_shortpath"
38326
38327  input_path="$input_to_shortpath"
38328  # Check if we need to convert this using DOS-style short mode. If the path
38329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38330  # take no chances and rewrite it.
38331  # Note: m4 eats our [], so we need to use [ and ] instead.
38332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38333  if test "x$has_forbidden_chars" != x; then
38334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38338      # Going to short mode and back again did indeed matter. Since short mode is
38339      # case insensitive, let's make it lowercase to improve readability.
38340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38341      # Now convert it back to Unix-style (cygpath)
38342      input_path=`$CYGPATH -u "$shortmode_path"`
38343      new_path="$input_path"
38344    fi
38345  fi
38346
38347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38348  if test "x$test_cygdrive_prefix" = x; then
38349    # As a simple fix, exclude /usr/bin since it's not a real path.
38350    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38352      # a path prefixed by /cygdrive for fixpath to work.
38353      new_path="$CYGWIN_ROOT_PATH$input_path"
38354    fi
38355  fi
38356
38357  # remove trailing .exe if any
38358  new_path="${new_path/%.exe/}"
38359
38360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38361
38362  # First separate the path from the arguments. This will split at the first
38363  # space.
38364  complete="$LIPO"
38365  path="${complete%% *}"
38366  tmp="$complete EOL"
38367  arguments="${tmp#* }"
38368
38369  # Input might be given as Windows format, start by converting to
38370  # unix format.
38371  new_path="$path"
38372
38373  windows_path="$new_path"
38374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38375    unix_path=`$CYGPATH -u "$windows_path"`
38376    new_path="$unix_path"
38377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38379    new_path="$unix_path"
38380  fi
38381
38382
38383  # Now try to locate executable using which
38384  new_path=`$WHICH "$new_path" 2> /dev/null`
38385
38386  if test "x$new_path" = x; then
38387    # Oops. Which didn't find the executable.
38388    # The splitting of arguments from the executable at a space might have been incorrect,
38389    # since paths with space are more likely in Windows. Give it another try with the whole
38390    # argument.
38391    path="$complete"
38392    arguments="EOL"
38393    new_path="$path"
38394
38395  windows_path="$new_path"
38396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38397    unix_path=`$CYGPATH -u "$windows_path"`
38398    new_path="$unix_path"
38399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38401    new_path="$unix_path"
38402  fi
38403
38404
38405    new_path=`$WHICH "$new_path" 2> /dev/null`
38406    # bat and cmd files are not always considered executable in MSYS causing which
38407    # to not find them
38408    if test "x$new_path" = x \
38409        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38410        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38411      new_path="$path"
38412
38413  windows_path="$new_path"
38414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38415    unix_path=`$CYGPATH -u "$windows_path"`
38416    new_path="$unix_path"
38417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38419    new_path="$unix_path"
38420  fi
38421
38422    fi
38423
38424    if test "x$new_path" = x; then
38425      # It's still not found. Now this is an unrecoverable error.
38426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38427$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38428      has_space=`$ECHO "$complete" | $GREP " "`
38429      if test "x$has_space" != x; then
38430        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38431$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38432      fi
38433      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38434    fi
38435  fi
38436
38437  # Now new_path has a complete unix path to the binary
38438  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38439    # Keep paths in /bin as-is, but remove trailing .exe if any
38440    new_path="${new_path/%.exe/}"
38441    # Do not save /bin paths to all_fixpath_prefixes!
38442  else
38443    # Not in mixed or Windows style, start by that.
38444    new_path=`cmd //c echo $new_path`
38445
38446  input_path="$new_path"
38447  # Check if we need to convert this using DOS-style short mode. If the path
38448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38449  # take no chances and rewrite it.
38450  # Note: m4 eats our [], so we need to use [ and ] instead.
38451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38452  if test "x$has_forbidden_chars" != x; then
38453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38455  fi
38456
38457    # Output is in $new_path
38458
38459  windows_path="$new_path"
38460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38461    unix_path=`$CYGPATH -u "$windows_path"`
38462    new_path="$unix_path"
38463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38465    new_path="$unix_path"
38466  fi
38467
38468    # remove trailing .exe if any
38469    new_path="${new_path/%.exe/}"
38470
38471    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38472    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38473  fi
38474
38475    else
38476      # We're on a unix platform. Hooray! :)
38477      # First separate the path from the arguments. This will split at the first
38478      # space.
38479      complete="$LIPO"
38480      path="${complete%% *}"
38481      tmp="$complete EOL"
38482      arguments="${tmp#* }"
38483
38484      # Cannot rely on the command "which" here since it doesn't always work.
38485      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38486      if test -z "$is_absolute_path"; then
38487        # Path to executable is not absolute. Find it.
38488        IFS_save="$IFS"
38489        IFS=:
38490        for p in $PATH; do
38491          if test -f "$p/$path" && test -x "$p/$path"; then
38492            new_path="$p/$path"
38493            break
38494          fi
38495        done
38496        IFS="$IFS_save"
38497      else
38498        # This is an absolute path, we can use it without further modifications.
38499        new_path="$path"
38500      fi
38501
38502      if test "x$new_path" = x; then
38503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38504$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38505        has_space=`$ECHO "$complete" | $GREP " "`
38506        if test "x$has_space" != x; then
38507          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38508$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38509        fi
38510        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38511      fi
38512    fi
38513
38514    # Now join together the path and the arguments once again
38515    if test "x$arguments" != xEOL; then
38516      new_complete="$new_path ${arguments% *}"
38517    else
38518      new_complete="$new_path"
38519    fi
38520
38521    if test "x$complete" != "x$new_complete"; then
38522      LIPO="$new_complete"
38523      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38524$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38525    fi
38526  fi
38527
38528  fi
38529
38530  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38531    # Extract the first word of "mt", so it can be a program name with args.
38532set dummy mt; ac_word=$2
38533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38534$as_echo_n "checking for $ac_word... " >&6; }
38535if ${ac_cv_prog_MT+:} false; then :
38536  $as_echo_n "(cached) " >&6
38537else
38538  if test -n "$MT"; then
38539  ac_cv_prog_MT="$MT" # Let the user override the test.
38540else
38541  ac_prog_rejected=no
38542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38543for as_dir in $PATH
38544do
38545  IFS=$as_save_IFS
38546  test -z "$as_dir" && as_dir=.
38547    for ac_exec_ext in '' $ac_executable_extensions; do
38548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38549    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38550       ac_prog_rejected=yes
38551       continue
38552     fi
38553    ac_cv_prog_MT="mt"
38554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38555    break 2
38556  fi
38557done
38558  done
38559IFS=$as_save_IFS
38560
38561if test $ac_prog_rejected = yes; then
38562  # We found a bogon in the path, so make sure we never use it.
38563  set dummy $ac_cv_prog_MT
38564  shift
38565  if test $# != 0; then
38566    # We chose a different compiler from the bogus one.
38567    # However, it has the same basename, so the bogon will be chosen
38568    # first if we set MT to just the basename; use the full file name.
38569    shift
38570    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38571  fi
38572fi
38573fi
38574fi
38575MT=$ac_cv_prog_MT
38576if test -n "$MT"; then
38577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38578$as_echo "$MT" >&6; }
38579else
38580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38581$as_echo "no" >&6; }
38582fi
38583
38584
38585
38586  # Only process if variable expands to non-empty
38587
38588  if test "x$MT" != x; then
38589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38590
38591  # First separate the path from the arguments. This will split at the first
38592  # space.
38593  complete="$MT"
38594  path="${complete%% *}"
38595  tmp="$complete EOL"
38596  arguments="${tmp#* }"
38597
38598  # Input might be given as Windows format, start by converting to
38599  # unix format.
38600  new_path=`$CYGPATH -u "$path"`
38601
38602  # Now try to locate executable using which
38603  new_path=`$WHICH "$new_path" 2> /dev/null`
38604  # bat and cmd files are not always considered executable in cygwin causing which
38605  # to not find them
38606  if test "x$new_path" = x \
38607      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38608      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38609    new_path=`$CYGPATH -u "$path"`
38610  fi
38611  if test "x$new_path" = x; then
38612    # Oops. Which didn't find the executable.
38613    # The splitting of arguments from the executable at a space might have been incorrect,
38614    # since paths with space are more likely in Windows. Give it another try with the whole
38615    # argument.
38616    path="$complete"
38617    arguments="EOL"
38618    new_path=`$CYGPATH -u "$path"`
38619    new_path=`$WHICH "$new_path" 2> /dev/null`
38620    # bat and cmd files are not always considered executable in cygwin causing which
38621    # to not find them
38622    if test "x$new_path" = x \
38623        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38624        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38625      new_path=`$CYGPATH -u "$path"`
38626    fi
38627    if test "x$new_path" = x; then
38628      # It's still not found. Now this is an unrecoverable error.
38629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38630$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38631      has_space=`$ECHO "$complete" | $GREP " "`
38632      if test "x$has_space" != x; then
38633        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38634$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38635      fi
38636      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38637    fi
38638  fi
38639
38640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38643  # "foo.exe" is OK but "foo" is an error.
38644  #
38645  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38646  # It is also a way to make sure we got the proper file name for the real test later on.
38647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38648  if test "x$test_shortpath" = x; then
38649    # Short path failed, file does not exist as specified.
38650    # Try adding .exe or .cmd
38651    if test -f "${new_path}.exe"; then
38652      input_to_shortpath="${new_path}.exe"
38653    elif test -f "${new_path}.cmd"; then
38654      input_to_shortpath="${new_path}.cmd"
38655    else
38656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38657$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38658      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38659$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38660      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38661    fi
38662  else
38663    input_to_shortpath="$new_path"
38664  fi
38665
38666  # Call helper function which possibly converts this using DOS-style short mode.
38667  # If so, the updated path is stored in $new_path.
38668  new_path="$input_to_shortpath"
38669
38670  input_path="$input_to_shortpath"
38671  # Check if we need to convert this using DOS-style short mode. If the path
38672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38673  # take no chances and rewrite it.
38674  # Note: m4 eats our [], so we need to use [ and ] instead.
38675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38676  if test "x$has_forbidden_chars" != x; then
38677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38681      # Going to short mode and back again did indeed matter. Since short mode is
38682      # case insensitive, let's make it lowercase to improve readability.
38683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38684      # Now convert it back to Unix-style (cygpath)
38685      input_path=`$CYGPATH -u "$shortmode_path"`
38686      new_path="$input_path"
38687    fi
38688  fi
38689
38690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38691  if test "x$test_cygdrive_prefix" = x; then
38692    # As a simple fix, exclude /usr/bin since it's not a real path.
38693    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38695      # a path prefixed by /cygdrive for fixpath to work.
38696      new_path="$CYGWIN_ROOT_PATH$input_path"
38697    fi
38698  fi
38699
38700  # remove trailing .exe if any
38701  new_path="${new_path/%.exe/}"
38702
38703    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38704
38705  # First separate the path from the arguments. This will split at the first
38706  # space.
38707  complete="$MT"
38708  path="${complete%% *}"
38709  tmp="$complete EOL"
38710  arguments="${tmp#* }"
38711
38712  # Input might be given as Windows format, start by converting to
38713  # unix format.
38714  new_path="$path"
38715
38716  windows_path="$new_path"
38717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38718    unix_path=`$CYGPATH -u "$windows_path"`
38719    new_path="$unix_path"
38720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38722    new_path="$unix_path"
38723  fi
38724
38725
38726  # Now try to locate executable using which
38727  new_path=`$WHICH "$new_path" 2> /dev/null`
38728
38729  if test "x$new_path" = x; then
38730    # Oops. Which didn't find the executable.
38731    # The splitting of arguments from the executable at a space might have been incorrect,
38732    # since paths with space are more likely in Windows. Give it another try with the whole
38733    # argument.
38734    path="$complete"
38735    arguments="EOL"
38736    new_path="$path"
38737
38738  windows_path="$new_path"
38739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38740    unix_path=`$CYGPATH -u "$windows_path"`
38741    new_path="$unix_path"
38742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38744    new_path="$unix_path"
38745  fi
38746
38747
38748    new_path=`$WHICH "$new_path" 2> /dev/null`
38749    # bat and cmd files are not always considered executable in MSYS causing which
38750    # to not find them
38751    if test "x$new_path" = x \
38752        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38753        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38754      new_path="$path"
38755
38756  windows_path="$new_path"
38757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38758    unix_path=`$CYGPATH -u "$windows_path"`
38759    new_path="$unix_path"
38760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38762    new_path="$unix_path"
38763  fi
38764
38765    fi
38766
38767    if test "x$new_path" = x; then
38768      # It's still not found. Now this is an unrecoverable error.
38769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38770$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38771      has_space=`$ECHO "$complete" | $GREP " "`
38772      if test "x$has_space" != x; then
38773        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38774$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38775      fi
38776      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38777    fi
38778  fi
38779
38780  # Now new_path has a complete unix path to the binary
38781  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38782    # Keep paths in /bin as-is, but remove trailing .exe if any
38783    new_path="${new_path/%.exe/}"
38784    # Do not save /bin paths to all_fixpath_prefixes!
38785  else
38786    # Not in mixed or Windows style, start by that.
38787    new_path=`cmd //c echo $new_path`
38788
38789  input_path="$new_path"
38790  # Check if we need to convert this using DOS-style short mode. If the path
38791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38792  # take no chances and rewrite it.
38793  # Note: m4 eats our [], so we need to use [ and ] instead.
38794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38795  if test "x$has_forbidden_chars" != x; then
38796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38798  fi
38799
38800    # Output is in $new_path
38801
38802  windows_path="$new_path"
38803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38804    unix_path=`$CYGPATH -u "$windows_path"`
38805    new_path="$unix_path"
38806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38808    new_path="$unix_path"
38809  fi
38810
38811    # remove trailing .exe if any
38812    new_path="${new_path/%.exe/}"
38813
38814    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38815    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38816  fi
38817
38818    else
38819      # We're on a unix platform. Hooray! :)
38820      # First separate the path from the arguments. This will split at the first
38821      # space.
38822      complete="$MT"
38823      path="${complete%% *}"
38824      tmp="$complete EOL"
38825      arguments="${tmp#* }"
38826
38827      # Cannot rely on the command "which" here since it doesn't always work.
38828      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38829      if test -z "$is_absolute_path"; then
38830        # Path to executable is not absolute. Find it.
38831        IFS_save="$IFS"
38832        IFS=:
38833        for p in $PATH; do
38834          if test -f "$p/$path" && test -x "$p/$path"; then
38835            new_path="$p/$path"
38836            break
38837          fi
38838        done
38839        IFS="$IFS_save"
38840      else
38841        # This is an absolute path, we can use it without further modifications.
38842        new_path="$path"
38843      fi
38844
38845      if test "x$new_path" = x; then
38846        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38847$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38848        has_space=`$ECHO "$complete" | $GREP " "`
38849        if test "x$has_space" != x; then
38850          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38851$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38852        fi
38853        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38854      fi
38855    fi
38856
38857    # Now join together the path and the arguments once again
38858    if test "x$arguments" != xEOL; then
38859      new_complete="$new_path ${arguments% *}"
38860    else
38861      new_complete="$new_path"
38862    fi
38863
38864    if test "x$complete" != "x$new_complete"; then
38865      MT="$new_complete"
38866      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38867$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38868    fi
38869  fi
38870
38871    # Setup the resource compiler (RC)
38872    # Extract the first word of "rc", so it can be a program name with args.
38873set dummy rc; ac_word=$2
38874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38875$as_echo_n "checking for $ac_word... " >&6; }
38876if ${ac_cv_prog_RC+:} false; then :
38877  $as_echo_n "(cached) " >&6
38878else
38879  if test -n "$RC"; then
38880  ac_cv_prog_RC="$RC" # Let the user override the test.
38881else
38882  ac_prog_rejected=no
38883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38884for as_dir in $PATH
38885do
38886  IFS=$as_save_IFS
38887  test -z "$as_dir" && as_dir=.
38888    for ac_exec_ext in '' $ac_executable_extensions; do
38889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38890    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38891       ac_prog_rejected=yes
38892       continue
38893     fi
38894    ac_cv_prog_RC="rc"
38895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38896    break 2
38897  fi
38898done
38899  done
38900IFS=$as_save_IFS
38901
38902if test $ac_prog_rejected = yes; then
38903  # We found a bogon in the path, so make sure we never use it.
38904  set dummy $ac_cv_prog_RC
38905  shift
38906  if test $# != 0; then
38907    # We chose a different compiler from the bogus one.
38908    # However, it has the same basename, so the bogon will be chosen
38909    # first if we set RC to just the basename; use the full file name.
38910    shift
38911    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38912  fi
38913fi
38914fi
38915fi
38916RC=$ac_cv_prog_RC
38917if test -n "$RC"; then
38918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38919$as_echo "$RC" >&6; }
38920else
38921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38922$as_echo "no" >&6; }
38923fi
38924
38925
38926
38927  # Only process if variable expands to non-empty
38928
38929  if test "x$RC" != x; then
38930    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38931
38932  # First separate the path from the arguments. This will split at the first
38933  # space.
38934  complete="$RC"
38935  path="${complete%% *}"
38936  tmp="$complete EOL"
38937  arguments="${tmp#* }"
38938
38939  # Input might be given as Windows format, start by converting to
38940  # unix format.
38941  new_path=`$CYGPATH -u "$path"`
38942
38943  # Now try to locate executable using which
38944  new_path=`$WHICH "$new_path" 2> /dev/null`
38945  # bat and cmd files are not always considered executable in cygwin causing which
38946  # to not find them
38947  if test "x$new_path" = x \
38948      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38949      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38950    new_path=`$CYGPATH -u "$path"`
38951  fi
38952  if test "x$new_path" = x; then
38953    # Oops. Which didn't find the executable.
38954    # The splitting of arguments from the executable at a space might have been incorrect,
38955    # since paths with space are more likely in Windows. Give it another try with the whole
38956    # argument.
38957    path="$complete"
38958    arguments="EOL"
38959    new_path=`$CYGPATH -u "$path"`
38960    new_path=`$WHICH "$new_path" 2> /dev/null`
38961    # bat and cmd files are not always considered executable in cygwin causing which
38962    # to not find them
38963    if test "x$new_path" = x \
38964        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38965        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38966      new_path=`$CYGPATH -u "$path"`
38967    fi
38968    if test "x$new_path" = x; then
38969      # It's still not found. Now this is an unrecoverable error.
38970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38971$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38972      has_space=`$ECHO "$complete" | $GREP " "`
38973      if test "x$has_space" != x; then
38974        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38975$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38976      fi
38977      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38978    fi
38979  fi
38980
38981  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38982  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38983  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38984  # "foo.exe" is OK but "foo" is an error.
38985  #
38986  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38987  # It is also a way to make sure we got the proper file name for the real test later on.
38988  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38989  if test "x$test_shortpath" = x; then
38990    # Short path failed, file does not exist as specified.
38991    # Try adding .exe or .cmd
38992    if test -f "${new_path}.exe"; then
38993      input_to_shortpath="${new_path}.exe"
38994    elif test -f "${new_path}.cmd"; then
38995      input_to_shortpath="${new_path}.cmd"
38996    else
38997      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38998$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38999      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39000$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39001      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39002    fi
39003  else
39004    input_to_shortpath="$new_path"
39005  fi
39006
39007  # Call helper function which possibly converts this using DOS-style short mode.
39008  # If so, the updated path is stored in $new_path.
39009  new_path="$input_to_shortpath"
39010
39011  input_path="$input_to_shortpath"
39012  # Check if we need to convert this using DOS-style short mode. If the path
39013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39014  # take no chances and rewrite it.
39015  # Note: m4 eats our [], so we need to use [ and ] instead.
39016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39017  if test "x$has_forbidden_chars" != x; then
39018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39019    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39020    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39021    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39022      # Going to short mode and back again did indeed matter. Since short mode is
39023      # case insensitive, let's make it lowercase to improve readability.
39024      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39025      # Now convert it back to Unix-style (cygpath)
39026      input_path=`$CYGPATH -u "$shortmode_path"`
39027      new_path="$input_path"
39028    fi
39029  fi
39030
39031  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39032  if test "x$test_cygdrive_prefix" = x; then
39033    # As a simple fix, exclude /usr/bin since it's not a real path.
39034    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39035      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39036      # a path prefixed by /cygdrive for fixpath to work.
39037      new_path="$CYGWIN_ROOT_PATH$input_path"
39038    fi
39039  fi
39040
39041  # remove trailing .exe if any
39042  new_path="${new_path/%.exe/}"
39043
39044    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39045
39046  # First separate the path from the arguments. This will split at the first
39047  # space.
39048  complete="$RC"
39049  path="${complete%% *}"
39050  tmp="$complete EOL"
39051  arguments="${tmp#* }"
39052
39053  # Input might be given as Windows format, start by converting to
39054  # unix format.
39055  new_path="$path"
39056
39057  windows_path="$new_path"
39058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39059    unix_path=`$CYGPATH -u "$windows_path"`
39060    new_path="$unix_path"
39061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39063    new_path="$unix_path"
39064  fi
39065
39066
39067  # Now try to locate executable using which
39068  new_path=`$WHICH "$new_path" 2> /dev/null`
39069
39070  if test "x$new_path" = x; then
39071    # Oops. Which didn't find the executable.
39072    # The splitting of arguments from the executable at a space might have been incorrect,
39073    # since paths with space are more likely in Windows. Give it another try with the whole
39074    # argument.
39075    path="$complete"
39076    arguments="EOL"
39077    new_path="$path"
39078
39079  windows_path="$new_path"
39080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39081    unix_path=`$CYGPATH -u "$windows_path"`
39082    new_path="$unix_path"
39083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39085    new_path="$unix_path"
39086  fi
39087
39088
39089    new_path=`$WHICH "$new_path" 2> /dev/null`
39090    # bat and cmd files are not always considered executable in MSYS causing which
39091    # to not find them
39092    if test "x$new_path" = x \
39093        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39094        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39095      new_path="$path"
39096
39097  windows_path="$new_path"
39098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39099    unix_path=`$CYGPATH -u "$windows_path"`
39100    new_path="$unix_path"
39101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39103    new_path="$unix_path"
39104  fi
39105
39106    fi
39107
39108    if test "x$new_path" = x; then
39109      # It's still not found. Now this is an unrecoverable error.
39110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39111$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39112      has_space=`$ECHO "$complete" | $GREP " "`
39113      if test "x$has_space" != x; then
39114        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39115$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39116      fi
39117      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39118    fi
39119  fi
39120
39121  # Now new_path has a complete unix path to the binary
39122  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39123    # Keep paths in /bin as-is, but remove trailing .exe if any
39124    new_path="${new_path/%.exe/}"
39125    # Do not save /bin paths to all_fixpath_prefixes!
39126  else
39127    # Not in mixed or Windows style, start by that.
39128    new_path=`cmd //c echo $new_path`
39129
39130  input_path="$new_path"
39131  # Check if we need to convert this using DOS-style short mode. If the path
39132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39133  # take no chances and rewrite it.
39134  # Note: m4 eats our [], so we need to use [ and ] instead.
39135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39136  if test "x$has_forbidden_chars" != x; then
39137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39138    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39139  fi
39140
39141    # Output is in $new_path
39142
39143  windows_path="$new_path"
39144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39145    unix_path=`$CYGPATH -u "$windows_path"`
39146    new_path="$unix_path"
39147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39149    new_path="$unix_path"
39150  fi
39151
39152    # remove trailing .exe if any
39153    new_path="${new_path/%.exe/}"
39154
39155    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39156    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39157  fi
39158
39159    else
39160      # We're on a unix platform. Hooray! :)
39161      # First separate the path from the arguments. This will split at the first
39162      # space.
39163      complete="$RC"
39164      path="${complete%% *}"
39165      tmp="$complete EOL"
39166      arguments="${tmp#* }"
39167
39168      # Cannot rely on the command "which" here since it doesn't always work.
39169      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39170      if test -z "$is_absolute_path"; then
39171        # Path to executable is not absolute. Find it.
39172        IFS_save="$IFS"
39173        IFS=:
39174        for p in $PATH; do
39175          if test -f "$p/$path" && test -x "$p/$path"; then
39176            new_path="$p/$path"
39177            break
39178          fi
39179        done
39180        IFS="$IFS_save"
39181      else
39182        # This is an absolute path, we can use it without further modifications.
39183        new_path="$path"
39184      fi
39185
39186      if test "x$new_path" = x; then
39187        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39188$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39189        has_space=`$ECHO "$complete" | $GREP " "`
39190        if test "x$has_space" != x; then
39191          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39192$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39193        fi
39194        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39195      fi
39196    fi
39197
39198    # Now join together the path and the arguments once again
39199    if test "x$arguments" != xEOL; then
39200      new_complete="$new_path ${arguments% *}"
39201    else
39202      new_complete="$new_path"
39203    fi
39204
39205    if test "x$complete" != "x$new_complete"; then
39206      RC="$new_complete"
39207      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39208$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39209    fi
39210  fi
39211
39212    # Extract the first word of "dumpbin", so it can be a program name with args.
39213set dummy dumpbin; ac_word=$2
39214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39215$as_echo_n "checking for $ac_word... " >&6; }
39216if ${ac_cv_prog_DUMPBIN+:} false; then :
39217  $as_echo_n "(cached) " >&6
39218else
39219  if test -n "$DUMPBIN"; then
39220  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39221else
39222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39223for as_dir in $PATH
39224do
39225  IFS=$as_save_IFS
39226  test -z "$as_dir" && as_dir=.
39227    for ac_exec_ext in '' $ac_executable_extensions; do
39228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39229    ac_cv_prog_DUMPBIN="dumpbin"
39230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39231    break 2
39232  fi
39233done
39234  done
39235IFS=$as_save_IFS
39236
39237fi
39238fi
39239DUMPBIN=$ac_cv_prog_DUMPBIN
39240if test -n "$DUMPBIN"; then
39241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39242$as_echo "$DUMPBIN" >&6; }
39243else
39244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39245$as_echo "no" >&6; }
39246fi
39247
39248
39249
39250  # Only process if variable expands to non-empty
39251
39252  if test "x$DUMPBIN" != x; then
39253    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39254
39255  # First separate the path from the arguments. This will split at the first
39256  # space.
39257  complete="$DUMPBIN"
39258  path="${complete%% *}"
39259  tmp="$complete EOL"
39260  arguments="${tmp#* }"
39261
39262  # Input might be given as Windows format, start by converting to
39263  # unix format.
39264  new_path=`$CYGPATH -u "$path"`
39265
39266  # Now try to locate executable using which
39267  new_path=`$WHICH "$new_path" 2> /dev/null`
39268  # bat and cmd files are not always considered executable in cygwin causing which
39269  # to not find them
39270  if test "x$new_path" = x \
39271      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39272      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39273    new_path=`$CYGPATH -u "$path"`
39274  fi
39275  if test "x$new_path" = x; then
39276    # Oops. Which didn't find the executable.
39277    # The splitting of arguments from the executable at a space might have been incorrect,
39278    # since paths with space are more likely in Windows. Give it another try with the whole
39279    # argument.
39280    path="$complete"
39281    arguments="EOL"
39282    new_path=`$CYGPATH -u "$path"`
39283    new_path=`$WHICH "$new_path" 2> /dev/null`
39284    # bat and cmd files are not always considered executable in cygwin causing which
39285    # to not find them
39286    if test "x$new_path" = x \
39287        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39288        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39289      new_path=`$CYGPATH -u "$path"`
39290    fi
39291    if test "x$new_path" = x; then
39292      # It's still not found. Now this is an unrecoverable error.
39293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39294$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39295      has_space=`$ECHO "$complete" | $GREP " "`
39296      if test "x$has_space" != x; then
39297        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39298$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39299      fi
39300      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39301    fi
39302  fi
39303
39304  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39305  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39306  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39307  # "foo.exe" is OK but "foo" is an error.
39308  #
39309  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39310  # It is also a way to make sure we got the proper file name for the real test later on.
39311  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39312  if test "x$test_shortpath" = x; then
39313    # Short path failed, file does not exist as specified.
39314    # Try adding .exe or .cmd
39315    if test -f "${new_path}.exe"; then
39316      input_to_shortpath="${new_path}.exe"
39317    elif test -f "${new_path}.cmd"; then
39318      input_to_shortpath="${new_path}.cmd"
39319    else
39320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39321$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39322      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39323$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39324      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39325    fi
39326  else
39327    input_to_shortpath="$new_path"
39328  fi
39329
39330  # Call helper function which possibly converts this using DOS-style short mode.
39331  # If so, the updated path is stored in $new_path.
39332  new_path="$input_to_shortpath"
39333
39334  input_path="$input_to_shortpath"
39335  # Check if we need to convert this using DOS-style short mode. If the path
39336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39337  # take no chances and rewrite it.
39338  # Note: m4 eats our [], so we need to use [ and ] instead.
39339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39340  if test "x$has_forbidden_chars" != x; then
39341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39342    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39343    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39344    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39345      # Going to short mode and back again did indeed matter. Since short mode is
39346      # case insensitive, let's make it lowercase to improve readability.
39347      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39348      # Now convert it back to Unix-style (cygpath)
39349      input_path=`$CYGPATH -u "$shortmode_path"`
39350      new_path="$input_path"
39351    fi
39352  fi
39353
39354  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39355  if test "x$test_cygdrive_prefix" = x; then
39356    # As a simple fix, exclude /usr/bin since it's not a real path.
39357    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39358      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39359      # a path prefixed by /cygdrive for fixpath to work.
39360      new_path="$CYGWIN_ROOT_PATH$input_path"
39361    fi
39362  fi
39363
39364  # remove trailing .exe if any
39365  new_path="${new_path/%.exe/}"
39366
39367    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39368
39369  # First separate the path from the arguments. This will split at the first
39370  # space.
39371  complete="$DUMPBIN"
39372  path="${complete%% *}"
39373  tmp="$complete EOL"
39374  arguments="${tmp#* }"
39375
39376  # Input might be given as Windows format, start by converting to
39377  # unix format.
39378  new_path="$path"
39379
39380  windows_path="$new_path"
39381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39382    unix_path=`$CYGPATH -u "$windows_path"`
39383    new_path="$unix_path"
39384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39386    new_path="$unix_path"
39387  fi
39388
39389
39390  # Now try to locate executable using which
39391  new_path=`$WHICH "$new_path" 2> /dev/null`
39392
39393  if test "x$new_path" = x; then
39394    # Oops. Which didn't find the executable.
39395    # The splitting of arguments from the executable at a space might have been incorrect,
39396    # since paths with space are more likely in Windows. Give it another try with the whole
39397    # argument.
39398    path="$complete"
39399    arguments="EOL"
39400    new_path="$path"
39401
39402  windows_path="$new_path"
39403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39404    unix_path=`$CYGPATH -u "$windows_path"`
39405    new_path="$unix_path"
39406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39408    new_path="$unix_path"
39409  fi
39410
39411
39412    new_path=`$WHICH "$new_path" 2> /dev/null`
39413    # bat and cmd files are not always considered executable in MSYS causing which
39414    # to not find them
39415    if test "x$new_path" = x \
39416        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39417        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39418      new_path="$path"
39419
39420  windows_path="$new_path"
39421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39422    unix_path=`$CYGPATH -u "$windows_path"`
39423    new_path="$unix_path"
39424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39426    new_path="$unix_path"
39427  fi
39428
39429    fi
39430
39431    if test "x$new_path" = x; then
39432      # It's still not found. Now this is an unrecoverable error.
39433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39434$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39435      has_space=`$ECHO "$complete" | $GREP " "`
39436      if test "x$has_space" != x; then
39437        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39438$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39439      fi
39440      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39441    fi
39442  fi
39443
39444  # Now new_path has a complete unix path to the binary
39445  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39446    # Keep paths in /bin as-is, but remove trailing .exe if any
39447    new_path="${new_path/%.exe/}"
39448    # Do not save /bin paths to all_fixpath_prefixes!
39449  else
39450    # Not in mixed or Windows style, start by that.
39451    new_path=`cmd //c echo $new_path`
39452
39453  input_path="$new_path"
39454  # Check if we need to convert this using DOS-style short mode. If the path
39455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39456  # take no chances and rewrite it.
39457  # Note: m4 eats our [], so we need to use [ and ] instead.
39458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39459  if test "x$has_forbidden_chars" != x; then
39460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39462  fi
39463
39464    # Output is in $new_path
39465
39466  windows_path="$new_path"
39467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39468    unix_path=`$CYGPATH -u "$windows_path"`
39469    new_path="$unix_path"
39470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39472    new_path="$unix_path"
39473  fi
39474
39475    # remove trailing .exe if any
39476    new_path="${new_path/%.exe/}"
39477
39478    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39479    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39480  fi
39481
39482    else
39483      # We're on a unix platform. Hooray! :)
39484      # First separate the path from the arguments. This will split at the first
39485      # space.
39486      complete="$DUMPBIN"
39487      path="${complete%% *}"
39488      tmp="$complete EOL"
39489      arguments="${tmp#* }"
39490
39491      # Cannot rely on the command "which" here since it doesn't always work.
39492      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39493      if test -z "$is_absolute_path"; then
39494        # Path to executable is not absolute. Find it.
39495        IFS_save="$IFS"
39496        IFS=:
39497        for p in $PATH; do
39498          if test -f "$p/$path" && test -x "$p/$path"; then
39499            new_path="$p/$path"
39500            break
39501          fi
39502        done
39503        IFS="$IFS_save"
39504      else
39505        # This is an absolute path, we can use it without further modifications.
39506        new_path="$path"
39507      fi
39508
39509      if test "x$new_path" = x; then
39510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39511$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39512        has_space=`$ECHO "$complete" | $GREP " "`
39513        if test "x$has_space" != x; then
39514          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39515$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39516        fi
39517        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39518      fi
39519    fi
39520
39521    # Now join together the path and the arguments once again
39522    if test "x$arguments" != xEOL; then
39523      new_complete="$new_path ${arguments% *}"
39524    else
39525      new_complete="$new_path"
39526    fi
39527
39528    if test "x$complete" != "x$new_complete"; then
39529      DUMPBIN="$new_complete"
39530      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39531$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39532    fi
39533  fi
39534
39535    # We need to check for 'msbuild.exe' because at the place where we expect to
39536    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39537    # won't find the 'msbuild.exe' executable in that case (and the
39538    # 'ac_executable_extensions' is unusable due to performance reasons).
39539    # Notice that we intentionally don't fix up the path to MSBUILD because we
39540    # will call it in a DOS shell during freetype detection on Windows (see
39541    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39542    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39543set dummy msbuild.exe; ac_word=$2
39544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39545$as_echo_n "checking for $ac_word... " >&6; }
39546if ${ac_cv_prog_MSBUILD+:} false; then :
39547  $as_echo_n "(cached) " >&6
39548else
39549  if test -n "$MSBUILD"; then
39550  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39551else
39552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39553for as_dir in $PATH
39554do
39555  IFS=$as_save_IFS
39556  test -z "$as_dir" && as_dir=.
39557    for ac_exec_ext in '' $ac_executable_extensions; do
39558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39559    ac_cv_prog_MSBUILD="msbuild.exe"
39560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39561    break 2
39562  fi
39563done
39564  done
39565IFS=$as_save_IFS
39566
39567fi
39568fi
39569MSBUILD=$ac_cv_prog_MSBUILD
39570if test -n "$MSBUILD"; then
39571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39572$as_echo "$MSBUILD" >&6; }
39573else
39574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39575$as_echo "no" >&6; }
39576fi
39577
39578
39579  fi
39580
39581  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39582
39583
39584  # Publish this variable in the help.
39585
39586
39587  if [ -z "${STRIP+x}" ]; then
39588    # The variable is not set by user, try to locate tool using the code snippet
39589    for ac_prog in strip
39590do
39591  # Extract the first word of "$ac_prog", so it can be a program name with args.
39592set dummy $ac_prog; ac_word=$2
39593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39594$as_echo_n "checking for $ac_word... " >&6; }
39595if ${ac_cv_path_STRIP+:} false; then :
39596  $as_echo_n "(cached) " >&6
39597else
39598  case $STRIP in
39599  [\\/]* | ?:[\\/]*)
39600  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39601  ;;
39602  *)
39603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39604for as_dir in $PATH
39605do
39606  IFS=$as_save_IFS
39607  test -z "$as_dir" && as_dir=.
39608    for ac_exec_ext in '' $ac_executable_extensions; do
39609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39610    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39612    break 2
39613  fi
39614done
39615  done
39616IFS=$as_save_IFS
39617
39618  ;;
39619esac
39620fi
39621STRIP=$ac_cv_path_STRIP
39622if test -n "$STRIP"; then
39623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39624$as_echo "$STRIP" >&6; }
39625else
39626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39627$as_echo "no" >&6; }
39628fi
39629
39630
39631  test -n "$STRIP" && break
39632done
39633
39634  else
39635    # The variable is set, but is it from the command line or the environment?
39636
39637    # Try to remove the string !STRIP! from our list.
39638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39640      # If it failed, the variable was not from the command line. Ignore it,
39641      # but warn the user (except for BASH, which is always set by the calling BASH).
39642      if test "xSTRIP" != xBASH; then
39643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39644$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39645      fi
39646      # Try to locate tool using the code snippet
39647      for ac_prog in strip
39648do
39649  # Extract the first word of "$ac_prog", so it can be a program name with args.
39650set dummy $ac_prog; ac_word=$2
39651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39652$as_echo_n "checking for $ac_word... " >&6; }
39653if ${ac_cv_path_STRIP+:} false; then :
39654  $as_echo_n "(cached) " >&6
39655else
39656  case $STRIP in
39657  [\\/]* | ?:[\\/]*)
39658  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39659  ;;
39660  *)
39661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39662for as_dir in $PATH
39663do
39664  IFS=$as_save_IFS
39665  test -z "$as_dir" && as_dir=.
39666    for ac_exec_ext in '' $ac_executable_extensions; do
39667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39668    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39670    break 2
39671  fi
39672done
39673  done
39674IFS=$as_save_IFS
39675
39676  ;;
39677esac
39678fi
39679STRIP=$ac_cv_path_STRIP
39680if test -n "$STRIP"; then
39681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39682$as_echo "$STRIP" >&6; }
39683else
39684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39685$as_echo "no" >&6; }
39686fi
39687
39688
39689  test -n "$STRIP" && break
39690done
39691
39692    else
39693      # If it succeeded, then it was overridden by the user. We will use it
39694      # for the tool.
39695
39696      # First remove it from the list of overridden variables, so we can test
39697      # for unknown variables in the end.
39698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39699
39700      # Check if we try to supply an empty value
39701      if test "x$STRIP" = x; then
39702        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39703$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39704        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39705$as_echo_n "checking for STRIP... " >&6; }
39706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39707$as_echo "disabled" >&6; }
39708      else
39709        # Check if the provided tool contains a complete path.
39710        tool_specified="$STRIP"
39711        tool_basename="${tool_specified##*/}"
39712        if test "x$tool_basename" = "x$tool_specified"; then
39713          # A command without a complete path is provided, search $PATH.
39714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39715$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39716          # Extract the first word of "$tool_basename", so it can be a program name with args.
39717set dummy $tool_basename; ac_word=$2
39718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39719$as_echo_n "checking for $ac_word... " >&6; }
39720if ${ac_cv_path_STRIP+:} false; then :
39721  $as_echo_n "(cached) " >&6
39722else
39723  case $STRIP in
39724  [\\/]* | ?:[\\/]*)
39725  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39726  ;;
39727  *)
39728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39729for as_dir in $PATH
39730do
39731  IFS=$as_save_IFS
39732  test -z "$as_dir" && as_dir=.
39733    for ac_exec_ext in '' $ac_executable_extensions; do
39734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39735    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39737    break 2
39738  fi
39739done
39740  done
39741IFS=$as_save_IFS
39742
39743  ;;
39744esac
39745fi
39746STRIP=$ac_cv_path_STRIP
39747if test -n "$STRIP"; then
39748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39749$as_echo "$STRIP" >&6; }
39750else
39751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39752$as_echo "no" >&6; }
39753fi
39754
39755
39756          if test "x$STRIP" = x; then
39757            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39758          fi
39759        else
39760          # Otherwise we believe it is a complete path. Use it as it is.
39761          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39762$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39763          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39764$as_echo_n "checking for STRIP... " >&6; }
39765          if test ! -x "$tool_specified"; then
39766            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39767$as_echo "not found" >&6; }
39768            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39769          fi
39770          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39771$as_echo "$tool_specified" >&6; }
39772        fi
39773      fi
39774    fi
39775
39776  fi
39777
39778
39779
39780  # Only process if variable expands to non-empty
39781
39782  if test "x$STRIP" != x; then
39783    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39784
39785  # First separate the path from the arguments. This will split at the first
39786  # space.
39787  complete="$STRIP"
39788  path="${complete%% *}"
39789  tmp="$complete EOL"
39790  arguments="${tmp#* }"
39791
39792  # Input might be given as Windows format, start by converting to
39793  # unix format.
39794  new_path=`$CYGPATH -u "$path"`
39795
39796  # Now try to locate executable using which
39797  new_path=`$WHICH "$new_path" 2> /dev/null`
39798  # bat and cmd files are not always considered executable in cygwin causing which
39799  # to not find them
39800  if test "x$new_path" = x \
39801      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39802      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39803    new_path=`$CYGPATH -u "$path"`
39804  fi
39805  if test "x$new_path" = x; then
39806    # Oops. Which didn't find the executable.
39807    # The splitting of arguments from the executable at a space might have been incorrect,
39808    # since paths with space are more likely in Windows. Give it another try with the whole
39809    # argument.
39810    path="$complete"
39811    arguments="EOL"
39812    new_path=`$CYGPATH -u "$path"`
39813    new_path=`$WHICH "$new_path" 2> /dev/null`
39814    # bat and cmd files are not always considered executable in cygwin causing which
39815    # to not find them
39816    if test "x$new_path" = x \
39817        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39818        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39819      new_path=`$CYGPATH -u "$path"`
39820    fi
39821    if test "x$new_path" = x; then
39822      # It's still not found. Now this is an unrecoverable error.
39823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39824$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39825      has_space=`$ECHO "$complete" | $GREP " "`
39826      if test "x$has_space" != x; then
39827        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39828$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39829      fi
39830      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39831    fi
39832  fi
39833
39834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39837  # "foo.exe" is OK but "foo" is an error.
39838  #
39839  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39840  # It is also a way to make sure we got the proper file name for the real test later on.
39841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39842  if test "x$test_shortpath" = x; then
39843    # Short path failed, file does not exist as specified.
39844    # Try adding .exe or .cmd
39845    if test -f "${new_path}.exe"; then
39846      input_to_shortpath="${new_path}.exe"
39847    elif test -f "${new_path}.cmd"; then
39848      input_to_shortpath="${new_path}.cmd"
39849    else
39850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39851$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39852      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39853$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39854      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39855    fi
39856  else
39857    input_to_shortpath="$new_path"
39858  fi
39859
39860  # Call helper function which possibly converts this using DOS-style short mode.
39861  # If so, the updated path is stored in $new_path.
39862  new_path="$input_to_shortpath"
39863
39864  input_path="$input_to_shortpath"
39865  # Check if we need to convert this using DOS-style short mode. If the path
39866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39867  # take no chances and rewrite it.
39868  # Note: m4 eats our [], so we need to use [ and ] instead.
39869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39870  if test "x$has_forbidden_chars" != x; then
39871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39875      # Going to short mode and back again did indeed matter. Since short mode is
39876      # case insensitive, let's make it lowercase to improve readability.
39877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39878      # Now convert it back to Unix-style (cygpath)
39879      input_path=`$CYGPATH -u "$shortmode_path"`
39880      new_path="$input_path"
39881    fi
39882  fi
39883
39884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39885  if test "x$test_cygdrive_prefix" = x; then
39886    # As a simple fix, exclude /usr/bin since it's not a real path.
39887    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39889      # a path prefixed by /cygdrive for fixpath to work.
39890      new_path="$CYGWIN_ROOT_PATH$input_path"
39891    fi
39892  fi
39893
39894  # remove trailing .exe if any
39895  new_path="${new_path/%.exe/}"
39896
39897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39898
39899  # First separate the path from the arguments. This will split at the first
39900  # space.
39901  complete="$STRIP"
39902  path="${complete%% *}"
39903  tmp="$complete EOL"
39904  arguments="${tmp#* }"
39905
39906  # Input might be given as Windows format, start by converting to
39907  # unix format.
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
39920  # Now try to locate executable using which
39921  new_path=`$WHICH "$new_path" 2> /dev/null`
39922
39923  if test "x$new_path" = x; then
39924    # Oops. Which didn't find the executable.
39925    # The splitting of arguments from the executable at a space might have been incorrect,
39926    # since paths with space are more likely in Windows. Give it another try with the whole
39927    # argument.
39928    path="$complete"
39929    arguments="EOL"
39930    new_path="$path"
39931
39932  windows_path="$new_path"
39933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39934    unix_path=`$CYGPATH -u "$windows_path"`
39935    new_path="$unix_path"
39936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39938    new_path="$unix_path"
39939  fi
39940
39941
39942    new_path=`$WHICH "$new_path" 2> /dev/null`
39943    # bat and cmd files are not always considered executable in MSYS causing which
39944    # to not find them
39945    if test "x$new_path" = x \
39946        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39947        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39948      new_path="$path"
39949
39950  windows_path="$new_path"
39951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39952    unix_path=`$CYGPATH -u "$windows_path"`
39953    new_path="$unix_path"
39954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39956    new_path="$unix_path"
39957  fi
39958
39959    fi
39960
39961    if test "x$new_path" = x; then
39962      # It's still not found. Now this is an unrecoverable error.
39963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39964$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39965      has_space=`$ECHO "$complete" | $GREP " "`
39966      if test "x$has_space" != x; then
39967        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39968$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39969      fi
39970      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39971    fi
39972  fi
39973
39974  # Now new_path has a complete unix path to the binary
39975  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39976    # Keep paths in /bin as-is, but remove trailing .exe if any
39977    new_path="${new_path/%.exe/}"
39978    # Do not save /bin paths to all_fixpath_prefixes!
39979  else
39980    # Not in mixed or Windows style, start by that.
39981    new_path=`cmd //c echo $new_path`
39982
39983  input_path="$new_path"
39984  # Check if we need to convert this using DOS-style short mode. If the path
39985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39986  # take no chances and rewrite it.
39987  # Note: m4 eats our [], so we need to use [ and ] instead.
39988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39989  if test "x$has_forbidden_chars" != x; then
39990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39992  fi
39993
39994    # Output is in $new_path
39995
39996  windows_path="$new_path"
39997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39998    unix_path=`$CYGPATH -u "$windows_path"`
39999    new_path="$unix_path"
40000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40002    new_path="$unix_path"
40003  fi
40004
40005    # remove trailing .exe if any
40006    new_path="${new_path/%.exe/}"
40007
40008    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40009    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40010  fi
40011
40012    else
40013      # We're on a unix platform. Hooray! :)
40014      # First separate the path from the arguments. This will split at the first
40015      # space.
40016      complete="$STRIP"
40017      path="${complete%% *}"
40018      tmp="$complete EOL"
40019      arguments="${tmp#* }"
40020
40021      # Cannot rely on the command "which" here since it doesn't always work.
40022      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40023      if test -z "$is_absolute_path"; then
40024        # Path to executable is not absolute. Find it.
40025        IFS_save="$IFS"
40026        IFS=:
40027        for p in $PATH; do
40028          if test -f "$p/$path" && test -x "$p/$path"; then
40029            new_path="$p/$path"
40030            break
40031          fi
40032        done
40033        IFS="$IFS_save"
40034      else
40035        # This is an absolute path, we can use it without further modifications.
40036        new_path="$path"
40037      fi
40038
40039      if test "x$new_path" = x; then
40040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40041$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40042        has_space=`$ECHO "$complete" | $GREP " "`
40043        if test "x$has_space" != x; then
40044          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40045$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40046        fi
40047        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40048      fi
40049    fi
40050
40051    # Now join together the path and the arguments once again
40052    if test "x$arguments" != xEOL; then
40053      new_complete="$new_path ${arguments% *}"
40054    else
40055      new_complete="$new_path"
40056    fi
40057
40058    if test "x$complete" != "x$new_complete"; then
40059      STRIP="$new_complete"
40060      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40061$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40062    fi
40063  fi
40064
40065
40066
40067  # Publish this variable in the help.
40068
40069
40070  if [ -z "${NM+x}" ]; then
40071    # The variable is not set by user, try to locate tool using the code snippet
40072    for ac_prog in nm
40073do
40074  # Extract the first word of "$ac_prog", so it can be a program name with args.
40075set dummy $ac_prog; ac_word=$2
40076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40077$as_echo_n "checking for $ac_word... " >&6; }
40078if ${ac_cv_path_NM+:} false; then :
40079  $as_echo_n "(cached) " >&6
40080else
40081  case $NM in
40082  [\\/]* | ?:[\\/]*)
40083  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40084  ;;
40085  *)
40086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40087for as_dir in $PATH
40088do
40089  IFS=$as_save_IFS
40090  test -z "$as_dir" && as_dir=.
40091    for ac_exec_ext in '' $ac_executable_extensions; do
40092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40093    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40095    break 2
40096  fi
40097done
40098  done
40099IFS=$as_save_IFS
40100
40101  ;;
40102esac
40103fi
40104NM=$ac_cv_path_NM
40105if test -n "$NM"; then
40106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40107$as_echo "$NM" >&6; }
40108else
40109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40110$as_echo "no" >&6; }
40111fi
40112
40113
40114  test -n "$NM" && break
40115done
40116
40117  else
40118    # The variable is set, but is it from the command line or the environment?
40119
40120    # Try to remove the string !NM! from our list.
40121    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40122    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40123      # If it failed, the variable was not from the command line. Ignore it,
40124      # but warn the user (except for BASH, which is always set by the calling BASH).
40125      if test "xNM" != xBASH; then
40126        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40127$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40128      fi
40129      # Try to locate tool using the code snippet
40130      for ac_prog in nm
40131do
40132  # Extract the first word of "$ac_prog", so it can be a program name with args.
40133set dummy $ac_prog; ac_word=$2
40134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40135$as_echo_n "checking for $ac_word... " >&6; }
40136if ${ac_cv_path_NM+:} false; then :
40137  $as_echo_n "(cached) " >&6
40138else
40139  case $NM in
40140  [\\/]* | ?:[\\/]*)
40141  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40142  ;;
40143  *)
40144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40145for as_dir in $PATH
40146do
40147  IFS=$as_save_IFS
40148  test -z "$as_dir" && as_dir=.
40149    for ac_exec_ext in '' $ac_executable_extensions; do
40150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40151    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40153    break 2
40154  fi
40155done
40156  done
40157IFS=$as_save_IFS
40158
40159  ;;
40160esac
40161fi
40162NM=$ac_cv_path_NM
40163if test -n "$NM"; then
40164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40165$as_echo "$NM" >&6; }
40166else
40167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40168$as_echo "no" >&6; }
40169fi
40170
40171
40172  test -n "$NM" && break
40173done
40174
40175    else
40176      # If it succeeded, then it was overridden by the user. We will use it
40177      # for the tool.
40178
40179      # First remove it from the list of overridden variables, so we can test
40180      # for unknown variables in the end.
40181      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40182
40183      # Check if we try to supply an empty value
40184      if test "x$NM" = x; then
40185        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40186$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40187        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40188$as_echo_n "checking for NM... " >&6; }
40189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40190$as_echo "disabled" >&6; }
40191      else
40192        # Check if the provided tool contains a complete path.
40193        tool_specified="$NM"
40194        tool_basename="${tool_specified##*/}"
40195        if test "x$tool_basename" = "x$tool_specified"; then
40196          # A command without a complete path is provided, search $PATH.
40197          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40198$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40199          # Extract the first word of "$tool_basename", so it can be a program name with args.
40200set dummy $tool_basename; ac_word=$2
40201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40202$as_echo_n "checking for $ac_word... " >&6; }
40203if ${ac_cv_path_NM+:} false; then :
40204  $as_echo_n "(cached) " >&6
40205else
40206  case $NM in
40207  [\\/]* | ?:[\\/]*)
40208  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40209  ;;
40210  *)
40211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40212for as_dir in $PATH
40213do
40214  IFS=$as_save_IFS
40215  test -z "$as_dir" && as_dir=.
40216    for ac_exec_ext in '' $ac_executable_extensions; do
40217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40218    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40220    break 2
40221  fi
40222done
40223  done
40224IFS=$as_save_IFS
40225
40226  ;;
40227esac
40228fi
40229NM=$ac_cv_path_NM
40230if test -n "$NM"; then
40231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40232$as_echo "$NM" >&6; }
40233else
40234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40235$as_echo "no" >&6; }
40236fi
40237
40238
40239          if test "x$NM" = x; then
40240            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40241          fi
40242        else
40243          # Otherwise we believe it is a complete path. Use it as it is.
40244          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40245$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40246          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40247$as_echo_n "checking for NM... " >&6; }
40248          if test ! -x "$tool_specified"; then
40249            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40250$as_echo "not found" >&6; }
40251            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40252          fi
40253          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40254$as_echo "$tool_specified" >&6; }
40255        fi
40256      fi
40257    fi
40258
40259  fi
40260
40261
40262
40263  # Only process if variable expands to non-empty
40264
40265  if test "x$NM" != x; then
40266    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40267
40268  # First separate the path from the arguments. This will split at the first
40269  # space.
40270  complete="$NM"
40271  path="${complete%% *}"
40272  tmp="$complete EOL"
40273  arguments="${tmp#* }"
40274
40275  # Input might be given as Windows format, start by converting to
40276  # unix format.
40277  new_path=`$CYGPATH -u "$path"`
40278
40279  # Now try to locate executable using which
40280  new_path=`$WHICH "$new_path" 2> /dev/null`
40281  # bat and cmd files are not always considered executable in cygwin causing which
40282  # to not find them
40283  if test "x$new_path" = x \
40284      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40285      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40286    new_path=`$CYGPATH -u "$path"`
40287  fi
40288  if test "x$new_path" = x; then
40289    # Oops. Which didn't find the executable.
40290    # The splitting of arguments from the executable at a space might have been incorrect,
40291    # since paths with space are more likely in Windows. Give it another try with the whole
40292    # argument.
40293    path="$complete"
40294    arguments="EOL"
40295    new_path=`$CYGPATH -u "$path"`
40296    new_path=`$WHICH "$new_path" 2> /dev/null`
40297    # bat and cmd files are not always considered executable in cygwin causing which
40298    # to not find them
40299    if test "x$new_path" = x \
40300        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40301        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40302      new_path=`$CYGPATH -u "$path"`
40303    fi
40304    if test "x$new_path" = x; then
40305      # It's still not found. Now this is an unrecoverable error.
40306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40307$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40308      has_space=`$ECHO "$complete" | $GREP " "`
40309      if test "x$has_space" != x; then
40310        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40311$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40312      fi
40313      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40314    fi
40315  fi
40316
40317  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40318  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40319  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40320  # "foo.exe" is OK but "foo" is an error.
40321  #
40322  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40323  # It is also a way to make sure we got the proper file name for the real test later on.
40324  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40325  if test "x$test_shortpath" = x; then
40326    # Short path failed, file does not exist as specified.
40327    # Try adding .exe or .cmd
40328    if test -f "${new_path}.exe"; then
40329      input_to_shortpath="${new_path}.exe"
40330    elif test -f "${new_path}.cmd"; then
40331      input_to_shortpath="${new_path}.cmd"
40332    else
40333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40334$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40335      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40336$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40337      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40338    fi
40339  else
40340    input_to_shortpath="$new_path"
40341  fi
40342
40343  # Call helper function which possibly converts this using DOS-style short mode.
40344  # If so, the updated path is stored in $new_path.
40345  new_path="$input_to_shortpath"
40346
40347  input_path="$input_to_shortpath"
40348  # Check if we need to convert this using DOS-style short mode. If the path
40349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40350  # take no chances and rewrite it.
40351  # Note: m4 eats our [], so we need to use [ and ] instead.
40352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40353  if test "x$has_forbidden_chars" != x; then
40354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40358      # Going to short mode and back again did indeed matter. Since short mode is
40359      # case insensitive, let's make it lowercase to improve readability.
40360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40361      # Now convert it back to Unix-style (cygpath)
40362      input_path=`$CYGPATH -u "$shortmode_path"`
40363      new_path="$input_path"
40364    fi
40365  fi
40366
40367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40368  if test "x$test_cygdrive_prefix" = x; then
40369    # As a simple fix, exclude /usr/bin since it's not a real path.
40370    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40372      # a path prefixed by /cygdrive for fixpath to work.
40373      new_path="$CYGWIN_ROOT_PATH$input_path"
40374    fi
40375  fi
40376
40377  # remove trailing .exe if any
40378  new_path="${new_path/%.exe/}"
40379
40380    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40381
40382  # First separate the path from the arguments. This will split at the first
40383  # space.
40384  complete="$NM"
40385  path="${complete%% *}"
40386  tmp="$complete EOL"
40387  arguments="${tmp#* }"
40388
40389  # Input might be given as Windows format, start by converting to
40390  # unix format.
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
40403  # Now try to locate executable using which
40404  new_path=`$WHICH "$new_path" 2> /dev/null`
40405
40406  if test "x$new_path" = x; then
40407    # Oops. Which didn't find the executable.
40408    # The splitting of arguments from the executable at a space might have been incorrect,
40409    # since paths with space are more likely in Windows. Give it another try with the whole
40410    # argument.
40411    path="$complete"
40412    arguments="EOL"
40413    new_path="$path"
40414
40415  windows_path="$new_path"
40416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40417    unix_path=`$CYGPATH -u "$windows_path"`
40418    new_path="$unix_path"
40419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40421    new_path="$unix_path"
40422  fi
40423
40424
40425    new_path=`$WHICH "$new_path" 2> /dev/null`
40426    # bat and cmd files are not always considered executable in MSYS causing which
40427    # to not find them
40428    if test "x$new_path" = x \
40429        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40430        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40431      new_path="$path"
40432
40433  windows_path="$new_path"
40434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40435    unix_path=`$CYGPATH -u "$windows_path"`
40436    new_path="$unix_path"
40437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40439    new_path="$unix_path"
40440  fi
40441
40442    fi
40443
40444    if test "x$new_path" = x; then
40445      # It's still not found. Now this is an unrecoverable error.
40446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40447$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40448      has_space=`$ECHO "$complete" | $GREP " "`
40449      if test "x$has_space" != x; then
40450        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40451$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40452      fi
40453      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40454    fi
40455  fi
40456
40457  # Now new_path has a complete unix path to the binary
40458  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40459    # Keep paths in /bin as-is, but remove trailing .exe if any
40460    new_path="${new_path/%.exe/}"
40461    # Do not save /bin paths to all_fixpath_prefixes!
40462  else
40463    # Not in mixed or Windows style, start by that.
40464    new_path=`cmd //c echo $new_path`
40465
40466  input_path="$new_path"
40467  # Check if we need to convert this using DOS-style short mode. If the path
40468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40469  # take no chances and rewrite it.
40470  # Note: m4 eats our [], so we need to use [ and ] instead.
40471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40472  if test "x$has_forbidden_chars" != x; then
40473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40474    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40475  fi
40476
40477    # Output is in $new_path
40478
40479  windows_path="$new_path"
40480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40481    unix_path=`$CYGPATH -u "$windows_path"`
40482    new_path="$unix_path"
40483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40485    new_path="$unix_path"
40486  fi
40487
40488    # remove trailing .exe if any
40489    new_path="${new_path/%.exe/}"
40490
40491    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40492    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40493  fi
40494
40495    else
40496      # We're on a unix platform. Hooray! :)
40497      # First separate the path from the arguments. This will split at the first
40498      # space.
40499      complete="$NM"
40500      path="${complete%% *}"
40501      tmp="$complete EOL"
40502      arguments="${tmp#* }"
40503
40504      # Cannot rely on the command "which" here since it doesn't always work.
40505      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40506      if test -z "$is_absolute_path"; then
40507        # Path to executable is not absolute. Find it.
40508        IFS_save="$IFS"
40509        IFS=:
40510        for p in $PATH; do
40511          if test -f "$p/$path" && test -x "$p/$path"; then
40512            new_path="$p/$path"
40513            break
40514          fi
40515        done
40516        IFS="$IFS_save"
40517      else
40518        # This is an absolute path, we can use it without further modifications.
40519        new_path="$path"
40520      fi
40521
40522      if test "x$new_path" = x; then
40523        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40524$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40525        has_space=`$ECHO "$complete" | $GREP " "`
40526        if test "x$has_space" != x; then
40527          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40528$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40529        fi
40530        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40531      fi
40532    fi
40533
40534    # Now join together the path and the arguments once again
40535    if test "x$arguments" != xEOL; then
40536      new_complete="$new_path ${arguments% *}"
40537    else
40538      new_complete="$new_path"
40539    fi
40540
40541    if test "x$complete" != "x$new_complete"; then
40542      NM="$new_complete"
40543      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40544$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40545    fi
40546  fi
40547
40548
40549
40550  # Publish this variable in the help.
40551
40552
40553  if [ -z "${GNM+x}" ]; then
40554    # The variable is not set by user, try to locate tool using the code snippet
40555    for ac_prog in gnm
40556do
40557  # Extract the first word of "$ac_prog", so it can be a program name with args.
40558set dummy $ac_prog; ac_word=$2
40559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40560$as_echo_n "checking for $ac_word... " >&6; }
40561if ${ac_cv_path_GNM+:} false; then :
40562  $as_echo_n "(cached) " >&6
40563else
40564  case $GNM in
40565  [\\/]* | ?:[\\/]*)
40566  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40567  ;;
40568  *)
40569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40570for as_dir in $PATH
40571do
40572  IFS=$as_save_IFS
40573  test -z "$as_dir" && as_dir=.
40574    for ac_exec_ext in '' $ac_executable_extensions; do
40575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40576    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40578    break 2
40579  fi
40580done
40581  done
40582IFS=$as_save_IFS
40583
40584  ;;
40585esac
40586fi
40587GNM=$ac_cv_path_GNM
40588if test -n "$GNM"; then
40589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40590$as_echo "$GNM" >&6; }
40591else
40592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40593$as_echo "no" >&6; }
40594fi
40595
40596
40597  test -n "$GNM" && break
40598done
40599
40600  else
40601    # The variable is set, but is it from the command line or the environment?
40602
40603    # Try to remove the string !GNM! from our list.
40604    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40605    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40606      # If it failed, the variable was not from the command line. Ignore it,
40607      # but warn the user (except for BASH, which is always set by the calling BASH).
40608      if test "xGNM" != xBASH; then
40609        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40610$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40611      fi
40612      # Try to locate tool using the code snippet
40613      for ac_prog in gnm
40614do
40615  # Extract the first word of "$ac_prog", so it can be a program name with args.
40616set dummy $ac_prog; ac_word=$2
40617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40618$as_echo_n "checking for $ac_word... " >&6; }
40619if ${ac_cv_path_GNM+:} false; then :
40620  $as_echo_n "(cached) " >&6
40621else
40622  case $GNM in
40623  [\\/]* | ?:[\\/]*)
40624  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40625  ;;
40626  *)
40627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40628for as_dir in $PATH
40629do
40630  IFS=$as_save_IFS
40631  test -z "$as_dir" && as_dir=.
40632    for ac_exec_ext in '' $ac_executable_extensions; do
40633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40634    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40636    break 2
40637  fi
40638done
40639  done
40640IFS=$as_save_IFS
40641
40642  ;;
40643esac
40644fi
40645GNM=$ac_cv_path_GNM
40646if test -n "$GNM"; then
40647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40648$as_echo "$GNM" >&6; }
40649else
40650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40651$as_echo "no" >&6; }
40652fi
40653
40654
40655  test -n "$GNM" && break
40656done
40657
40658    else
40659      # If it succeeded, then it was overridden by the user. We will use it
40660      # for the tool.
40661
40662      # First remove it from the list of overridden variables, so we can test
40663      # for unknown variables in the end.
40664      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40665
40666      # Check if we try to supply an empty value
40667      if test "x$GNM" = x; then
40668        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40669$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40670        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40671$as_echo_n "checking for GNM... " >&6; }
40672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40673$as_echo "disabled" >&6; }
40674      else
40675        # Check if the provided tool contains a complete path.
40676        tool_specified="$GNM"
40677        tool_basename="${tool_specified##*/}"
40678        if test "x$tool_basename" = "x$tool_specified"; then
40679          # A command without a complete path is provided, search $PATH.
40680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40681$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40682          # Extract the first word of "$tool_basename", so it can be a program name with args.
40683set dummy $tool_basename; ac_word=$2
40684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40685$as_echo_n "checking for $ac_word... " >&6; }
40686if ${ac_cv_path_GNM+:} false; then :
40687  $as_echo_n "(cached) " >&6
40688else
40689  case $GNM in
40690  [\\/]* | ?:[\\/]*)
40691  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40692  ;;
40693  *)
40694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40695for as_dir in $PATH
40696do
40697  IFS=$as_save_IFS
40698  test -z "$as_dir" && as_dir=.
40699    for ac_exec_ext in '' $ac_executable_extensions; do
40700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40701    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40703    break 2
40704  fi
40705done
40706  done
40707IFS=$as_save_IFS
40708
40709  ;;
40710esac
40711fi
40712GNM=$ac_cv_path_GNM
40713if test -n "$GNM"; then
40714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40715$as_echo "$GNM" >&6; }
40716else
40717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40718$as_echo "no" >&6; }
40719fi
40720
40721
40722          if test "x$GNM" = x; then
40723            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40724          fi
40725        else
40726          # Otherwise we believe it is a complete path. Use it as it is.
40727          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40728$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40729          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40730$as_echo_n "checking for GNM... " >&6; }
40731          if test ! -x "$tool_specified"; then
40732            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40733$as_echo "not found" >&6; }
40734            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40735          fi
40736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40737$as_echo "$tool_specified" >&6; }
40738        fi
40739      fi
40740    fi
40741
40742  fi
40743
40744
40745
40746  # Only process if variable expands to non-empty
40747
40748  if test "x$GNM" != x; then
40749    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40750
40751  # First separate the path from the arguments. This will split at the first
40752  # space.
40753  complete="$GNM"
40754  path="${complete%% *}"
40755  tmp="$complete EOL"
40756  arguments="${tmp#* }"
40757
40758  # Input might be given as Windows format, start by converting to
40759  # unix format.
40760  new_path=`$CYGPATH -u "$path"`
40761
40762  # Now try to locate executable using which
40763  new_path=`$WHICH "$new_path" 2> /dev/null`
40764  # bat and cmd files are not always considered executable in cygwin causing which
40765  # to not find them
40766  if test "x$new_path" = x \
40767      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40768      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40769    new_path=`$CYGPATH -u "$path"`
40770  fi
40771  if test "x$new_path" = x; then
40772    # Oops. Which didn't find the executable.
40773    # The splitting of arguments from the executable at a space might have been incorrect,
40774    # since paths with space are more likely in Windows. Give it another try with the whole
40775    # argument.
40776    path="$complete"
40777    arguments="EOL"
40778    new_path=`$CYGPATH -u "$path"`
40779    new_path=`$WHICH "$new_path" 2> /dev/null`
40780    # bat and cmd files are not always considered executable in cygwin causing which
40781    # to not find them
40782    if test "x$new_path" = x \
40783        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40784        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40785      new_path=`$CYGPATH -u "$path"`
40786    fi
40787    if test "x$new_path" = x; then
40788      # It's still not found. Now this is an unrecoverable error.
40789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40790$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40791      has_space=`$ECHO "$complete" | $GREP " "`
40792      if test "x$has_space" != x; then
40793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40795      fi
40796      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40797    fi
40798  fi
40799
40800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40803  # "foo.exe" is OK but "foo" is an error.
40804  #
40805  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40806  # It is also a way to make sure we got the proper file name for the real test later on.
40807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40808  if test "x$test_shortpath" = x; then
40809    # Short path failed, file does not exist as specified.
40810    # Try adding .exe or .cmd
40811    if test -f "${new_path}.exe"; then
40812      input_to_shortpath="${new_path}.exe"
40813    elif test -f "${new_path}.cmd"; then
40814      input_to_shortpath="${new_path}.cmd"
40815    else
40816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40817$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40818      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40819$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40820      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40821    fi
40822  else
40823    input_to_shortpath="$new_path"
40824  fi
40825
40826  # Call helper function which possibly converts this using DOS-style short mode.
40827  # If so, the updated path is stored in $new_path.
40828  new_path="$input_to_shortpath"
40829
40830  input_path="$input_to_shortpath"
40831  # Check if we need to convert this using DOS-style short mode. If the path
40832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40833  # take no chances and rewrite it.
40834  # Note: m4 eats our [], so we need to use [ and ] instead.
40835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40836  if test "x$has_forbidden_chars" != x; then
40837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40841      # Going to short mode and back again did indeed matter. Since short mode is
40842      # case insensitive, let's make it lowercase to improve readability.
40843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40844      # Now convert it back to Unix-style (cygpath)
40845      input_path=`$CYGPATH -u "$shortmode_path"`
40846      new_path="$input_path"
40847    fi
40848  fi
40849
40850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40851  if test "x$test_cygdrive_prefix" = x; then
40852    # As a simple fix, exclude /usr/bin since it's not a real path.
40853    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40855      # a path prefixed by /cygdrive for fixpath to work.
40856      new_path="$CYGWIN_ROOT_PATH$input_path"
40857    fi
40858  fi
40859
40860  # remove trailing .exe if any
40861  new_path="${new_path/%.exe/}"
40862
40863    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40864
40865  # First separate the path from the arguments. This will split at the first
40866  # space.
40867  complete="$GNM"
40868  path="${complete%% *}"
40869  tmp="$complete EOL"
40870  arguments="${tmp#* }"
40871
40872  # Input might be given as Windows format, start by converting to
40873  # unix format.
40874  new_path="$path"
40875
40876  windows_path="$new_path"
40877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40878    unix_path=`$CYGPATH -u "$windows_path"`
40879    new_path="$unix_path"
40880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40882    new_path="$unix_path"
40883  fi
40884
40885
40886  # Now try to locate executable using which
40887  new_path=`$WHICH "$new_path" 2> /dev/null`
40888
40889  if test "x$new_path" = x; then
40890    # Oops. Which didn't find the executable.
40891    # The splitting of arguments from the executable at a space might have been incorrect,
40892    # since paths with space are more likely in Windows. Give it another try with the whole
40893    # argument.
40894    path="$complete"
40895    arguments="EOL"
40896    new_path="$path"
40897
40898  windows_path="$new_path"
40899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40900    unix_path=`$CYGPATH -u "$windows_path"`
40901    new_path="$unix_path"
40902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40904    new_path="$unix_path"
40905  fi
40906
40907
40908    new_path=`$WHICH "$new_path" 2> /dev/null`
40909    # bat and cmd files are not always considered executable in MSYS causing which
40910    # to not find them
40911    if test "x$new_path" = x \
40912        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40913        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40914      new_path="$path"
40915
40916  windows_path="$new_path"
40917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40918    unix_path=`$CYGPATH -u "$windows_path"`
40919    new_path="$unix_path"
40920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40922    new_path="$unix_path"
40923  fi
40924
40925    fi
40926
40927    if test "x$new_path" = x; then
40928      # It's still not found. Now this is an unrecoverable error.
40929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40930$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40931      has_space=`$ECHO "$complete" | $GREP " "`
40932      if test "x$has_space" != x; then
40933        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40934$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40935      fi
40936      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40937    fi
40938  fi
40939
40940  # Now new_path has a complete unix path to the binary
40941  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40942    # Keep paths in /bin as-is, but remove trailing .exe if any
40943    new_path="${new_path/%.exe/}"
40944    # Do not save /bin paths to all_fixpath_prefixes!
40945  else
40946    # Not in mixed or Windows style, start by that.
40947    new_path=`cmd //c echo $new_path`
40948
40949  input_path="$new_path"
40950  # Check if we need to convert this using DOS-style short mode. If the path
40951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40952  # take no chances and rewrite it.
40953  # Note: m4 eats our [], so we need to use [ and ] instead.
40954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40955  if test "x$has_forbidden_chars" != x; then
40956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40958  fi
40959
40960    # Output is in $new_path
40961
40962  windows_path="$new_path"
40963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40964    unix_path=`$CYGPATH -u "$windows_path"`
40965    new_path="$unix_path"
40966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40968    new_path="$unix_path"
40969  fi
40970
40971    # remove trailing .exe if any
40972    new_path="${new_path/%.exe/}"
40973
40974    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40975    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40976  fi
40977
40978    else
40979      # We're on a unix platform. Hooray! :)
40980      # First separate the path from the arguments. This will split at the first
40981      # space.
40982      complete="$GNM"
40983      path="${complete%% *}"
40984      tmp="$complete EOL"
40985      arguments="${tmp#* }"
40986
40987      # Cannot rely on the command "which" here since it doesn't always work.
40988      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40989      if test -z "$is_absolute_path"; then
40990        # Path to executable is not absolute. Find it.
40991        IFS_save="$IFS"
40992        IFS=:
40993        for p in $PATH; do
40994          if test -f "$p/$path" && test -x "$p/$path"; then
40995            new_path="$p/$path"
40996            break
40997          fi
40998        done
40999        IFS="$IFS_save"
41000      else
41001        # This is an absolute path, we can use it without further modifications.
41002        new_path="$path"
41003      fi
41004
41005      if test "x$new_path" = x; then
41006        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41007$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41008        has_space=`$ECHO "$complete" | $GREP " "`
41009        if test "x$has_space" != x; then
41010          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41011$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41012        fi
41013        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41014      fi
41015    fi
41016
41017    # Now join together the path and the arguments once again
41018    if test "x$arguments" != xEOL; then
41019      new_complete="$new_path ${arguments% *}"
41020    else
41021      new_complete="$new_path"
41022    fi
41023
41024    if test "x$complete" != "x$new_complete"; then
41025      GNM="$new_complete"
41026      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41027$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41028    fi
41029  fi
41030
41031  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41032    # FIXME: we should unify this with the solaris case above.
41033
41034
41035  # Publish this variable in the help.
41036
41037
41038  if [ -z "${STRIP+x}" ]; then
41039    # The variable is not set by user, try to locate tool using the code snippet
41040    if test -n "$ac_tool_prefix"; then
41041  for ac_prog in strip
41042  do
41043    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41044set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41046$as_echo_n "checking for $ac_word... " >&6; }
41047if ${ac_cv_prog_STRIP+:} false; then :
41048  $as_echo_n "(cached) " >&6
41049else
41050  if test -n "$STRIP"; then
41051  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41052else
41053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41054for as_dir in $PATH
41055do
41056  IFS=$as_save_IFS
41057  test -z "$as_dir" && as_dir=.
41058    for ac_exec_ext in '' $ac_executable_extensions; do
41059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41060    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41062    break 2
41063  fi
41064done
41065  done
41066IFS=$as_save_IFS
41067
41068fi
41069fi
41070STRIP=$ac_cv_prog_STRIP
41071if test -n "$STRIP"; then
41072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41073$as_echo "$STRIP" >&6; }
41074else
41075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41076$as_echo "no" >&6; }
41077fi
41078
41079
41080    test -n "$STRIP" && break
41081  done
41082fi
41083if test -z "$STRIP"; then
41084  ac_ct_STRIP=$STRIP
41085  for ac_prog in strip
41086do
41087  # Extract the first word of "$ac_prog", so it can be a program name with args.
41088set dummy $ac_prog; ac_word=$2
41089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41090$as_echo_n "checking for $ac_word... " >&6; }
41091if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41092  $as_echo_n "(cached) " >&6
41093else
41094  if test -n "$ac_ct_STRIP"; then
41095  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41096else
41097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41098for as_dir in $PATH
41099do
41100  IFS=$as_save_IFS
41101  test -z "$as_dir" && as_dir=.
41102    for ac_exec_ext in '' $ac_executable_extensions; do
41103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41104    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41106    break 2
41107  fi
41108done
41109  done
41110IFS=$as_save_IFS
41111
41112fi
41113fi
41114ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41115if test -n "$ac_ct_STRIP"; then
41116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41117$as_echo "$ac_ct_STRIP" >&6; }
41118else
41119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41120$as_echo "no" >&6; }
41121fi
41122
41123
41124  test -n "$ac_ct_STRIP" && break
41125done
41126
41127  if test "x$ac_ct_STRIP" = x; then
41128    STRIP=""
41129  else
41130    case $cross_compiling:$ac_tool_warned in
41131yes:)
41132{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41133$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41134ac_tool_warned=yes ;;
41135esac
41136    STRIP=$ac_ct_STRIP
41137  fi
41138fi
41139
41140  else
41141    # The variable is set, but is it from the command line or the environment?
41142
41143    # Try to remove the string !STRIP! from our list.
41144    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41145    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41146      # If it failed, the variable was not from the command line. Ignore it,
41147      # but warn the user (except for BASH, which is always set by the calling BASH).
41148      if test "xSTRIP" != xBASH; then
41149        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41150$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41151      fi
41152      # Try to locate tool using the code snippet
41153      if test -n "$ac_tool_prefix"; then
41154  for ac_prog in strip
41155  do
41156    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41157set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41159$as_echo_n "checking for $ac_word... " >&6; }
41160if ${ac_cv_prog_STRIP+:} false; then :
41161  $as_echo_n "(cached) " >&6
41162else
41163  if test -n "$STRIP"; then
41164  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41165else
41166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41167for as_dir in $PATH
41168do
41169  IFS=$as_save_IFS
41170  test -z "$as_dir" && as_dir=.
41171    for ac_exec_ext in '' $ac_executable_extensions; do
41172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41173    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41175    break 2
41176  fi
41177done
41178  done
41179IFS=$as_save_IFS
41180
41181fi
41182fi
41183STRIP=$ac_cv_prog_STRIP
41184if test -n "$STRIP"; then
41185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41186$as_echo "$STRIP" >&6; }
41187else
41188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41189$as_echo "no" >&6; }
41190fi
41191
41192
41193    test -n "$STRIP" && break
41194  done
41195fi
41196if test -z "$STRIP"; then
41197  ac_ct_STRIP=$STRIP
41198  for ac_prog in strip
41199do
41200  # Extract the first word of "$ac_prog", so it can be a program name with args.
41201set dummy $ac_prog; ac_word=$2
41202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41203$as_echo_n "checking for $ac_word... " >&6; }
41204if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41205  $as_echo_n "(cached) " >&6
41206else
41207  if test -n "$ac_ct_STRIP"; then
41208  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41209else
41210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41211for as_dir in $PATH
41212do
41213  IFS=$as_save_IFS
41214  test -z "$as_dir" && as_dir=.
41215    for ac_exec_ext in '' $ac_executable_extensions; do
41216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41217    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41219    break 2
41220  fi
41221done
41222  done
41223IFS=$as_save_IFS
41224
41225fi
41226fi
41227ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41228if test -n "$ac_ct_STRIP"; then
41229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41230$as_echo "$ac_ct_STRIP" >&6; }
41231else
41232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41233$as_echo "no" >&6; }
41234fi
41235
41236
41237  test -n "$ac_ct_STRIP" && break
41238done
41239
41240  if test "x$ac_ct_STRIP" = x; then
41241    STRIP=""
41242  else
41243    case $cross_compiling:$ac_tool_warned in
41244yes:)
41245{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41246$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41247ac_tool_warned=yes ;;
41248esac
41249    STRIP=$ac_ct_STRIP
41250  fi
41251fi
41252
41253    else
41254      # If it succeeded, then it was overridden by the user. We will use it
41255      # for the tool.
41256
41257      # First remove it from the list of overridden variables, so we can test
41258      # for unknown variables in the end.
41259      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41260
41261      # Check if we try to supply an empty value
41262      if test "x$STRIP" = x; then
41263        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41264$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41265        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41266$as_echo_n "checking for STRIP... " >&6; }
41267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41268$as_echo "disabled" >&6; }
41269      else
41270        # Check if the provided tool contains a complete path.
41271        tool_specified="$STRIP"
41272        tool_basename="${tool_specified##*/}"
41273        if test "x$tool_basename" = "x$tool_specified"; then
41274          # A command without a complete path is provided, search $PATH.
41275          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41276$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41277          # Extract the first word of "$tool_basename", so it can be a program name with args.
41278set dummy $tool_basename; ac_word=$2
41279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41280$as_echo_n "checking for $ac_word... " >&6; }
41281if ${ac_cv_path_STRIP+:} false; then :
41282  $as_echo_n "(cached) " >&6
41283else
41284  case $STRIP in
41285  [\\/]* | ?:[\\/]*)
41286  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41287  ;;
41288  *)
41289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41290for as_dir in $PATH
41291do
41292  IFS=$as_save_IFS
41293  test -z "$as_dir" && as_dir=.
41294    for ac_exec_ext in '' $ac_executable_extensions; do
41295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41296    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41298    break 2
41299  fi
41300done
41301  done
41302IFS=$as_save_IFS
41303
41304  ;;
41305esac
41306fi
41307STRIP=$ac_cv_path_STRIP
41308if test -n "$STRIP"; then
41309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41310$as_echo "$STRIP" >&6; }
41311else
41312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41313$as_echo "no" >&6; }
41314fi
41315
41316
41317          if test "x$STRIP" = x; then
41318            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41319          fi
41320        else
41321          # Otherwise we believe it is a complete path. Use it as it is.
41322          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41323$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41324          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41325$as_echo_n "checking for STRIP... " >&6; }
41326          if test ! -x "$tool_specified"; then
41327            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41328$as_echo "not found" >&6; }
41329            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41330          fi
41331          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41332$as_echo "$tool_specified" >&6; }
41333        fi
41334      fi
41335    fi
41336
41337  fi
41338
41339
41340
41341  # Only process if variable expands to non-empty
41342
41343  if test "x$STRIP" != x; then
41344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41345
41346  # First separate the path from the arguments. This will split at the first
41347  # space.
41348  complete="$STRIP"
41349  path="${complete%% *}"
41350  tmp="$complete EOL"
41351  arguments="${tmp#* }"
41352
41353  # Input might be given as Windows format, start by converting to
41354  # unix format.
41355  new_path=`$CYGPATH -u "$path"`
41356
41357  # Now try to locate executable using which
41358  new_path=`$WHICH "$new_path" 2> /dev/null`
41359  # bat and cmd files are not always considered executable in cygwin causing which
41360  # to not find them
41361  if test "x$new_path" = x \
41362      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41363      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41364    new_path=`$CYGPATH -u "$path"`
41365  fi
41366  if test "x$new_path" = x; then
41367    # Oops. Which didn't find the executable.
41368    # The splitting of arguments from the executable at a space might have been incorrect,
41369    # since paths with space are more likely in Windows. Give it another try with the whole
41370    # argument.
41371    path="$complete"
41372    arguments="EOL"
41373    new_path=`$CYGPATH -u "$path"`
41374    new_path=`$WHICH "$new_path" 2> /dev/null`
41375    # bat and cmd files are not always considered executable in cygwin causing which
41376    # to not find them
41377    if test "x$new_path" = x \
41378        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41379        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41380      new_path=`$CYGPATH -u "$path"`
41381    fi
41382    if test "x$new_path" = x; then
41383      # It's still not found. Now this is an unrecoverable error.
41384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41385$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41386      has_space=`$ECHO "$complete" | $GREP " "`
41387      if test "x$has_space" != x; then
41388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41390      fi
41391      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41392    fi
41393  fi
41394
41395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41398  # "foo.exe" is OK but "foo" is an error.
41399  #
41400  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41401  # It is also a way to make sure we got the proper file name for the real test later on.
41402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41403  if test "x$test_shortpath" = x; then
41404    # Short path failed, file does not exist as specified.
41405    # Try adding .exe or .cmd
41406    if test -f "${new_path}.exe"; then
41407      input_to_shortpath="${new_path}.exe"
41408    elif test -f "${new_path}.cmd"; then
41409      input_to_shortpath="${new_path}.cmd"
41410    else
41411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41412$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41413      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41414$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41415      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41416    fi
41417  else
41418    input_to_shortpath="$new_path"
41419  fi
41420
41421  # Call helper function which possibly converts this using DOS-style short mode.
41422  # If so, the updated path is stored in $new_path.
41423  new_path="$input_to_shortpath"
41424
41425  input_path="$input_to_shortpath"
41426  # Check if we need to convert this using DOS-style short mode. If the path
41427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41428  # take no chances and rewrite it.
41429  # Note: m4 eats our [], so we need to use [ and ] instead.
41430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41431  if test "x$has_forbidden_chars" != x; then
41432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41436      # Going to short mode and back again did indeed matter. Since short mode is
41437      # case insensitive, let's make it lowercase to improve readability.
41438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41439      # Now convert it back to Unix-style (cygpath)
41440      input_path=`$CYGPATH -u "$shortmode_path"`
41441      new_path="$input_path"
41442    fi
41443  fi
41444
41445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41446  if test "x$test_cygdrive_prefix" = x; then
41447    # As a simple fix, exclude /usr/bin since it's not a real path.
41448    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41450      # a path prefixed by /cygdrive for fixpath to work.
41451      new_path="$CYGWIN_ROOT_PATH$input_path"
41452    fi
41453  fi
41454
41455  # remove trailing .exe if any
41456  new_path="${new_path/%.exe/}"
41457
41458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41459
41460  # First separate the path from the arguments. This will split at the first
41461  # space.
41462  complete="$STRIP"
41463  path="${complete%% *}"
41464  tmp="$complete EOL"
41465  arguments="${tmp#* }"
41466
41467  # Input might be given as Windows format, start by converting to
41468  # unix format.
41469  new_path="$path"
41470
41471  windows_path="$new_path"
41472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41473    unix_path=`$CYGPATH -u "$windows_path"`
41474    new_path="$unix_path"
41475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41477    new_path="$unix_path"
41478  fi
41479
41480
41481  # Now try to locate executable using which
41482  new_path=`$WHICH "$new_path" 2> /dev/null`
41483
41484  if test "x$new_path" = x; then
41485    # Oops. Which didn't find the executable.
41486    # The splitting of arguments from the executable at a space might have been incorrect,
41487    # since paths with space are more likely in Windows. Give it another try with the whole
41488    # argument.
41489    path="$complete"
41490    arguments="EOL"
41491    new_path="$path"
41492
41493  windows_path="$new_path"
41494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41495    unix_path=`$CYGPATH -u "$windows_path"`
41496    new_path="$unix_path"
41497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41499    new_path="$unix_path"
41500  fi
41501
41502
41503    new_path=`$WHICH "$new_path" 2> /dev/null`
41504    # bat and cmd files are not always considered executable in MSYS causing which
41505    # to not find them
41506    if test "x$new_path" = x \
41507        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41508        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41509      new_path="$path"
41510
41511  windows_path="$new_path"
41512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41513    unix_path=`$CYGPATH -u "$windows_path"`
41514    new_path="$unix_path"
41515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41517    new_path="$unix_path"
41518  fi
41519
41520    fi
41521
41522    if test "x$new_path" = x; then
41523      # It's still not found. Now this is an unrecoverable error.
41524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41525$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41526      has_space=`$ECHO "$complete" | $GREP " "`
41527      if test "x$has_space" != x; then
41528        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41529$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41530      fi
41531      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41532    fi
41533  fi
41534
41535  # Now new_path has a complete unix path to the binary
41536  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41537    # Keep paths in /bin as-is, but remove trailing .exe if any
41538    new_path="${new_path/%.exe/}"
41539    # Do not save /bin paths to all_fixpath_prefixes!
41540  else
41541    # Not in mixed or Windows style, start by that.
41542    new_path=`cmd //c echo $new_path`
41543
41544  input_path="$new_path"
41545  # Check if we need to convert this using DOS-style short mode. If the path
41546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41547  # take no chances and rewrite it.
41548  # Note: m4 eats our [], so we need to use [ and ] instead.
41549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41550  if test "x$has_forbidden_chars" != x; then
41551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41553  fi
41554
41555    # Output is in $new_path
41556
41557  windows_path="$new_path"
41558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41559    unix_path=`$CYGPATH -u "$windows_path"`
41560    new_path="$unix_path"
41561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41563    new_path="$unix_path"
41564  fi
41565
41566    # remove trailing .exe if any
41567    new_path="${new_path/%.exe/}"
41568
41569    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41570    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41571  fi
41572
41573    else
41574      # We're on a unix platform. Hooray! :)
41575      # First separate the path from the arguments. This will split at the first
41576      # space.
41577      complete="$STRIP"
41578      path="${complete%% *}"
41579      tmp="$complete EOL"
41580      arguments="${tmp#* }"
41581
41582      # Cannot rely on the command "which" here since it doesn't always work.
41583      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41584      if test -z "$is_absolute_path"; then
41585        # Path to executable is not absolute. Find it.
41586        IFS_save="$IFS"
41587        IFS=:
41588        for p in $PATH; do
41589          if test -f "$p/$path" && test -x "$p/$path"; then
41590            new_path="$p/$path"
41591            break
41592          fi
41593        done
41594        IFS="$IFS_save"
41595      else
41596        # This is an absolute path, we can use it without further modifications.
41597        new_path="$path"
41598      fi
41599
41600      if test "x$new_path" = x; then
41601        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41602$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41603        has_space=`$ECHO "$complete" | $GREP " "`
41604        if test "x$has_space" != x; then
41605          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41606$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41607        fi
41608        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41609      fi
41610    fi
41611
41612    # Now join together the path and the arguments once again
41613    if test "x$arguments" != xEOL; then
41614      new_complete="$new_path ${arguments% *}"
41615    else
41616      new_complete="$new_path"
41617    fi
41618
41619    if test "x$complete" != "x$new_complete"; then
41620      STRIP="$new_complete"
41621      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41622$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41623    fi
41624  fi
41625
41626    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41627
41628
41629  # Publish this variable in the help.
41630
41631
41632  if [ -z "${NM+x}" ]; then
41633    # The variable is not set by user, try to locate tool using the code snippet
41634    if test -n "$ac_tool_prefix"; then
41635  for ac_prog in nm gcc-nm
41636  do
41637    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41638set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41640$as_echo_n "checking for $ac_word... " >&6; }
41641if ${ac_cv_prog_NM+:} false; then :
41642  $as_echo_n "(cached) " >&6
41643else
41644  if test -n "$NM"; then
41645  ac_cv_prog_NM="$NM" # Let the user override the test.
41646else
41647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41648for as_dir in $PATH
41649do
41650  IFS=$as_save_IFS
41651  test -z "$as_dir" && as_dir=.
41652    for ac_exec_ext in '' $ac_executable_extensions; do
41653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41654    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41656    break 2
41657  fi
41658done
41659  done
41660IFS=$as_save_IFS
41661
41662fi
41663fi
41664NM=$ac_cv_prog_NM
41665if test -n "$NM"; then
41666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41667$as_echo "$NM" >&6; }
41668else
41669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41670$as_echo "no" >&6; }
41671fi
41672
41673
41674    test -n "$NM" && break
41675  done
41676fi
41677if test -z "$NM"; then
41678  ac_ct_NM=$NM
41679  for ac_prog in nm gcc-nm
41680do
41681  # Extract the first word of "$ac_prog", so it can be a program name with args.
41682set dummy $ac_prog; ac_word=$2
41683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41684$as_echo_n "checking for $ac_word... " >&6; }
41685if ${ac_cv_prog_ac_ct_NM+:} false; then :
41686  $as_echo_n "(cached) " >&6
41687else
41688  if test -n "$ac_ct_NM"; then
41689  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41690else
41691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41692for as_dir in $PATH
41693do
41694  IFS=$as_save_IFS
41695  test -z "$as_dir" && as_dir=.
41696    for ac_exec_ext in '' $ac_executable_extensions; do
41697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41698    ac_cv_prog_ac_ct_NM="$ac_prog"
41699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41700    break 2
41701  fi
41702done
41703  done
41704IFS=$as_save_IFS
41705
41706fi
41707fi
41708ac_ct_NM=$ac_cv_prog_ac_ct_NM
41709if test -n "$ac_ct_NM"; then
41710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41711$as_echo "$ac_ct_NM" >&6; }
41712else
41713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41714$as_echo "no" >&6; }
41715fi
41716
41717
41718  test -n "$ac_ct_NM" && break
41719done
41720
41721  if test "x$ac_ct_NM" = x; then
41722    NM=""
41723  else
41724    case $cross_compiling:$ac_tool_warned in
41725yes:)
41726{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41727$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41728ac_tool_warned=yes ;;
41729esac
41730    NM=$ac_ct_NM
41731  fi
41732fi
41733
41734  else
41735    # The variable is set, but is it from the command line or the environment?
41736
41737    # Try to remove the string !NM! from our list.
41738    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41739    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41740      # If it failed, the variable was not from the command line. Ignore it,
41741      # but warn the user (except for BASH, which is always set by the calling BASH).
41742      if test "xNM" != xBASH; then
41743        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41744$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41745      fi
41746      # Try to locate tool using the code snippet
41747      if test -n "$ac_tool_prefix"; then
41748  for ac_prog in nm gcc-nm
41749  do
41750    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41751set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41753$as_echo_n "checking for $ac_word... " >&6; }
41754if ${ac_cv_prog_NM+:} false; then :
41755  $as_echo_n "(cached) " >&6
41756else
41757  if test -n "$NM"; then
41758  ac_cv_prog_NM="$NM" # Let the user override the test.
41759else
41760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41761for as_dir in $PATH
41762do
41763  IFS=$as_save_IFS
41764  test -z "$as_dir" && as_dir=.
41765    for ac_exec_ext in '' $ac_executable_extensions; do
41766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41767    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41769    break 2
41770  fi
41771done
41772  done
41773IFS=$as_save_IFS
41774
41775fi
41776fi
41777NM=$ac_cv_prog_NM
41778if test -n "$NM"; then
41779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41780$as_echo "$NM" >&6; }
41781else
41782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41783$as_echo "no" >&6; }
41784fi
41785
41786
41787    test -n "$NM" && break
41788  done
41789fi
41790if test -z "$NM"; then
41791  ac_ct_NM=$NM
41792  for ac_prog in nm gcc-nm
41793do
41794  # Extract the first word of "$ac_prog", so it can be a program name with args.
41795set dummy $ac_prog; ac_word=$2
41796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41797$as_echo_n "checking for $ac_word... " >&6; }
41798if ${ac_cv_prog_ac_ct_NM+:} false; then :
41799  $as_echo_n "(cached) " >&6
41800else
41801  if test -n "$ac_ct_NM"; then
41802  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41803else
41804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41805for as_dir in $PATH
41806do
41807  IFS=$as_save_IFS
41808  test -z "$as_dir" && as_dir=.
41809    for ac_exec_ext in '' $ac_executable_extensions; do
41810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41811    ac_cv_prog_ac_ct_NM="$ac_prog"
41812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41813    break 2
41814  fi
41815done
41816  done
41817IFS=$as_save_IFS
41818
41819fi
41820fi
41821ac_ct_NM=$ac_cv_prog_ac_ct_NM
41822if test -n "$ac_ct_NM"; then
41823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41824$as_echo "$ac_ct_NM" >&6; }
41825else
41826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41827$as_echo "no" >&6; }
41828fi
41829
41830
41831  test -n "$ac_ct_NM" && break
41832done
41833
41834  if test "x$ac_ct_NM" = x; then
41835    NM=""
41836  else
41837    case $cross_compiling:$ac_tool_warned in
41838yes:)
41839{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41840$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41841ac_tool_warned=yes ;;
41842esac
41843    NM=$ac_ct_NM
41844  fi
41845fi
41846
41847    else
41848      # If it succeeded, then it was overridden by the user. We will use it
41849      # for the tool.
41850
41851      # First remove it from the list of overridden variables, so we can test
41852      # for unknown variables in the end.
41853      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41854
41855      # Check if we try to supply an empty value
41856      if test "x$NM" = x; then
41857        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41858$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41859        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41860$as_echo_n "checking for NM... " >&6; }
41861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41862$as_echo "disabled" >&6; }
41863      else
41864        # Check if the provided tool contains a complete path.
41865        tool_specified="$NM"
41866        tool_basename="${tool_specified##*/}"
41867        if test "x$tool_basename" = "x$tool_specified"; then
41868          # A command without a complete path is provided, search $PATH.
41869          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41870$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41871          # Extract the first word of "$tool_basename", so it can be a program name with args.
41872set dummy $tool_basename; ac_word=$2
41873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41874$as_echo_n "checking for $ac_word... " >&6; }
41875if ${ac_cv_path_NM+:} false; then :
41876  $as_echo_n "(cached) " >&6
41877else
41878  case $NM in
41879  [\\/]* | ?:[\\/]*)
41880  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41881  ;;
41882  *)
41883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41884for as_dir in $PATH
41885do
41886  IFS=$as_save_IFS
41887  test -z "$as_dir" && as_dir=.
41888    for ac_exec_ext in '' $ac_executable_extensions; do
41889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41890    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41892    break 2
41893  fi
41894done
41895  done
41896IFS=$as_save_IFS
41897
41898  ;;
41899esac
41900fi
41901NM=$ac_cv_path_NM
41902if test -n "$NM"; then
41903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41904$as_echo "$NM" >&6; }
41905else
41906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41907$as_echo "no" >&6; }
41908fi
41909
41910
41911          if test "x$NM" = x; then
41912            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41913          fi
41914        else
41915          # Otherwise we believe it is a complete path. Use it as it is.
41916          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41917$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41918          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41919$as_echo_n "checking for NM... " >&6; }
41920          if test ! -x "$tool_specified"; then
41921            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41922$as_echo "not found" >&6; }
41923            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41924          fi
41925          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41926$as_echo "$tool_specified" >&6; }
41927        fi
41928      fi
41929    fi
41930
41931  fi
41932
41933
41934    else
41935
41936
41937  # Publish this variable in the help.
41938
41939
41940  if [ -z "${NM+x}" ]; then
41941    # The variable is not set by user, try to locate tool using the code snippet
41942    if test -n "$ac_tool_prefix"; then
41943  for ac_prog in nm
41944  do
41945    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41946set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41948$as_echo_n "checking for $ac_word... " >&6; }
41949if ${ac_cv_prog_NM+:} false; then :
41950  $as_echo_n "(cached) " >&6
41951else
41952  if test -n "$NM"; then
41953  ac_cv_prog_NM="$NM" # Let the user override the test.
41954else
41955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41956for as_dir in $PATH
41957do
41958  IFS=$as_save_IFS
41959  test -z "$as_dir" && as_dir=.
41960    for ac_exec_ext in '' $ac_executable_extensions; do
41961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41962    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41964    break 2
41965  fi
41966done
41967  done
41968IFS=$as_save_IFS
41969
41970fi
41971fi
41972NM=$ac_cv_prog_NM
41973if test -n "$NM"; then
41974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41975$as_echo "$NM" >&6; }
41976else
41977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41978$as_echo "no" >&6; }
41979fi
41980
41981
41982    test -n "$NM" && break
41983  done
41984fi
41985if test -z "$NM"; then
41986  ac_ct_NM=$NM
41987  for ac_prog in nm
41988do
41989  # Extract the first word of "$ac_prog", so it can be a program name with args.
41990set dummy $ac_prog; ac_word=$2
41991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41992$as_echo_n "checking for $ac_word... " >&6; }
41993if ${ac_cv_prog_ac_ct_NM+:} false; then :
41994  $as_echo_n "(cached) " >&6
41995else
41996  if test -n "$ac_ct_NM"; then
41997  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41998else
41999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42000for as_dir in $PATH
42001do
42002  IFS=$as_save_IFS
42003  test -z "$as_dir" && as_dir=.
42004    for ac_exec_ext in '' $ac_executable_extensions; do
42005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42006    ac_cv_prog_ac_ct_NM="$ac_prog"
42007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42008    break 2
42009  fi
42010done
42011  done
42012IFS=$as_save_IFS
42013
42014fi
42015fi
42016ac_ct_NM=$ac_cv_prog_ac_ct_NM
42017if test -n "$ac_ct_NM"; then
42018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42019$as_echo "$ac_ct_NM" >&6; }
42020else
42021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42022$as_echo "no" >&6; }
42023fi
42024
42025
42026  test -n "$ac_ct_NM" && break
42027done
42028
42029  if test "x$ac_ct_NM" = x; then
42030    NM=""
42031  else
42032    case $cross_compiling:$ac_tool_warned in
42033yes:)
42034{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42035$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42036ac_tool_warned=yes ;;
42037esac
42038    NM=$ac_ct_NM
42039  fi
42040fi
42041
42042  else
42043    # The variable is set, but is it from the command line or the environment?
42044
42045    # Try to remove the string !NM! from our list.
42046    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42047    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42048      # If it failed, the variable was not from the command line. Ignore it,
42049      # but warn the user (except for BASH, which is always set by the calling BASH).
42050      if test "xNM" != xBASH; then
42051        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42052$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42053      fi
42054      # Try to locate tool using the code snippet
42055      if test -n "$ac_tool_prefix"; then
42056  for ac_prog in nm
42057  do
42058    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42059set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42061$as_echo_n "checking for $ac_word... " >&6; }
42062if ${ac_cv_prog_NM+:} false; then :
42063  $as_echo_n "(cached) " >&6
42064else
42065  if test -n "$NM"; then
42066  ac_cv_prog_NM="$NM" # Let the user override the test.
42067else
42068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42069for as_dir in $PATH
42070do
42071  IFS=$as_save_IFS
42072  test -z "$as_dir" && as_dir=.
42073    for ac_exec_ext in '' $ac_executable_extensions; do
42074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42075    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42077    break 2
42078  fi
42079done
42080  done
42081IFS=$as_save_IFS
42082
42083fi
42084fi
42085NM=$ac_cv_prog_NM
42086if test -n "$NM"; then
42087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42088$as_echo "$NM" >&6; }
42089else
42090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42091$as_echo "no" >&6; }
42092fi
42093
42094
42095    test -n "$NM" && break
42096  done
42097fi
42098if test -z "$NM"; then
42099  ac_ct_NM=$NM
42100  for ac_prog in nm
42101do
42102  # Extract the first word of "$ac_prog", so it can be a program name with args.
42103set dummy $ac_prog; ac_word=$2
42104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42105$as_echo_n "checking for $ac_word... " >&6; }
42106if ${ac_cv_prog_ac_ct_NM+:} false; then :
42107  $as_echo_n "(cached) " >&6
42108else
42109  if test -n "$ac_ct_NM"; then
42110  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42111else
42112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42113for as_dir in $PATH
42114do
42115  IFS=$as_save_IFS
42116  test -z "$as_dir" && as_dir=.
42117    for ac_exec_ext in '' $ac_executable_extensions; do
42118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42119    ac_cv_prog_ac_ct_NM="$ac_prog"
42120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42121    break 2
42122  fi
42123done
42124  done
42125IFS=$as_save_IFS
42126
42127fi
42128fi
42129ac_ct_NM=$ac_cv_prog_ac_ct_NM
42130if test -n "$ac_ct_NM"; then
42131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42132$as_echo "$ac_ct_NM" >&6; }
42133else
42134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42135$as_echo "no" >&6; }
42136fi
42137
42138
42139  test -n "$ac_ct_NM" && break
42140done
42141
42142  if test "x$ac_ct_NM" = x; then
42143    NM=""
42144  else
42145    case $cross_compiling:$ac_tool_warned in
42146yes:)
42147{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42148$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42149ac_tool_warned=yes ;;
42150esac
42151    NM=$ac_ct_NM
42152  fi
42153fi
42154
42155    else
42156      # If it succeeded, then it was overridden by the user. We will use it
42157      # for the tool.
42158
42159      # First remove it from the list of overridden variables, so we can test
42160      # for unknown variables in the end.
42161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42162
42163      # Check if we try to supply an empty value
42164      if test "x$NM" = x; then
42165        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42166$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42167        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42168$as_echo_n "checking for NM... " >&6; }
42169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42170$as_echo "disabled" >&6; }
42171      else
42172        # Check if the provided tool contains a complete path.
42173        tool_specified="$NM"
42174        tool_basename="${tool_specified##*/}"
42175        if test "x$tool_basename" = "x$tool_specified"; then
42176          # A command without a complete path is provided, search $PATH.
42177          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42178$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42179          # Extract the first word of "$tool_basename", so it can be a program name with args.
42180set dummy $tool_basename; ac_word=$2
42181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42182$as_echo_n "checking for $ac_word... " >&6; }
42183if ${ac_cv_path_NM+:} false; then :
42184  $as_echo_n "(cached) " >&6
42185else
42186  case $NM in
42187  [\\/]* | ?:[\\/]*)
42188  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42189  ;;
42190  *)
42191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42192for as_dir in $PATH
42193do
42194  IFS=$as_save_IFS
42195  test -z "$as_dir" && as_dir=.
42196    for ac_exec_ext in '' $ac_executable_extensions; do
42197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42198    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42200    break 2
42201  fi
42202done
42203  done
42204IFS=$as_save_IFS
42205
42206  ;;
42207esac
42208fi
42209NM=$ac_cv_path_NM
42210if test -n "$NM"; then
42211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42212$as_echo "$NM" >&6; }
42213else
42214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42215$as_echo "no" >&6; }
42216fi
42217
42218
42219          if test "x$NM" = x; then
42220            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42221          fi
42222        else
42223          # Otherwise we believe it is a complete path. Use it as it is.
42224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42225$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42226          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42227$as_echo_n "checking for NM... " >&6; }
42228          if test ! -x "$tool_specified"; then
42229            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42230$as_echo "not found" >&6; }
42231            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42232          fi
42233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42234$as_echo "$tool_specified" >&6; }
42235        fi
42236      fi
42237    fi
42238
42239  fi
42240
42241
42242    fi
42243
42244  # Only process if variable expands to non-empty
42245
42246  if test "x$NM" != x; then
42247    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42248
42249  # First separate the path from the arguments. This will split at the first
42250  # space.
42251  complete="$NM"
42252  path="${complete%% *}"
42253  tmp="$complete EOL"
42254  arguments="${tmp#* }"
42255
42256  # Input might be given as Windows format, start by converting to
42257  # unix format.
42258  new_path=`$CYGPATH -u "$path"`
42259
42260  # Now try to locate executable using which
42261  new_path=`$WHICH "$new_path" 2> /dev/null`
42262  # bat and cmd files are not always considered executable in cygwin causing which
42263  # to not find them
42264  if test "x$new_path" = x \
42265      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42266      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42267    new_path=`$CYGPATH -u "$path"`
42268  fi
42269  if test "x$new_path" = x; then
42270    # Oops. Which didn't find the executable.
42271    # The splitting of arguments from the executable at a space might have been incorrect,
42272    # since paths with space are more likely in Windows. Give it another try with the whole
42273    # argument.
42274    path="$complete"
42275    arguments="EOL"
42276    new_path=`$CYGPATH -u "$path"`
42277    new_path=`$WHICH "$new_path" 2> /dev/null`
42278    # bat and cmd files are not always considered executable in cygwin causing which
42279    # to not find them
42280    if test "x$new_path" = x \
42281        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42282        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42283      new_path=`$CYGPATH -u "$path"`
42284    fi
42285    if test "x$new_path" = x; then
42286      # It's still not found. Now this is an unrecoverable error.
42287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42288$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42289      has_space=`$ECHO "$complete" | $GREP " "`
42290      if test "x$has_space" != x; then
42291        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42292$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42293      fi
42294      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42295    fi
42296  fi
42297
42298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42301  # "foo.exe" is OK but "foo" is an error.
42302  #
42303  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42304  # It is also a way to make sure we got the proper file name for the real test later on.
42305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42306  if test "x$test_shortpath" = x; then
42307    # Short path failed, file does not exist as specified.
42308    # Try adding .exe or .cmd
42309    if test -f "${new_path}.exe"; then
42310      input_to_shortpath="${new_path}.exe"
42311    elif test -f "${new_path}.cmd"; then
42312      input_to_shortpath="${new_path}.cmd"
42313    else
42314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42315$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42316      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42317$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42318      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42319    fi
42320  else
42321    input_to_shortpath="$new_path"
42322  fi
42323
42324  # Call helper function which possibly converts this using DOS-style short mode.
42325  # If so, the updated path is stored in $new_path.
42326  new_path="$input_to_shortpath"
42327
42328  input_path="$input_to_shortpath"
42329  # Check if we need to convert this using DOS-style short mode. If the path
42330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42331  # take no chances and rewrite it.
42332  # Note: m4 eats our [], so we need to use [ and ] instead.
42333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42334  if test "x$has_forbidden_chars" != x; then
42335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42339      # Going to short mode and back again did indeed matter. Since short mode is
42340      # case insensitive, let's make it lowercase to improve readability.
42341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42342      # Now convert it back to Unix-style (cygpath)
42343      input_path=`$CYGPATH -u "$shortmode_path"`
42344      new_path="$input_path"
42345    fi
42346  fi
42347
42348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42349  if test "x$test_cygdrive_prefix" = x; then
42350    # As a simple fix, exclude /usr/bin since it's not a real path.
42351    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42353      # a path prefixed by /cygdrive for fixpath to work.
42354      new_path="$CYGWIN_ROOT_PATH$input_path"
42355    fi
42356  fi
42357
42358  # remove trailing .exe if any
42359  new_path="${new_path/%.exe/}"
42360
42361    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42362
42363  # First separate the path from the arguments. This will split at the first
42364  # space.
42365  complete="$NM"
42366  path="${complete%% *}"
42367  tmp="$complete EOL"
42368  arguments="${tmp#* }"
42369
42370  # Input might be given as Windows format, start by converting to
42371  # unix format.
42372  new_path="$path"
42373
42374  windows_path="$new_path"
42375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42376    unix_path=`$CYGPATH -u "$windows_path"`
42377    new_path="$unix_path"
42378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42380    new_path="$unix_path"
42381  fi
42382
42383
42384  # Now try to locate executable using which
42385  new_path=`$WHICH "$new_path" 2> /dev/null`
42386
42387  if test "x$new_path" = x; then
42388    # Oops. Which didn't find the executable.
42389    # The splitting of arguments from the executable at a space might have been incorrect,
42390    # since paths with space are more likely in Windows. Give it another try with the whole
42391    # argument.
42392    path="$complete"
42393    arguments="EOL"
42394    new_path="$path"
42395
42396  windows_path="$new_path"
42397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42398    unix_path=`$CYGPATH -u "$windows_path"`
42399    new_path="$unix_path"
42400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42402    new_path="$unix_path"
42403  fi
42404
42405
42406    new_path=`$WHICH "$new_path" 2> /dev/null`
42407    # bat and cmd files are not always considered executable in MSYS causing which
42408    # to not find them
42409    if test "x$new_path" = x \
42410        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42411        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42412      new_path="$path"
42413
42414  windows_path="$new_path"
42415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42416    unix_path=`$CYGPATH -u "$windows_path"`
42417    new_path="$unix_path"
42418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42420    new_path="$unix_path"
42421  fi
42422
42423    fi
42424
42425    if test "x$new_path" = x; then
42426      # It's still not found. Now this is an unrecoverable error.
42427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42428$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42429      has_space=`$ECHO "$complete" | $GREP " "`
42430      if test "x$has_space" != x; then
42431        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42432$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42433      fi
42434      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42435    fi
42436  fi
42437
42438  # Now new_path has a complete unix path to the binary
42439  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42440    # Keep paths in /bin as-is, but remove trailing .exe if any
42441    new_path="${new_path/%.exe/}"
42442    # Do not save /bin paths to all_fixpath_prefixes!
42443  else
42444    # Not in mixed or Windows style, start by that.
42445    new_path=`cmd //c echo $new_path`
42446
42447  input_path="$new_path"
42448  # Check if we need to convert this using DOS-style short mode. If the path
42449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42450  # take no chances and rewrite it.
42451  # Note: m4 eats our [], so we need to use [ and ] instead.
42452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42453  if test "x$has_forbidden_chars" != x; then
42454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42456  fi
42457
42458    # Output is in $new_path
42459
42460  windows_path="$new_path"
42461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42462    unix_path=`$CYGPATH -u "$windows_path"`
42463    new_path="$unix_path"
42464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42466    new_path="$unix_path"
42467  fi
42468
42469    # remove trailing .exe if any
42470    new_path="${new_path/%.exe/}"
42471
42472    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42473    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42474  fi
42475
42476    else
42477      # We're on a unix platform. Hooray! :)
42478      # First separate the path from the arguments. This will split at the first
42479      # space.
42480      complete="$NM"
42481      path="${complete%% *}"
42482      tmp="$complete EOL"
42483      arguments="${tmp#* }"
42484
42485      # Cannot rely on the command "which" here since it doesn't always work.
42486      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42487      if test -z "$is_absolute_path"; then
42488        # Path to executable is not absolute. Find it.
42489        IFS_save="$IFS"
42490        IFS=:
42491        for p in $PATH; do
42492          if test -f "$p/$path" && test -x "$p/$path"; then
42493            new_path="$p/$path"
42494            break
42495          fi
42496        done
42497        IFS="$IFS_save"
42498      else
42499        # This is an absolute path, we can use it without further modifications.
42500        new_path="$path"
42501      fi
42502
42503      if test "x$new_path" = x; then
42504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42505$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42506        has_space=`$ECHO "$complete" | $GREP " "`
42507        if test "x$has_space" != x; then
42508          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42509$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42510        fi
42511        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42512      fi
42513    fi
42514
42515    # Now join together the path and the arguments once again
42516    if test "x$arguments" != xEOL; then
42517      new_complete="$new_path ${arguments% *}"
42518    else
42519      new_complete="$new_path"
42520    fi
42521
42522    if test "x$complete" != "x$new_complete"; then
42523      NM="$new_complete"
42524      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42525$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42526    fi
42527  fi
42528
42529    GNM="$NM"
42530
42531  fi
42532
42533  # objcopy is used for moving debug symbols to separate files when
42534  # full debug symbols are enabled.
42535  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42536
42537
42538  # Publish this variable in the help.
42539
42540
42541  if [ -z "${OBJCOPY+x}" ]; then
42542    # The variable is not set by user, try to locate tool using the code snippet
42543    if test -n "$ac_tool_prefix"; then
42544  for ac_prog in gobjcopy objcopy
42545  do
42546    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42547set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42549$as_echo_n "checking for $ac_word... " >&6; }
42550if ${ac_cv_prog_OBJCOPY+:} false; then :
42551  $as_echo_n "(cached) " >&6
42552else
42553  if test -n "$OBJCOPY"; then
42554  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42555else
42556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42557for as_dir in $PATH
42558do
42559  IFS=$as_save_IFS
42560  test -z "$as_dir" && as_dir=.
42561    for ac_exec_ext in '' $ac_executable_extensions; do
42562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42563    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42565    break 2
42566  fi
42567done
42568  done
42569IFS=$as_save_IFS
42570
42571fi
42572fi
42573OBJCOPY=$ac_cv_prog_OBJCOPY
42574if test -n "$OBJCOPY"; then
42575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42576$as_echo "$OBJCOPY" >&6; }
42577else
42578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42579$as_echo "no" >&6; }
42580fi
42581
42582
42583    test -n "$OBJCOPY" && break
42584  done
42585fi
42586if test -z "$OBJCOPY"; then
42587  ac_ct_OBJCOPY=$OBJCOPY
42588  for ac_prog in gobjcopy objcopy
42589do
42590  # Extract the first word of "$ac_prog", so it can be a program name with args.
42591set dummy $ac_prog; ac_word=$2
42592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42593$as_echo_n "checking for $ac_word... " >&6; }
42594if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42595  $as_echo_n "(cached) " >&6
42596else
42597  if test -n "$ac_ct_OBJCOPY"; then
42598  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42599else
42600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42601for as_dir in $PATH
42602do
42603  IFS=$as_save_IFS
42604  test -z "$as_dir" && as_dir=.
42605    for ac_exec_ext in '' $ac_executable_extensions; do
42606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42607    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42609    break 2
42610  fi
42611done
42612  done
42613IFS=$as_save_IFS
42614
42615fi
42616fi
42617ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42618if test -n "$ac_ct_OBJCOPY"; then
42619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42620$as_echo "$ac_ct_OBJCOPY" >&6; }
42621else
42622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42623$as_echo "no" >&6; }
42624fi
42625
42626
42627  test -n "$ac_ct_OBJCOPY" && break
42628done
42629
42630  if test "x$ac_ct_OBJCOPY" = x; then
42631    OBJCOPY=""
42632  else
42633    case $cross_compiling:$ac_tool_warned in
42634yes:)
42635{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42636$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42637ac_tool_warned=yes ;;
42638esac
42639    OBJCOPY=$ac_ct_OBJCOPY
42640  fi
42641fi
42642
42643  else
42644    # The variable is set, but is it from the command line or the environment?
42645
42646    # Try to remove the string !OBJCOPY! from our list.
42647    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42648    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42649      # If it failed, the variable was not from the command line. Ignore it,
42650      # but warn the user (except for BASH, which is always set by the calling BASH).
42651      if test "xOBJCOPY" != xBASH; then
42652        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42653$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42654      fi
42655      # Try to locate tool using the code snippet
42656      if test -n "$ac_tool_prefix"; then
42657  for ac_prog in gobjcopy objcopy
42658  do
42659    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42660set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42662$as_echo_n "checking for $ac_word... " >&6; }
42663if ${ac_cv_prog_OBJCOPY+:} false; then :
42664  $as_echo_n "(cached) " >&6
42665else
42666  if test -n "$OBJCOPY"; then
42667  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42668else
42669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42670for as_dir in $PATH
42671do
42672  IFS=$as_save_IFS
42673  test -z "$as_dir" && as_dir=.
42674    for ac_exec_ext in '' $ac_executable_extensions; do
42675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42676    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42678    break 2
42679  fi
42680done
42681  done
42682IFS=$as_save_IFS
42683
42684fi
42685fi
42686OBJCOPY=$ac_cv_prog_OBJCOPY
42687if test -n "$OBJCOPY"; then
42688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42689$as_echo "$OBJCOPY" >&6; }
42690else
42691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42692$as_echo "no" >&6; }
42693fi
42694
42695
42696    test -n "$OBJCOPY" && break
42697  done
42698fi
42699if test -z "$OBJCOPY"; then
42700  ac_ct_OBJCOPY=$OBJCOPY
42701  for ac_prog in gobjcopy objcopy
42702do
42703  # Extract the first word of "$ac_prog", so it can be a program name with args.
42704set dummy $ac_prog; ac_word=$2
42705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42706$as_echo_n "checking for $ac_word... " >&6; }
42707if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42708  $as_echo_n "(cached) " >&6
42709else
42710  if test -n "$ac_ct_OBJCOPY"; then
42711  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42712else
42713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42714for as_dir in $PATH
42715do
42716  IFS=$as_save_IFS
42717  test -z "$as_dir" && as_dir=.
42718    for ac_exec_ext in '' $ac_executable_extensions; do
42719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42720    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42722    break 2
42723  fi
42724done
42725  done
42726IFS=$as_save_IFS
42727
42728fi
42729fi
42730ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42731if test -n "$ac_ct_OBJCOPY"; then
42732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42733$as_echo "$ac_ct_OBJCOPY" >&6; }
42734else
42735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42736$as_echo "no" >&6; }
42737fi
42738
42739
42740  test -n "$ac_ct_OBJCOPY" && break
42741done
42742
42743  if test "x$ac_ct_OBJCOPY" = x; then
42744    OBJCOPY=""
42745  else
42746    case $cross_compiling:$ac_tool_warned in
42747yes:)
42748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42750ac_tool_warned=yes ;;
42751esac
42752    OBJCOPY=$ac_ct_OBJCOPY
42753  fi
42754fi
42755
42756    else
42757      # If it succeeded, then it was overridden by the user. We will use it
42758      # for the tool.
42759
42760      # First remove it from the list of overridden variables, so we can test
42761      # for unknown variables in the end.
42762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42763
42764      # Check if we try to supply an empty value
42765      if test "x$OBJCOPY" = x; then
42766        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42767$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42769$as_echo_n "checking for OBJCOPY... " >&6; }
42770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42771$as_echo "disabled" >&6; }
42772      else
42773        # Check if the provided tool contains a complete path.
42774        tool_specified="$OBJCOPY"
42775        tool_basename="${tool_specified##*/}"
42776        if test "x$tool_basename" = "x$tool_specified"; then
42777          # A command without a complete path is provided, search $PATH.
42778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42779$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42780          # Extract the first word of "$tool_basename", so it can be a program name with args.
42781set dummy $tool_basename; ac_word=$2
42782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42783$as_echo_n "checking for $ac_word... " >&6; }
42784if ${ac_cv_path_OBJCOPY+:} false; then :
42785  $as_echo_n "(cached) " >&6
42786else
42787  case $OBJCOPY in
42788  [\\/]* | ?:[\\/]*)
42789  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42790  ;;
42791  *)
42792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42793for as_dir in $PATH
42794do
42795  IFS=$as_save_IFS
42796  test -z "$as_dir" && as_dir=.
42797    for ac_exec_ext in '' $ac_executable_extensions; do
42798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42799    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42801    break 2
42802  fi
42803done
42804  done
42805IFS=$as_save_IFS
42806
42807  ;;
42808esac
42809fi
42810OBJCOPY=$ac_cv_path_OBJCOPY
42811if test -n "$OBJCOPY"; then
42812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42813$as_echo "$OBJCOPY" >&6; }
42814else
42815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42816$as_echo "no" >&6; }
42817fi
42818
42819
42820          if test "x$OBJCOPY" = x; then
42821            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42822          fi
42823        else
42824          # Otherwise we believe it is a complete path. Use it as it is.
42825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42826$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42827          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42828$as_echo_n "checking for OBJCOPY... " >&6; }
42829          if test ! -x "$tool_specified"; then
42830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42831$as_echo "not found" >&6; }
42832            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42833          fi
42834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42835$as_echo "$tool_specified" >&6; }
42836        fi
42837      fi
42838    fi
42839
42840  fi
42841
42842
42843    # Only call fixup if objcopy was found.
42844    if test -n "$OBJCOPY"; then
42845
42846  # Only process if variable expands to non-empty
42847
42848  if test "x$OBJCOPY" != x; then
42849    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42850
42851  # First separate the path from the arguments. This will split at the first
42852  # space.
42853  complete="$OBJCOPY"
42854  path="${complete%% *}"
42855  tmp="$complete EOL"
42856  arguments="${tmp#* }"
42857
42858  # Input might be given as Windows format, start by converting to
42859  # unix format.
42860  new_path=`$CYGPATH -u "$path"`
42861
42862  # Now try to locate executable using which
42863  new_path=`$WHICH "$new_path" 2> /dev/null`
42864  # bat and cmd files are not always considered executable in cygwin causing which
42865  # to not find them
42866  if test "x$new_path" = x \
42867      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42868      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42869    new_path=`$CYGPATH -u "$path"`
42870  fi
42871  if test "x$new_path" = x; then
42872    # Oops. Which didn't find the executable.
42873    # The splitting of arguments from the executable at a space might have been incorrect,
42874    # since paths with space are more likely in Windows. Give it another try with the whole
42875    # argument.
42876    path="$complete"
42877    arguments="EOL"
42878    new_path=`$CYGPATH -u "$path"`
42879    new_path=`$WHICH "$new_path" 2> /dev/null`
42880    # bat and cmd files are not always considered executable in cygwin causing which
42881    # to not find them
42882    if test "x$new_path" = x \
42883        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42884        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42885      new_path=`$CYGPATH -u "$path"`
42886    fi
42887    if test "x$new_path" = x; then
42888      # It's still not found. Now this is an unrecoverable error.
42889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42890$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42891      has_space=`$ECHO "$complete" | $GREP " "`
42892      if test "x$has_space" != x; then
42893        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42894$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42895      fi
42896      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42897    fi
42898  fi
42899
42900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42903  # "foo.exe" is OK but "foo" is an error.
42904  #
42905  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42906  # It is also a way to make sure we got the proper file name for the real test later on.
42907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42908  if test "x$test_shortpath" = x; then
42909    # Short path failed, file does not exist as specified.
42910    # Try adding .exe or .cmd
42911    if test -f "${new_path}.exe"; then
42912      input_to_shortpath="${new_path}.exe"
42913    elif test -f "${new_path}.cmd"; then
42914      input_to_shortpath="${new_path}.cmd"
42915    else
42916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42917$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42918      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42919$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42920      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42921    fi
42922  else
42923    input_to_shortpath="$new_path"
42924  fi
42925
42926  # Call helper function which possibly converts this using DOS-style short mode.
42927  # If so, the updated path is stored in $new_path.
42928  new_path="$input_to_shortpath"
42929
42930  input_path="$input_to_shortpath"
42931  # Check if we need to convert this using DOS-style short mode. If the path
42932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42933  # take no chances and rewrite it.
42934  # Note: m4 eats our [], so we need to use [ and ] instead.
42935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42936  if test "x$has_forbidden_chars" != x; then
42937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42941      # Going to short mode and back again did indeed matter. Since short mode is
42942      # case insensitive, let's make it lowercase to improve readability.
42943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42944      # Now convert it back to Unix-style (cygpath)
42945      input_path=`$CYGPATH -u "$shortmode_path"`
42946      new_path="$input_path"
42947    fi
42948  fi
42949
42950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42951  if test "x$test_cygdrive_prefix" = x; then
42952    # As a simple fix, exclude /usr/bin since it's not a real path.
42953    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42955      # a path prefixed by /cygdrive for fixpath to work.
42956      new_path="$CYGWIN_ROOT_PATH$input_path"
42957    fi
42958  fi
42959
42960  # remove trailing .exe if any
42961  new_path="${new_path/%.exe/}"
42962
42963    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42964
42965  # First separate the path from the arguments. This will split at the first
42966  # space.
42967  complete="$OBJCOPY"
42968  path="${complete%% *}"
42969  tmp="$complete EOL"
42970  arguments="${tmp#* }"
42971
42972  # Input might be given as Windows format, start by converting to
42973  # unix format.
42974  new_path="$path"
42975
42976  windows_path="$new_path"
42977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42978    unix_path=`$CYGPATH -u "$windows_path"`
42979    new_path="$unix_path"
42980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42982    new_path="$unix_path"
42983  fi
42984
42985
42986  # Now try to locate executable using which
42987  new_path=`$WHICH "$new_path" 2> /dev/null`
42988
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="$path"
42997
42998  windows_path="$new_path"
42999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43000    unix_path=`$CYGPATH -u "$windows_path"`
43001    new_path="$unix_path"
43002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43004    new_path="$unix_path"
43005  fi
43006
43007
43008    new_path=`$WHICH "$new_path" 2> /dev/null`
43009    # bat and cmd files are not always considered executable in MSYS causing which
43010    # to not find them
43011    if test "x$new_path" = x \
43012        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43013        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43014      new_path="$path"
43015
43016  windows_path="$new_path"
43017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43018    unix_path=`$CYGPATH -u "$windows_path"`
43019    new_path="$unix_path"
43020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43022    new_path="$unix_path"
43023  fi
43024
43025    fi
43026
43027    if test "x$new_path" = x; then
43028      # It's still not found. Now this is an unrecoverable error.
43029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43030$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43031      has_space=`$ECHO "$complete" | $GREP " "`
43032      if test "x$has_space" != x; then
43033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43035      fi
43036      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43037    fi
43038  fi
43039
43040  # Now new_path has a complete unix path to the binary
43041  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43042    # Keep paths in /bin as-is, but remove trailing .exe if any
43043    new_path="${new_path/%.exe/}"
43044    # Do not save /bin paths to all_fixpath_prefixes!
43045  else
43046    # Not in mixed or Windows style, start by that.
43047    new_path=`cmd //c echo $new_path`
43048
43049  input_path="$new_path"
43050  # Check if we need to convert this using DOS-style short mode. If the path
43051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43052  # take no chances and rewrite it.
43053  # Note: m4 eats our [], so we need to use [ and ] instead.
43054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43055  if test "x$has_forbidden_chars" != x; then
43056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43058  fi
43059
43060    # Output is in $new_path
43061
43062  windows_path="$new_path"
43063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43064    unix_path=`$CYGPATH -u "$windows_path"`
43065    new_path="$unix_path"
43066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43068    new_path="$unix_path"
43069  fi
43070
43071    # remove trailing .exe if any
43072    new_path="${new_path/%.exe/}"
43073
43074    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43075    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43076  fi
43077
43078    else
43079      # We're on a unix platform. Hooray! :)
43080      # First separate the path from the arguments. This will split at the first
43081      # space.
43082      complete="$OBJCOPY"
43083      path="${complete%% *}"
43084      tmp="$complete EOL"
43085      arguments="${tmp#* }"
43086
43087      # Cannot rely on the command "which" here since it doesn't always work.
43088      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43089      if test -z "$is_absolute_path"; then
43090        # Path to executable is not absolute. Find it.
43091        IFS_save="$IFS"
43092        IFS=:
43093        for p in $PATH; do
43094          if test -f "$p/$path" && test -x "$p/$path"; then
43095            new_path="$p/$path"
43096            break
43097          fi
43098        done
43099        IFS="$IFS_save"
43100      else
43101        # This is an absolute path, we can use it without further modifications.
43102        new_path="$path"
43103      fi
43104
43105      if test "x$new_path" = x; then
43106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43107$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43108        has_space=`$ECHO "$complete" | $GREP " "`
43109        if test "x$has_space" != x; then
43110          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43111$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43112        fi
43113        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43114      fi
43115    fi
43116
43117    # Now join together the path and the arguments once again
43118    if test "x$arguments" != xEOL; then
43119      new_complete="$new_path ${arguments% *}"
43120    else
43121      new_complete="$new_path"
43122    fi
43123
43124    if test "x$complete" != "x$new_complete"; then
43125      OBJCOPY="$new_complete"
43126      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43127$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43128    fi
43129  fi
43130
43131      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43132        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43133        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43134        # - version number is last blank separate word on first line
43135        # - version number formats that have been seen:
43136        #   - <major>.<minor>
43137        #   - <major>.<minor>.<micro>
43138        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43139        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43140         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43141              -e 's/.* //' \
43142              -e '/^[01]\./b bad' \
43143              -e '/^2\./{' \
43144              -e '  s/^2\.//' \
43145              -e '  /^[0-9]$/b bad' \
43146              -e '  /^[0-9]\./b bad' \
43147              -e '  /^1[0-9]$/b bad' \
43148              -e '  /^1[0-9]\./b bad' \
43149              -e '  /^20\./b bad' \
43150              -e '  /^21\.0$/b bad' \
43151              -e '  /^21\.0\./b bad' \
43152              -e '}' \
43153              -e ':good' \
43154              -e 's/.*/VALID_VERSION/p' \
43155              -e 'q' \
43156              -e ':bad' \
43157              -e 's/.*/BAD_VERSION/p' \
43158              -e 'q'`
43159        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43160          OBJCOPY=
43161          { $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
43162$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43163          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43164$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43165          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43166$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43167          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43168$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43169          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43170$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43171        fi
43172      fi
43173    fi
43174  fi
43175
43176
43177
43178  # Publish this variable in the help.
43179
43180
43181  if [ -z "${OBJDUMP+x}" ]; then
43182    # The variable is not set by user, try to locate tool using the code snippet
43183    if test -n "$ac_tool_prefix"; then
43184  for ac_prog in gobjdump objdump
43185  do
43186    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43187set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43189$as_echo_n "checking for $ac_word... " >&6; }
43190if ${ac_cv_prog_OBJDUMP+:} false; then :
43191  $as_echo_n "(cached) " >&6
43192else
43193  if test -n "$OBJDUMP"; then
43194  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43195else
43196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43197for as_dir in $PATH
43198do
43199  IFS=$as_save_IFS
43200  test -z "$as_dir" && as_dir=.
43201    for ac_exec_ext in '' $ac_executable_extensions; do
43202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43203    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43205    break 2
43206  fi
43207done
43208  done
43209IFS=$as_save_IFS
43210
43211fi
43212fi
43213OBJDUMP=$ac_cv_prog_OBJDUMP
43214if test -n "$OBJDUMP"; then
43215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43216$as_echo "$OBJDUMP" >&6; }
43217else
43218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43219$as_echo "no" >&6; }
43220fi
43221
43222
43223    test -n "$OBJDUMP" && break
43224  done
43225fi
43226if test -z "$OBJDUMP"; then
43227  ac_ct_OBJDUMP=$OBJDUMP
43228  for ac_prog in gobjdump objdump
43229do
43230  # Extract the first word of "$ac_prog", so it can be a program name with args.
43231set dummy $ac_prog; ac_word=$2
43232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43233$as_echo_n "checking for $ac_word... " >&6; }
43234if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43235  $as_echo_n "(cached) " >&6
43236else
43237  if test -n "$ac_ct_OBJDUMP"; then
43238  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43239else
43240as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43241for as_dir in $PATH
43242do
43243  IFS=$as_save_IFS
43244  test -z "$as_dir" && as_dir=.
43245    for ac_exec_ext in '' $ac_executable_extensions; do
43246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43247    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43249    break 2
43250  fi
43251done
43252  done
43253IFS=$as_save_IFS
43254
43255fi
43256fi
43257ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43258if test -n "$ac_ct_OBJDUMP"; then
43259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43260$as_echo "$ac_ct_OBJDUMP" >&6; }
43261else
43262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43263$as_echo "no" >&6; }
43264fi
43265
43266
43267  test -n "$ac_ct_OBJDUMP" && break
43268done
43269
43270  if test "x$ac_ct_OBJDUMP" = x; then
43271    OBJDUMP=""
43272  else
43273    case $cross_compiling:$ac_tool_warned in
43274yes:)
43275{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43276$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43277ac_tool_warned=yes ;;
43278esac
43279    OBJDUMP=$ac_ct_OBJDUMP
43280  fi
43281fi
43282
43283  else
43284    # The variable is set, but is it from the command line or the environment?
43285
43286    # Try to remove the string !OBJDUMP! from our list.
43287    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43288    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43289      # If it failed, the variable was not from the command line. Ignore it,
43290      # but warn the user (except for BASH, which is always set by the calling BASH).
43291      if test "xOBJDUMP" != xBASH; then
43292        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43293$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43294      fi
43295      # Try to locate tool using the code snippet
43296      if test -n "$ac_tool_prefix"; then
43297  for ac_prog in gobjdump objdump
43298  do
43299    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43300set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43302$as_echo_n "checking for $ac_word... " >&6; }
43303if ${ac_cv_prog_OBJDUMP+:} false; then :
43304  $as_echo_n "(cached) " >&6
43305else
43306  if test -n "$OBJDUMP"; then
43307  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43308else
43309as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43310for as_dir in $PATH
43311do
43312  IFS=$as_save_IFS
43313  test -z "$as_dir" && as_dir=.
43314    for ac_exec_ext in '' $ac_executable_extensions; do
43315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43316    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43318    break 2
43319  fi
43320done
43321  done
43322IFS=$as_save_IFS
43323
43324fi
43325fi
43326OBJDUMP=$ac_cv_prog_OBJDUMP
43327if test -n "$OBJDUMP"; then
43328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43329$as_echo "$OBJDUMP" >&6; }
43330else
43331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43332$as_echo "no" >&6; }
43333fi
43334
43335
43336    test -n "$OBJDUMP" && break
43337  done
43338fi
43339if test -z "$OBJDUMP"; then
43340  ac_ct_OBJDUMP=$OBJDUMP
43341  for ac_prog in gobjdump objdump
43342do
43343  # Extract the first word of "$ac_prog", so it can be a program name with args.
43344set dummy $ac_prog; ac_word=$2
43345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43346$as_echo_n "checking for $ac_word... " >&6; }
43347if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43348  $as_echo_n "(cached) " >&6
43349else
43350  if test -n "$ac_ct_OBJDUMP"; then
43351  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43352else
43353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43354for as_dir in $PATH
43355do
43356  IFS=$as_save_IFS
43357  test -z "$as_dir" && as_dir=.
43358    for ac_exec_ext in '' $ac_executable_extensions; do
43359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43360    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43362    break 2
43363  fi
43364done
43365  done
43366IFS=$as_save_IFS
43367
43368fi
43369fi
43370ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43371if test -n "$ac_ct_OBJDUMP"; then
43372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43373$as_echo "$ac_ct_OBJDUMP" >&6; }
43374else
43375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43376$as_echo "no" >&6; }
43377fi
43378
43379
43380  test -n "$ac_ct_OBJDUMP" && break
43381done
43382
43383  if test "x$ac_ct_OBJDUMP" = x; then
43384    OBJDUMP=""
43385  else
43386    case $cross_compiling:$ac_tool_warned in
43387yes:)
43388{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43389$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43390ac_tool_warned=yes ;;
43391esac
43392    OBJDUMP=$ac_ct_OBJDUMP
43393  fi
43394fi
43395
43396    else
43397      # If it succeeded, then it was overridden by the user. We will use it
43398      # for the tool.
43399
43400      # First remove it from the list of overridden variables, so we can test
43401      # for unknown variables in the end.
43402      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43403
43404      # Check if we try to supply an empty value
43405      if test "x$OBJDUMP" = x; then
43406        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43407$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43408        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43409$as_echo_n "checking for OBJDUMP... " >&6; }
43410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43411$as_echo "disabled" >&6; }
43412      else
43413        # Check if the provided tool contains a complete path.
43414        tool_specified="$OBJDUMP"
43415        tool_basename="${tool_specified##*/}"
43416        if test "x$tool_basename" = "x$tool_specified"; then
43417          # A command without a complete path is provided, search $PATH.
43418          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43419$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43420          # Extract the first word of "$tool_basename", so it can be a program name with args.
43421set dummy $tool_basename; ac_word=$2
43422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43423$as_echo_n "checking for $ac_word... " >&6; }
43424if ${ac_cv_path_OBJDUMP+:} false; then :
43425  $as_echo_n "(cached) " >&6
43426else
43427  case $OBJDUMP in
43428  [\\/]* | ?:[\\/]*)
43429  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43430  ;;
43431  *)
43432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43433for as_dir in $PATH
43434do
43435  IFS=$as_save_IFS
43436  test -z "$as_dir" && as_dir=.
43437    for ac_exec_ext in '' $ac_executable_extensions; do
43438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43439    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43441    break 2
43442  fi
43443done
43444  done
43445IFS=$as_save_IFS
43446
43447  ;;
43448esac
43449fi
43450OBJDUMP=$ac_cv_path_OBJDUMP
43451if test -n "$OBJDUMP"; then
43452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43453$as_echo "$OBJDUMP" >&6; }
43454else
43455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43456$as_echo "no" >&6; }
43457fi
43458
43459
43460          if test "x$OBJDUMP" = x; then
43461            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43462          fi
43463        else
43464          # Otherwise we believe it is a complete path. Use it as it is.
43465          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43466$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43467          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43468$as_echo_n "checking for OBJDUMP... " >&6; }
43469          if test ! -x "$tool_specified"; then
43470            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43471$as_echo "not found" >&6; }
43472            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43473          fi
43474          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43475$as_echo "$tool_specified" >&6; }
43476        fi
43477      fi
43478    fi
43479
43480  fi
43481
43482
43483  if test "x$OBJDUMP" != x; then
43484    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43485    # bails if argument is missing.
43486
43487  # Only process if variable expands to non-empty
43488
43489  if test "x$OBJDUMP" != x; then
43490    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43491
43492  # First separate the path from the arguments. This will split at the first
43493  # space.
43494  complete="$OBJDUMP"
43495  path="${complete%% *}"
43496  tmp="$complete EOL"
43497  arguments="${tmp#* }"
43498
43499  # Input might be given as Windows format, start by converting to
43500  # unix format.
43501  new_path=`$CYGPATH -u "$path"`
43502
43503  # Now try to locate executable using which
43504  new_path=`$WHICH "$new_path" 2> /dev/null`
43505  # bat and cmd files are not always considered executable in cygwin causing which
43506  # to not find them
43507  if test "x$new_path" = x \
43508      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43509      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43510    new_path=`$CYGPATH -u "$path"`
43511  fi
43512  if test "x$new_path" = x; then
43513    # Oops. Which didn't find the executable.
43514    # The splitting of arguments from the executable at a space might have been incorrect,
43515    # since paths with space are more likely in Windows. Give it another try with the whole
43516    # argument.
43517    path="$complete"
43518    arguments="EOL"
43519    new_path=`$CYGPATH -u "$path"`
43520    new_path=`$WHICH "$new_path" 2> /dev/null`
43521    # bat and cmd files are not always considered executable in cygwin causing which
43522    # to not find them
43523    if test "x$new_path" = x \
43524        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43525        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43526      new_path=`$CYGPATH -u "$path"`
43527    fi
43528    if test "x$new_path" = x; then
43529      # It's still not found. Now this is an unrecoverable error.
43530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43531$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43532      has_space=`$ECHO "$complete" | $GREP " "`
43533      if test "x$has_space" != x; then
43534        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43535$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43536      fi
43537      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43538    fi
43539  fi
43540
43541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43544  # "foo.exe" is OK but "foo" is an error.
43545  #
43546  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43547  # It is also a way to make sure we got the proper file name for the real test later on.
43548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43549  if test "x$test_shortpath" = x; then
43550    # Short path failed, file does not exist as specified.
43551    # Try adding .exe or .cmd
43552    if test -f "${new_path}.exe"; then
43553      input_to_shortpath="${new_path}.exe"
43554    elif test -f "${new_path}.cmd"; then
43555      input_to_shortpath="${new_path}.cmd"
43556    else
43557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43558$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43559      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43560$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43561      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43562    fi
43563  else
43564    input_to_shortpath="$new_path"
43565  fi
43566
43567  # Call helper function which possibly converts this using DOS-style short mode.
43568  # If so, the updated path is stored in $new_path.
43569  new_path="$input_to_shortpath"
43570
43571  input_path="$input_to_shortpath"
43572  # Check if we need to convert this using DOS-style short mode. If the path
43573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43574  # take no chances and rewrite it.
43575  # Note: m4 eats our [], so we need to use [ and ] instead.
43576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43577  if test "x$has_forbidden_chars" != x; then
43578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43582      # Going to short mode and back again did indeed matter. Since short mode is
43583      # case insensitive, let's make it lowercase to improve readability.
43584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43585      # Now convert it back to Unix-style (cygpath)
43586      input_path=`$CYGPATH -u "$shortmode_path"`
43587      new_path="$input_path"
43588    fi
43589  fi
43590
43591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43592  if test "x$test_cygdrive_prefix" = x; then
43593    # As a simple fix, exclude /usr/bin since it's not a real path.
43594    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43596      # a path prefixed by /cygdrive for fixpath to work.
43597      new_path="$CYGWIN_ROOT_PATH$input_path"
43598    fi
43599  fi
43600
43601  # remove trailing .exe if any
43602  new_path="${new_path/%.exe/}"
43603
43604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43605
43606  # First separate the path from the arguments. This will split at the first
43607  # space.
43608  complete="$OBJDUMP"
43609  path="${complete%% *}"
43610  tmp="$complete EOL"
43611  arguments="${tmp#* }"
43612
43613  # Input might be given as Windows format, start by converting to
43614  # unix format.
43615  new_path="$path"
43616
43617  windows_path="$new_path"
43618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43619    unix_path=`$CYGPATH -u "$windows_path"`
43620    new_path="$unix_path"
43621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43623    new_path="$unix_path"
43624  fi
43625
43626
43627  # Now try to locate executable using which
43628  new_path=`$WHICH "$new_path" 2> /dev/null`
43629
43630  if test "x$new_path" = x; then
43631    # Oops. Which didn't find the executable.
43632    # The splitting of arguments from the executable at a space might have been incorrect,
43633    # since paths with space are more likely in Windows. Give it another try with the whole
43634    # argument.
43635    path="$complete"
43636    arguments="EOL"
43637    new_path="$path"
43638
43639  windows_path="$new_path"
43640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43641    unix_path=`$CYGPATH -u "$windows_path"`
43642    new_path="$unix_path"
43643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43645    new_path="$unix_path"
43646  fi
43647
43648
43649    new_path=`$WHICH "$new_path" 2> /dev/null`
43650    # bat and cmd files are not always considered executable in MSYS causing which
43651    # to not find them
43652    if test "x$new_path" = x \
43653        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43654        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43655      new_path="$path"
43656
43657  windows_path="$new_path"
43658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43659    unix_path=`$CYGPATH -u "$windows_path"`
43660    new_path="$unix_path"
43661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43663    new_path="$unix_path"
43664  fi
43665
43666    fi
43667
43668    if test "x$new_path" = x; then
43669      # It's still not found. Now this is an unrecoverable error.
43670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43671$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43672      has_space=`$ECHO "$complete" | $GREP " "`
43673      if test "x$has_space" != x; then
43674        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43675$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43676      fi
43677      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43678    fi
43679  fi
43680
43681  # Now new_path has a complete unix path to the binary
43682  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43683    # Keep paths in /bin as-is, but remove trailing .exe if any
43684    new_path="${new_path/%.exe/}"
43685    # Do not save /bin paths to all_fixpath_prefixes!
43686  else
43687    # Not in mixed or Windows style, start by that.
43688    new_path=`cmd //c echo $new_path`
43689
43690  input_path="$new_path"
43691  # Check if we need to convert this using DOS-style short mode. If the path
43692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43693  # take no chances and rewrite it.
43694  # Note: m4 eats our [], so we need to use [ and ] instead.
43695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43696  if test "x$has_forbidden_chars" != x; then
43697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43699  fi
43700
43701    # Output is in $new_path
43702
43703  windows_path="$new_path"
43704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43705    unix_path=`$CYGPATH -u "$windows_path"`
43706    new_path="$unix_path"
43707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43709    new_path="$unix_path"
43710  fi
43711
43712    # remove trailing .exe if any
43713    new_path="${new_path/%.exe/}"
43714
43715    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43716    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43717  fi
43718
43719    else
43720      # We're on a unix platform. Hooray! :)
43721      # First separate the path from the arguments. This will split at the first
43722      # space.
43723      complete="$OBJDUMP"
43724      path="${complete%% *}"
43725      tmp="$complete EOL"
43726      arguments="${tmp#* }"
43727
43728      # Cannot rely on the command "which" here since it doesn't always work.
43729      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43730      if test -z "$is_absolute_path"; then
43731        # Path to executable is not absolute. Find it.
43732        IFS_save="$IFS"
43733        IFS=:
43734        for p in $PATH; do
43735          if test -f "$p/$path" && test -x "$p/$path"; then
43736            new_path="$p/$path"
43737            break
43738          fi
43739        done
43740        IFS="$IFS_save"
43741      else
43742        # This is an absolute path, we can use it without further modifications.
43743        new_path="$path"
43744      fi
43745
43746      if test "x$new_path" = x; then
43747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43748$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43749        has_space=`$ECHO "$complete" | $GREP " "`
43750        if test "x$has_space" != x; then
43751          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43752$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43753        fi
43754        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43755      fi
43756    fi
43757
43758    # Now join together the path and the arguments once again
43759    if test "x$arguments" != xEOL; then
43760      new_complete="$new_path ${arguments% *}"
43761    else
43762      new_complete="$new_path"
43763    fi
43764
43765    if test "x$complete" != "x$new_complete"; then
43766      OBJDUMP="$new_complete"
43767      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43768$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43769    fi
43770  fi
43771
43772  fi
43773
43774
43775  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43776  # to remain in place. Otherwise the compiler will not work in some siutations
43777  # in later configure checks.
43778  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43779    PATH="$OLD_PATH"
43780  fi
43781
43782  # Restore the flags to the user specified values.
43783  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43784  CFLAGS="$ORG_CFLAGS"
43785  CXXFLAGS="$ORG_CXXFLAGS"
43786
43787
43788# Finally do some processing after the detection phase
43789
43790  if test "x$COMPILE_TYPE" = "xcross"; then
43791    # Now we need to find a C/C++ compiler that can build executables for the
43792    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43793    # used once. Also, we need to do this without adding a tools dir to the
43794    # path, otherwise we might pick up cross-compilers which don't use standard
43795    # naming.
43796
43797    OLDPATH="$PATH"
43798
43799
43800# Check whether --with-build-devkit was given.
43801if test "${with_build_devkit+set}" = set; then :
43802  withval=$with_build_devkit;
43803fi
43804
43805    if test "x$with_build_devkit" = "xyes"; then
43806      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43807    elif test -n "$with_build_devkit"; then
43808      if test ! -d "$with_build_devkit"; then
43809        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43810      else
43811
43812  # Only process if variable expands to non-empty
43813
43814  if test "x$with_build_devkit" != x; then
43815    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43816
43817  # Input might be given as Windows format, start by converting to
43818  # unix format.
43819  path="$with_build_devkit"
43820  new_path=`$CYGPATH -u "$path"`
43821
43822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43825  # "foo.exe" is OK but "foo" is an error.
43826  #
43827  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43828  # It is also a way to make sure we got the proper file name for the real test later on.
43829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43830  if test "x$test_shortpath" = x; then
43831    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43832$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43833    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43834  fi
43835
43836  # Call helper function which possibly converts this using DOS-style short mode.
43837  # If so, the updated path is stored in $new_path.
43838
43839  input_path="$new_path"
43840  # Check if we need to convert this using DOS-style short mode. If the path
43841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43842  # take no chances and rewrite it.
43843  # Note: m4 eats our [], so we need to use [ and ] instead.
43844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43845  if test "x$has_forbidden_chars" != x; then
43846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43850      # Going to short mode and back again did indeed matter. Since short mode is
43851      # case insensitive, let's make it lowercase to improve readability.
43852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43853      # Now convert it back to Unix-style (cygpath)
43854      input_path=`$CYGPATH -u "$shortmode_path"`
43855      new_path="$input_path"
43856    fi
43857  fi
43858
43859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43860  if test "x$test_cygdrive_prefix" = x; then
43861    # As a simple fix, exclude /usr/bin since it's not a real path.
43862    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43864      # a path prefixed by /cygdrive for fixpath to work.
43865      new_path="$CYGWIN_ROOT_PATH$input_path"
43866    fi
43867  fi
43868
43869
43870  if test "x$path" != "x$new_path"; then
43871    with_build_devkit="$new_path"
43872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43873$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43874  fi
43875
43876    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43877
43878  path="$with_build_devkit"
43879  has_colon=`$ECHO $path | $GREP ^.:`
43880  new_path="$path"
43881  if test "x$has_colon" = x; then
43882    # Not in mixed or Windows style, start by that.
43883    new_path=`cmd //c echo $path`
43884  fi
43885
43886
43887  input_path="$new_path"
43888  # Check if we need to convert this using DOS-style short mode. If the path
43889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43890  # take no chances and rewrite it.
43891  # Note: m4 eats our [], so we need to use [ and ] instead.
43892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43893  if test "x$has_forbidden_chars" != x; then
43894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43895    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43896  fi
43897
43898
43899  windows_path="$new_path"
43900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43901    unix_path=`$CYGPATH -u "$windows_path"`
43902    new_path="$unix_path"
43903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43905    new_path="$unix_path"
43906  fi
43907
43908  if test "x$path" != "x$new_path"; then
43909    with_build_devkit="$new_path"
43910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43911$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43912  fi
43913
43914  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43915  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43916
43917    else
43918      # We're on a unix platform. Hooray! :)
43919      path="$with_build_devkit"
43920      has_space=`$ECHO "$path" | $GREP " "`
43921      if test "x$has_space" != x; then
43922        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43923$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43924        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43925      fi
43926
43927      # Use eval to expand a potential ~
43928      eval path="$path"
43929      if test ! -f "$path" && test ! -d "$path"; then
43930        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43931      fi
43932
43933      if test -d "$path"; then
43934        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43935      else
43936        dir="`$DIRNAME "$path"`"
43937        base="`$BASENAME "$path"`"
43938        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43939      fi
43940    fi
43941  fi
43942
43943        BUILD_DEVKIT_ROOT="$with_build_devkit"
43944        # Check for a meta data info file in the root of the devkit
43945        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43946          # Process devkit.info so that existing devkit variables are not
43947          # modified by this
43948          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43949              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43950              -e "s/\$host/\$build/g" \
43951              $BUILD_DEVKIT_ROOT/devkit.info \
43952              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43953          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43954          # This potentially sets the following:
43955          # A descriptive name of the devkit
43956
43957  if test "x$BUILD_DEVKIT_NAME" = x; then
43958    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43959  fi
43960
43961          # Corresponds to --with-extra-path
43962
43963  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43964    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43965  fi
43966
43967          # Corresponds to --with-toolchain-path
43968
43969  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43970    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43971  fi
43972
43973          # Corresponds to --with-sysroot
43974
43975  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43976    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43977  fi
43978
43979          # Skip the Window specific parts
43980        fi
43981
43982        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43983$as_echo_n "checking for build platform devkit... " >&6; }
43984        if test "x$BUILD_DEVKIT_NAME" != x; then
43985          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43986$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43987        else
43988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43989$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43990        fi
43991
43992        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43993
43994  if test "x$BUILD_SYSROOT" != "x"; then
43995    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43996      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43997        # Solaris Studio does not have a concept of sysroot. Instead we must
43998        # make sure the default include and lib dirs are appended to each
43999        # compile and link command line. Must also add -I-xbuiltin to enable
44000        # inlining of system functions and intrinsics.
44001        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44002        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44003            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
44004            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
44005      fi
44006    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44007      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44008      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44009    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44010      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44011      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44012    fi
44013    # Propagate the sysroot args to hotspot
44014    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44015    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44016    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44017    # The global CFLAGS and LDFLAGS variables need these for configure to function
44018    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44019    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44020    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44021    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44022  fi
44023
44024  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44025    # We also need -iframework<path>/System/Library/Frameworks
44026    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44027    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44028    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44029    # set this here so it doesn't have to be peppered throughout the forest
44030    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44031    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44032  fi
44033
44034
44035
44036
44037
44038         # Fallback default of just /bin if DEVKIT_PATH is not defined
44039        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44040          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44041        fi
44042        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44043      fi
44044    fi
44045
44046    # FIXME: we should list the discovered compilers as an exclude pattern!
44047    # If we do that, we can do this detection before POST_DETECTION, and still
44048    # find the build compilers in the tools dir, if needed.
44049
44050
44051
44052  # Publish this variable in the help.
44053
44054
44055  if [ -z "${BUILD_CC+x}" ]; then
44056    # The variable is not set by user, try to locate tool using the code snippet
44057    for ac_prog in cl cc gcc
44058do
44059  # Extract the first word of "$ac_prog", so it can be a program name with args.
44060set dummy $ac_prog; ac_word=$2
44061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44062$as_echo_n "checking for $ac_word... " >&6; }
44063if ${ac_cv_path_BUILD_CC+:} false; then :
44064  $as_echo_n "(cached) " >&6
44065else
44066  case $BUILD_CC in
44067  [\\/]* | ?:[\\/]*)
44068  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44069  ;;
44070  *)
44071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44072for as_dir in $PATH
44073do
44074  IFS=$as_save_IFS
44075  test -z "$as_dir" && as_dir=.
44076    for ac_exec_ext in '' $ac_executable_extensions; do
44077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44078    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44080    break 2
44081  fi
44082done
44083  done
44084IFS=$as_save_IFS
44085
44086  ;;
44087esac
44088fi
44089BUILD_CC=$ac_cv_path_BUILD_CC
44090if test -n "$BUILD_CC"; then
44091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44092$as_echo "$BUILD_CC" >&6; }
44093else
44094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44095$as_echo "no" >&6; }
44096fi
44097
44098
44099  test -n "$BUILD_CC" && break
44100done
44101
44102  else
44103    # The variable is set, but is it from the command line or the environment?
44104
44105    # Try to remove the string !BUILD_CC! from our list.
44106    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44107    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44108      # If it failed, the variable was not from the command line. Ignore it,
44109      # but warn the user (except for BASH, which is always set by the calling BASH).
44110      if test "xBUILD_CC" != xBASH; then
44111        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44112$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44113      fi
44114      # Try to locate tool using the code snippet
44115      for ac_prog in cl cc gcc
44116do
44117  # Extract the first word of "$ac_prog", so it can be a program name with args.
44118set dummy $ac_prog; ac_word=$2
44119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44120$as_echo_n "checking for $ac_word... " >&6; }
44121if ${ac_cv_path_BUILD_CC+:} false; then :
44122  $as_echo_n "(cached) " >&6
44123else
44124  case $BUILD_CC in
44125  [\\/]* | ?:[\\/]*)
44126  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44127  ;;
44128  *)
44129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44130for as_dir in $PATH
44131do
44132  IFS=$as_save_IFS
44133  test -z "$as_dir" && as_dir=.
44134    for ac_exec_ext in '' $ac_executable_extensions; do
44135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44136    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44138    break 2
44139  fi
44140done
44141  done
44142IFS=$as_save_IFS
44143
44144  ;;
44145esac
44146fi
44147BUILD_CC=$ac_cv_path_BUILD_CC
44148if test -n "$BUILD_CC"; then
44149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44150$as_echo "$BUILD_CC" >&6; }
44151else
44152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44153$as_echo "no" >&6; }
44154fi
44155
44156
44157  test -n "$BUILD_CC" && break
44158done
44159
44160    else
44161      # If it succeeded, then it was overridden by the user. We will use it
44162      # for the tool.
44163
44164      # First remove it from the list of overridden variables, so we can test
44165      # for unknown variables in the end.
44166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44167
44168      # Check if we try to supply an empty value
44169      if test "x$BUILD_CC" = x; then
44170        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44171$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44172        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44173$as_echo_n "checking for BUILD_CC... " >&6; }
44174        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44175$as_echo "disabled" >&6; }
44176      else
44177        # Check if the provided tool contains a complete path.
44178        tool_specified="$BUILD_CC"
44179        tool_basename="${tool_specified##*/}"
44180        if test "x$tool_basename" = "x$tool_specified"; then
44181          # A command without a complete path is provided, search $PATH.
44182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44183$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44184          # Extract the first word of "$tool_basename", so it can be a program name with args.
44185set dummy $tool_basename; ac_word=$2
44186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44187$as_echo_n "checking for $ac_word... " >&6; }
44188if ${ac_cv_path_BUILD_CC+:} false; then :
44189  $as_echo_n "(cached) " >&6
44190else
44191  case $BUILD_CC in
44192  [\\/]* | ?:[\\/]*)
44193  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44194  ;;
44195  *)
44196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44197for as_dir in $PATH
44198do
44199  IFS=$as_save_IFS
44200  test -z "$as_dir" && as_dir=.
44201    for ac_exec_ext in '' $ac_executable_extensions; do
44202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44203    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44205    break 2
44206  fi
44207done
44208  done
44209IFS=$as_save_IFS
44210
44211  ;;
44212esac
44213fi
44214BUILD_CC=$ac_cv_path_BUILD_CC
44215if test -n "$BUILD_CC"; then
44216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44217$as_echo "$BUILD_CC" >&6; }
44218else
44219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44220$as_echo "no" >&6; }
44221fi
44222
44223
44224          if test "x$BUILD_CC" = x; then
44225            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44226          fi
44227        else
44228          # Otherwise we believe it is a complete path. Use it as it is.
44229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44230$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44231          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44232$as_echo_n "checking for BUILD_CC... " >&6; }
44233          if test ! -x "$tool_specified"; then
44234            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44235$as_echo "not found" >&6; }
44236            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44237          fi
44238          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44239$as_echo "$tool_specified" >&6; }
44240        fi
44241      fi
44242    fi
44243
44244  fi
44245
44246
44247
44248  if test "x$BUILD_CC" = x; then
44249    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44250  fi
44251
44252
44253
44254  # Only process if variable expands to non-empty
44255
44256  if test "x$BUILD_CC" != x; then
44257    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44258
44259  # First separate the path from the arguments. This will split at the first
44260  # space.
44261  complete="$BUILD_CC"
44262  path="${complete%% *}"
44263  tmp="$complete EOL"
44264  arguments="${tmp#* }"
44265
44266  # Input might be given as Windows format, start by converting to
44267  # unix format.
44268  new_path=`$CYGPATH -u "$path"`
44269
44270  # Now try to locate executable using which
44271  new_path=`$WHICH "$new_path" 2> /dev/null`
44272  # bat and cmd files are not always considered executable in cygwin causing which
44273  # to not find them
44274  if test "x$new_path" = x \
44275      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44276      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44277    new_path=`$CYGPATH -u "$path"`
44278  fi
44279  if test "x$new_path" = x; then
44280    # Oops. Which didn't find the executable.
44281    # The splitting of arguments from the executable at a space might have been incorrect,
44282    # since paths with space are more likely in Windows. Give it another try with the whole
44283    # argument.
44284    path="$complete"
44285    arguments="EOL"
44286    new_path=`$CYGPATH -u "$path"`
44287    new_path=`$WHICH "$new_path" 2> /dev/null`
44288    # bat and cmd files are not always considered executable in cygwin causing which
44289    # to not find them
44290    if test "x$new_path" = x \
44291        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44292        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44293      new_path=`$CYGPATH -u "$path"`
44294    fi
44295    if test "x$new_path" = x; then
44296      # It's still not found. Now this is an unrecoverable error.
44297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44298$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44299      has_space=`$ECHO "$complete" | $GREP " "`
44300      if test "x$has_space" != x; then
44301        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44302$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44303      fi
44304      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44305    fi
44306  fi
44307
44308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44311  # "foo.exe" is OK but "foo" is an error.
44312  #
44313  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44314  # It is also a way to make sure we got the proper file name for the real test later on.
44315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44316  if test "x$test_shortpath" = x; then
44317    # Short path failed, file does not exist as specified.
44318    # Try adding .exe or .cmd
44319    if test -f "${new_path}.exe"; then
44320      input_to_shortpath="${new_path}.exe"
44321    elif test -f "${new_path}.cmd"; then
44322      input_to_shortpath="${new_path}.cmd"
44323    else
44324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44325$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44326      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44327$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44328      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44329    fi
44330  else
44331    input_to_shortpath="$new_path"
44332  fi
44333
44334  # Call helper function which possibly converts this using DOS-style short mode.
44335  # If so, the updated path is stored in $new_path.
44336  new_path="$input_to_shortpath"
44337
44338  input_path="$input_to_shortpath"
44339  # Check if we need to convert this using DOS-style short mode. If the path
44340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44341  # take no chances and rewrite it.
44342  # Note: m4 eats our [], so we need to use [ and ] instead.
44343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44344  if test "x$has_forbidden_chars" != x; then
44345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44349      # Going to short mode and back again did indeed matter. Since short mode is
44350      # case insensitive, let's make it lowercase to improve readability.
44351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44352      # Now convert it back to Unix-style (cygpath)
44353      input_path=`$CYGPATH -u "$shortmode_path"`
44354      new_path="$input_path"
44355    fi
44356  fi
44357
44358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44359  if test "x$test_cygdrive_prefix" = x; then
44360    # As a simple fix, exclude /usr/bin since it's not a real path.
44361    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44363      # a path prefixed by /cygdrive for fixpath to work.
44364      new_path="$CYGWIN_ROOT_PATH$input_path"
44365    fi
44366  fi
44367
44368  # remove trailing .exe if any
44369  new_path="${new_path/%.exe/}"
44370
44371    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44372
44373  # First separate the path from the arguments. This will split at the first
44374  # space.
44375  complete="$BUILD_CC"
44376  path="${complete%% *}"
44377  tmp="$complete EOL"
44378  arguments="${tmp#* }"
44379
44380  # Input might be given as Windows format, start by converting to
44381  # unix format.
44382  new_path="$path"
44383
44384  windows_path="$new_path"
44385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44386    unix_path=`$CYGPATH -u "$windows_path"`
44387    new_path="$unix_path"
44388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44390    new_path="$unix_path"
44391  fi
44392
44393
44394  # Now try to locate executable using which
44395  new_path=`$WHICH "$new_path" 2> /dev/null`
44396
44397  if test "x$new_path" = x; then
44398    # Oops. Which didn't find the executable.
44399    # The splitting of arguments from the executable at a space might have been incorrect,
44400    # since paths with space are more likely in Windows. Give it another try with the whole
44401    # argument.
44402    path="$complete"
44403    arguments="EOL"
44404    new_path="$path"
44405
44406  windows_path="$new_path"
44407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44408    unix_path=`$CYGPATH -u "$windows_path"`
44409    new_path="$unix_path"
44410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44412    new_path="$unix_path"
44413  fi
44414
44415
44416    new_path=`$WHICH "$new_path" 2> /dev/null`
44417    # bat and cmd files are not always considered executable in MSYS causing which
44418    # to not find them
44419    if test "x$new_path" = x \
44420        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44421        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44422      new_path="$path"
44423
44424  windows_path="$new_path"
44425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44426    unix_path=`$CYGPATH -u "$windows_path"`
44427    new_path="$unix_path"
44428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44430    new_path="$unix_path"
44431  fi
44432
44433    fi
44434
44435    if test "x$new_path" = x; then
44436      # It's still not found. Now this is an unrecoverable error.
44437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44438$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44439      has_space=`$ECHO "$complete" | $GREP " "`
44440      if test "x$has_space" != x; then
44441        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44442$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44443      fi
44444      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44445    fi
44446  fi
44447
44448  # Now new_path has a complete unix path to the binary
44449  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44450    # Keep paths in /bin as-is, but remove trailing .exe if any
44451    new_path="${new_path/%.exe/}"
44452    # Do not save /bin paths to all_fixpath_prefixes!
44453  else
44454    # Not in mixed or Windows style, start by that.
44455    new_path=`cmd //c echo $new_path`
44456
44457  input_path="$new_path"
44458  # Check if we need to convert this using DOS-style short mode. If the path
44459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44460  # take no chances and rewrite it.
44461  # Note: m4 eats our [], so we need to use [ and ] instead.
44462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44463  if test "x$has_forbidden_chars" != x; then
44464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44466  fi
44467
44468    # Output is in $new_path
44469
44470  windows_path="$new_path"
44471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44472    unix_path=`$CYGPATH -u "$windows_path"`
44473    new_path="$unix_path"
44474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44476    new_path="$unix_path"
44477  fi
44478
44479    # remove trailing .exe if any
44480    new_path="${new_path/%.exe/}"
44481
44482    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44483    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44484  fi
44485
44486    else
44487      # We're on a unix platform. Hooray! :)
44488      # First separate the path from the arguments. This will split at the first
44489      # space.
44490      complete="$BUILD_CC"
44491      path="${complete%% *}"
44492      tmp="$complete EOL"
44493      arguments="${tmp#* }"
44494
44495      # Cannot rely on the command "which" here since it doesn't always work.
44496      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44497      if test -z "$is_absolute_path"; then
44498        # Path to executable is not absolute. Find it.
44499        IFS_save="$IFS"
44500        IFS=:
44501        for p in $PATH; do
44502          if test -f "$p/$path" && test -x "$p/$path"; then
44503            new_path="$p/$path"
44504            break
44505          fi
44506        done
44507        IFS="$IFS_save"
44508      else
44509        # This is an absolute path, we can use it without further modifications.
44510        new_path="$path"
44511      fi
44512
44513      if test "x$new_path" = x; then
44514        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44515$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44516        has_space=`$ECHO "$complete" | $GREP " "`
44517        if test "x$has_space" != x; then
44518          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44519$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44520        fi
44521        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44522      fi
44523    fi
44524
44525    # Now join together the path and the arguments once again
44526    if test "x$arguments" != xEOL; then
44527      new_complete="$new_path ${arguments% *}"
44528    else
44529      new_complete="$new_path"
44530    fi
44531
44532    if test "x$complete" != "x$new_complete"; then
44533      BUILD_CC="$new_complete"
44534      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44535$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44536    fi
44537  fi
44538
44539
44540
44541
44542  # Publish this variable in the help.
44543
44544
44545  if [ -z "${BUILD_CXX+x}" ]; then
44546    # The variable is not set by user, try to locate tool using the code snippet
44547    for ac_prog in cl CC g++
44548do
44549  # Extract the first word of "$ac_prog", so it can be a program name with args.
44550set dummy $ac_prog; ac_word=$2
44551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44552$as_echo_n "checking for $ac_word... " >&6; }
44553if ${ac_cv_path_BUILD_CXX+:} false; then :
44554  $as_echo_n "(cached) " >&6
44555else
44556  case $BUILD_CXX in
44557  [\\/]* | ?:[\\/]*)
44558  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44559  ;;
44560  *)
44561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44562for as_dir in $PATH
44563do
44564  IFS=$as_save_IFS
44565  test -z "$as_dir" && as_dir=.
44566    for ac_exec_ext in '' $ac_executable_extensions; do
44567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44568    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44570    break 2
44571  fi
44572done
44573  done
44574IFS=$as_save_IFS
44575
44576  ;;
44577esac
44578fi
44579BUILD_CXX=$ac_cv_path_BUILD_CXX
44580if test -n "$BUILD_CXX"; then
44581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44582$as_echo "$BUILD_CXX" >&6; }
44583else
44584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44585$as_echo "no" >&6; }
44586fi
44587
44588
44589  test -n "$BUILD_CXX" && break
44590done
44591
44592  else
44593    # The variable is set, but is it from the command line or the environment?
44594
44595    # Try to remove the string !BUILD_CXX! from our list.
44596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44598      # If it failed, the variable was not from the command line. Ignore it,
44599      # but warn the user (except for BASH, which is always set by the calling BASH).
44600      if test "xBUILD_CXX" != xBASH; then
44601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44602$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44603      fi
44604      # Try to locate tool using the code snippet
44605      for ac_prog in cl CC g++
44606do
44607  # Extract the first word of "$ac_prog", so it can be a program name with args.
44608set dummy $ac_prog; ac_word=$2
44609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44610$as_echo_n "checking for $ac_word... " >&6; }
44611if ${ac_cv_path_BUILD_CXX+:} false; then :
44612  $as_echo_n "(cached) " >&6
44613else
44614  case $BUILD_CXX in
44615  [\\/]* | ?:[\\/]*)
44616  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44617  ;;
44618  *)
44619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44620for as_dir in $PATH
44621do
44622  IFS=$as_save_IFS
44623  test -z "$as_dir" && as_dir=.
44624    for ac_exec_ext in '' $ac_executable_extensions; do
44625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44626    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44628    break 2
44629  fi
44630done
44631  done
44632IFS=$as_save_IFS
44633
44634  ;;
44635esac
44636fi
44637BUILD_CXX=$ac_cv_path_BUILD_CXX
44638if test -n "$BUILD_CXX"; then
44639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44640$as_echo "$BUILD_CXX" >&6; }
44641else
44642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44643$as_echo "no" >&6; }
44644fi
44645
44646
44647  test -n "$BUILD_CXX" && break
44648done
44649
44650    else
44651      # If it succeeded, then it was overridden by the user. We will use it
44652      # for the tool.
44653
44654      # First remove it from the list of overridden variables, so we can test
44655      # for unknown variables in the end.
44656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44657
44658      # Check if we try to supply an empty value
44659      if test "x$BUILD_CXX" = x; then
44660        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44661$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44662        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44663$as_echo_n "checking for BUILD_CXX... " >&6; }
44664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44665$as_echo "disabled" >&6; }
44666      else
44667        # Check if the provided tool contains a complete path.
44668        tool_specified="$BUILD_CXX"
44669        tool_basename="${tool_specified##*/}"
44670        if test "x$tool_basename" = "x$tool_specified"; then
44671          # A command without a complete path is provided, search $PATH.
44672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44673$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44674          # Extract the first word of "$tool_basename", so it can be a program name with args.
44675set dummy $tool_basename; ac_word=$2
44676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44677$as_echo_n "checking for $ac_word... " >&6; }
44678if ${ac_cv_path_BUILD_CXX+:} false; then :
44679  $as_echo_n "(cached) " >&6
44680else
44681  case $BUILD_CXX in
44682  [\\/]* | ?:[\\/]*)
44683  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44684  ;;
44685  *)
44686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44687for as_dir in $PATH
44688do
44689  IFS=$as_save_IFS
44690  test -z "$as_dir" && as_dir=.
44691    for ac_exec_ext in '' $ac_executable_extensions; do
44692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44693    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44695    break 2
44696  fi
44697done
44698  done
44699IFS=$as_save_IFS
44700
44701  ;;
44702esac
44703fi
44704BUILD_CXX=$ac_cv_path_BUILD_CXX
44705if test -n "$BUILD_CXX"; then
44706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44707$as_echo "$BUILD_CXX" >&6; }
44708else
44709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44710$as_echo "no" >&6; }
44711fi
44712
44713
44714          if test "x$BUILD_CXX" = x; then
44715            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44716          fi
44717        else
44718          # Otherwise we believe it is a complete path. Use it as it is.
44719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44720$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44721          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44722$as_echo_n "checking for BUILD_CXX... " >&6; }
44723          if test ! -x "$tool_specified"; then
44724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44725$as_echo "not found" >&6; }
44726            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44727          fi
44728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44729$as_echo "$tool_specified" >&6; }
44730        fi
44731      fi
44732    fi
44733
44734  fi
44735
44736
44737
44738  if test "x$BUILD_CXX" = x; then
44739    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44740  fi
44741
44742
44743
44744  # Only process if variable expands to non-empty
44745
44746  if test "x$BUILD_CXX" != x; then
44747    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44748
44749  # First separate the path from the arguments. This will split at the first
44750  # space.
44751  complete="$BUILD_CXX"
44752  path="${complete%% *}"
44753  tmp="$complete EOL"
44754  arguments="${tmp#* }"
44755
44756  # Input might be given as Windows format, start by converting to
44757  # unix format.
44758  new_path=`$CYGPATH -u "$path"`
44759
44760  # Now try to locate executable using which
44761  new_path=`$WHICH "$new_path" 2> /dev/null`
44762  # bat and cmd files are not always considered executable in cygwin causing which
44763  # to not find them
44764  if test "x$new_path" = x \
44765      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44766      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44767    new_path=`$CYGPATH -u "$path"`
44768  fi
44769  if test "x$new_path" = x; then
44770    # Oops. Which didn't find the executable.
44771    # The splitting of arguments from the executable at a space might have been incorrect,
44772    # since paths with space are more likely in Windows. Give it another try with the whole
44773    # argument.
44774    path="$complete"
44775    arguments="EOL"
44776    new_path=`$CYGPATH -u "$path"`
44777    new_path=`$WHICH "$new_path" 2> /dev/null`
44778    # bat and cmd files are not always considered executable in cygwin causing which
44779    # to not find them
44780    if test "x$new_path" = x \
44781        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44782        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44783      new_path=`$CYGPATH -u "$path"`
44784    fi
44785    if test "x$new_path" = x; then
44786      # It's still not found. Now this is an unrecoverable error.
44787      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44788$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44789      has_space=`$ECHO "$complete" | $GREP " "`
44790      if test "x$has_space" != x; then
44791        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44792$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44793      fi
44794      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44795    fi
44796  fi
44797
44798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44801  # "foo.exe" is OK but "foo" is an error.
44802  #
44803  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44804  # It is also a way to make sure we got the proper file name for the real test later on.
44805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44806  if test "x$test_shortpath" = x; then
44807    # Short path failed, file does not exist as specified.
44808    # Try adding .exe or .cmd
44809    if test -f "${new_path}.exe"; then
44810      input_to_shortpath="${new_path}.exe"
44811    elif test -f "${new_path}.cmd"; then
44812      input_to_shortpath="${new_path}.cmd"
44813    else
44814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44815$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44816      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44817$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44818      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44819    fi
44820  else
44821    input_to_shortpath="$new_path"
44822  fi
44823
44824  # Call helper function which possibly converts this using DOS-style short mode.
44825  # If so, the updated path is stored in $new_path.
44826  new_path="$input_to_shortpath"
44827
44828  input_path="$input_to_shortpath"
44829  # Check if we need to convert this using DOS-style short mode. If the path
44830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44831  # take no chances and rewrite it.
44832  # Note: m4 eats our [], so we need to use [ and ] instead.
44833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44834  if test "x$has_forbidden_chars" != x; then
44835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44836    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44837    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44838    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44839      # Going to short mode and back again did indeed matter. Since short mode is
44840      # case insensitive, let's make it lowercase to improve readability.
44841      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44842      # Now convert it back to Unix-style (cygpath)
44843      input_path=`$CYGPATH -u "$shortmode_path"`
44844      new_path="$input_path"
44845    fi
44846  fi
44847
44848  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44849  if test "x$test_cygdrive_prefix" = x; then
44850    # As a simple fix, exclude /usr/bin since it's not a real path.
44851    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44852      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44853      # a path prefixed by /cygdrive for fixpath to work.
44854      new_path="$CYGWIN_ROOT_PATH$input_path"
44855    fi
44856  fi
44857
44858  # remove trailing .exe if any
44859  new_path="${new_path/%.exe/}"
44860
44861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44862
44863  # First separate the path from the arguments. This will split at the first
44864  # space.
44865  complete="$BUILD_CXX"
44866  path="${complete%% *}"
44867  tmp="$complete EOL"
44868  arguments="${tmp#* }"
44869
44870  # Input might be given as Windows format, start by converting to
44871  # unix format.
44872  new_path="$path"
44873
44874  windows_path="$new_path"
44875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44876    unix_path=`$CYGPATH -u "$windows_path"`
44877    new_path="$unix_path"
44878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44880    new_path="$unix_path"
44881  fi
44882
44883
44884  # Now try to locate executable using which
44885  new_path=`$WHICH "$new_path" 2> /dev/null`
44886
44887  if test "x$new_path" = x; then
44888    # Oops. Which didn't find the executable.
44889    # The splitting of arguments from the executable at a space might have been incorrect,
44890    # since paths with space are more likely in Windows. Give it another try with the whole
44891    # argument.
44892    path="$complete"
44893    arguments="EOL"
44894    new_path="$path"
44895
44896  windows_path="$new_path"
44897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44898    unix_path=`$CYGPATH -u "$windows_path"`
44899    new_path="$unix_path"
44900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44902    new_path="$unix_path"
44903  fi
44904
44905
44906    new_path=`$WHICH "$new_path" 2> /dev/null`
44907    # bat and cmd files are not always considered executable in MSYS causing which
44908    # to not find them
44909    if test "x$new_path" = x \
44910        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44911        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44912      new_path="$path"
44913
44914  windows_path="$new_path"
44915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44916    unix_path=`$CYGPATH -u "$windows_path"`
44917    new_path="$unix_path"
44918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44920    new_path="$unix_path"
44921  fi
44922
44923    fi
44924
44925    if test "x$new_path" = x; then
44926      # It's still not found. Now this is an unrecoverable error.
44927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44928$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44929      has_space=`$ECHO "$complete" | $GREP " "`
44930      if test "x$has_space" != x; then
44931        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44932$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44933      fi
44934      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44935    fi
44936  fi
44937
44938  # Now new_path has a complete unix path to the binary
44939  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44940    # Keep paths in /bin as-is, but remove trailing .exe if any
44941    new_path="${new_path/%.exe/}"
44942    # Do not save /bin paths to all_fixpath_prefixes!
44943  else
44944    # Not in mixed or Windows style, start by that.
44945    new_path=`cmd //c echo $new_path`
44946
44947  input_path="$new_path"
44948  # Check if we need to convert this using DOS-style short mode. If the path
44949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44950  # take no chances and rewrite it.
44951  # Note: m4 eats our [], so we need to use [ and ] instead.
44952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44953  if test "x$has_forbidden_chars" != x; then
44954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44955    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44956  fi
44957
44958    # Output is in $new_path
44959
44960  windows_path="$new_path"
44961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44962    unix_path=`$CYGPATH -u "$windows_path"`
44963    new_path="$unix_path"
44964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44966    new_path="$unix_path"
44967  fi
44968
44969    # remove trailing .exe if any
44970    new_path="${new_path/%.exe/}"
44971
44972    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44973    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44974  fi
44975
44976    else
44977      # We're on a unix platform. Hooray! :)
44978      # First separate the path from the arguments. This will split at the first
44979      # space.
44980      complete="$BUILD_CXX"
44981      path="${complete%% *}"
44982      tmp="$complete EOL"
44983      arguments="${tmp#* }"
44984
44985      # Cannot rely on the command "which" here since it doesn't always work.
44986      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44987      if test -z "$is_absolute_path"; then
44988        # Path to executable is not absolute. Find it.
44989        IFS_save="$IFS"
44990        IFS=:
44991        for p in $PATH; do
44992          if test -f "$p/$path" && test -x "$p/$path"; then
44993            new_path="$p/$path"
44994            break
44995          fi
44996        done
44997        IFS="$IFS_save"
44998      else
44999        # This is an absolute path, we can use it without further modifications.
45000        new_path="$path"
45001      fi
45002
45003      if test "x$new_path" = x; then
45004        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45005$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45006        has_space=`$ECHO "$complete" | $GREP " "`
45007        if test "x$has_space" != x; then
45008          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45009$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45010        fi
45011        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45012      fi
45013    fi
45014
45015    # Now join together the path and the arguments once again
45016    if test "x$arguments" != xEOL; then
45017      new_complete="$new_path ${arguments% *}"
45018    else
45019      new_complete="$new_path"
45020    fi
45021
45022    if test "x$complete" != "x$new_complete"; then
45023      BUILD_CXX="$new_complete"
45024      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45025$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45026    fi
45027  fi
45028
45029
45030
45031  # Publish this variable in the help.
45032
45033
45034  if [ -z "${BUILD_NM+x}" ]; then
45035    # The variable is not set by user, try to locate tool using the code snippet
45036    for ac_prog in nm gcc-nm
45037do
45038  # Extract the first word of "$ac_prog", so it can be a program name with args.
45039set dummy $ac_prog; ac_word=$2
45040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45041$as_echo_n "checking for $ac_word... " >&6; }
45042if ${ac_cv_path_BUILD_NM+:} false; then :
45043  $as_echo_n "(cached) " >&6
45044else
45045  case $BUILD_NM in
45046  [\\/]* | ?:[\\/]*)
45047  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45048  ;;
45049  *)
45050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45051for as_dir in $PATH
45052do
45053  IFS=$as_save_IFS
45054  test -z "$as_dir" && as_dir=.
45055    for ac_exec_ext in '' $ac_executable_extensions; do
45056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45057    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45059    break 2
45060  fi
45061done
45062  done
45063IFS=$as_save_IFS
45064
45065  ;;
45066esac
45067fi
45068BUILD_NM=$ac_cv_path_BUILD_NM
45069if test -n "$BUILD_NM"; then
45070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45071$as_echo "$BUILD_NM" >&6; }
45072else
45073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45074$as_echo "no" >&6; }
45075fi
45076
45077
45078  test -n "$BUILD_NM" && break
45079done
45080
45081  else
45082    # The variable is set, but is it from the command line or the environment?
45083
45084    # Try to remove the string !BUILD_NM! from our list.
45085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45087      # If it failed, the variable was not from the command line. Ignore it,
45088      # but warn the user (except for BASH, which is always set by the calling BASH).
45089      if test "xBUILD_NM" != xBASH; then
45090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45091$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45092      fi
45093      # Try to locate tool using the code snippet
45094      for ac_prog in nm gcc-nm
45095do
45096  # Extract the first word of "$ac_prog", so it can be a program name with args.
45097set dummy $ac_prog; ac_word=$2
45098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45099$as_echo_n "checking for $ac_word... " >&6; }
45100if ${ac_cv_path_BUILD_NM+:} false; then :
45101  $as_echo_n "(cached) " >&6
45102else
45103  case $BUILD_NM in
45104  [\\/]* | ?:[\\/]*)
45105  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45106  ;;
45107  *)
45108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45109for as_dir in $PATH
45110do
45111  IFS=$as_save_IFS
45112  test -z "$as_dir" && as_dir=.
45113    for ac_exec_ext in '' $ac_executable_extensions; do
45114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45115    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45117    break 2
45118  fi
45119done
45120  done
45121IFS=$as_save_IFS
45122
45123  ;;
45124esac
45125fi
45126BUILD_NM=$ac_cv_path_BUILD_NM
45127if test -n "$BUILD_NM"; then
45128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45129$as_echo "$BUILD_NM" >&6; }
45130else
45131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45132$as_echo "no" >&6; }
45133fi
45134
45135
45136  test -n "$BUILD_NM" && break
45137done
45138
45139    else
45140      # If it succeeded, then it was overridden by the user. We will use it
45141      # for the tool.
45142
45143      # First remove it from the list of overridden variables, so we can test
45144      # for unknown variables in the end.
45145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45146
45147      # Check if we try to supply an empty value
45148      if test "x$BUILD_NM" = x; then
45149        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45150$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45152$as_echo_n "checking for BUILD_NM... " >&6; }
45153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45154$as_echo "disabled" >&6; }
45155      else
45156        # Check if the provided tool contains a complete path.
45157        tool_specified="$BUILD_NM"
45158        tool_basename="${tool_specified##*/}"
45159        if test "x$tool_basename" = "x$tool_specified"; then
45160          # A command without a complete path is provided, search $PATH.
45161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45162$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45163          # Extract the first word of "$tool_basename", so it can be a program name with args.
45164set dummy $tool_basename; ac_word=$2
45165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45166$as_echo_n "checking for $ac_word... " >&6; }
45167if ${ac_cv_path_BUILD_NM+:} false; then :
45168  $as_echo_n "(cached) " >&6
45169else
45170  case $BUILD_NM in
45171  [\\/]* | ?:[\\/]*)
45172  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45173  ;;
45174  *)
45175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45176for as_dir in $PATH
45177do
45178  IFS=$as_save_IFS
45179  test -z "$as_dir" && as_dir=.
45180    for ac_exec_ext in '' $ac_executable_extensions; do
45181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45182    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45184    break 2
45185  fi
45186done
45187  done
45188IFS=$as_save_IFS
45189
45190  ;;
45191esac
45192fi
45193BUILD_NM=$ac_cv_path_BUILD_NM
45194if test -n "$BUILD_NM"; then
45195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45196$as_echo "$BUILD_NM" >&6; }
45197else
45198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45199$as_echo "no" >&6; }
45200fi
45201
45202
45203          if test "x$BUILD_NM" = x; then
45204            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45205          fi
45206        else
45207          # Otherwise we believe it is a complete path. Use it as it is.
45208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45209$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45210          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45211$as_echo_n "checking for BUILD_NM... " >&6; }
45212          if test ! -x "$tool_specified"; then
45213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45214$as_echo "not found" >&6; }
45215            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45216          fi
45217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45218$as_echo "$tool_specified" >&6; }
45219        fi
45220      fi
45221    fi
45222
45223  fi
45224
45225
45226
45227  # Only process if variable expands to non-empty
45228
45229  if test "x$BUILD_NM" != x; then
45230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45231
45232  # First separate the path from the arguments. This will split at the first
45233  # space.
45234  complete="$BUILD_NM"
45235  path="${complete%% *}"
45236  tmp="$complete EOL"
45237  arguments="${tmp#* }"
45238
45239  # Input might be given as Windows format, start by converting to
45240  # unix format.
45241  new_path=`$CYGPATH -u "$path"`
45242
45243  # Now try to locate executable using which
45244  new_path=`$WHICH "$new_path" 2> /dev/null`
45245  # bat and cmd files are not always considered executable in cygwin causing which
45246  # to not find them
45247  if test "x$new_path" = x \
45248      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45249      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45250    new_path=`$CYGPATH -u "$path"`
45251  fi
45252  if test "x$new_path" = x; then
45253    # Oops. Which didn't find the executable.
45254    # The splitting of arguments from the executable at a space might have been incorrect,
45255    # since paths with space are more likely in Windows. Give it another try with the whole
45256    # argument.
45257    path="$complete"
45258    arguments="EOL"
45259    new_path=`$CYGPATH -u "$path"`
45260    new_path=`$WHICH "$new_path" 2> /dev/null`
45261    # bat and cmd files are not always considered executable in cygwin causing which
45262    # to not find them
45263    if test "x$new_path" = x \
45264        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45265        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45266      new_path=`$CYGPATH -u "$path"`
45267    fi
45268    if test "x$new_path" = x; then
45269      # It's still not found. Now this is an unrecoverable error.
45270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45271$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45272      has_space=`$ECHO "$complete" | $GREP " "`
45273      if test "x$has_space" != x; then
45274        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45276      fi
45277      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45278    fi
45279  fi
45280
45281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45284  # "foo.exe" is OK but "foo" is an error.
45285  #
45286  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45287  # It is also a way to make sure we got the proper file name for the real test later on.
45288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45289  if test "x$test_shortpath" = x; then
45290    # Short path failed, file does not exist as specified.
45291    # Try adding .exe or .cmd
45292    if test -f "${new_path}.exe"; then
45293      input_to_shortpath="${new_path}.exe"
45294    elif test -f "${new_path}.cmd"; then
45295      input_to_shortpath="${new_path}.cmd"
45296    else
45297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45298$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45299      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45300$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45301      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45302    fi
45303  else
45304    input_to_shortpath="$new_path"
45305  fi
45306
45307  # Call helper function which possibly converts this using DOS-style short mode.
45308  # If so, the updated path is stored in $new_path.
45309  new_path="$input_to_shortpath"
45310
45311  input_path="$input_to_shortpath"
45312  # Check if we need to convert this using DOS-style short mode. If the path
45313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45314  # take no chances and rewrite it.
45315  # Note: m4 eats our [], so we need to use [ and ] instead.
45316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45317  if test "x$has_forbidden_chars" != x; then
45318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45322      # Going to short mode and back again did indeed matter. Since short mode is
45323      # case insensitive, let's make it lowercase to improve readability.
45324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45325      # Now convert it back to Unix-style (cygpath)
45326      input_path=`$CYGPATH -u "$shortmode_path"`
45327      new_path="$input_path"
45328    fi
45329  fi
45330
45331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45332  if test "x$test_cygdrive_prefix" = x; then
45333    # As a simple fix, exclude /usr/bin since it's not a real path.
45334    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45336      # a path prefixed by /cygdrive for fixpath to work.
45337      new_path="$CYGWIN_ROOT_PATH$input_path"
45338    fi
45339  fi
45340
45341  # remove trailing .exe if any
45342  new_path="${new_path/%.exe/}"
45343
45344    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45345
45346  # First separate the path from the arguments. This will split at the first
45347  # space.
45348  complete="$BUILD_NM"
45349  path="${complete%% *}"
45350  tmp="$complete EOL"
45351  arguments="${tmp#* }"
45352
45353  # Input might be given as Windows format, start by converting to
45354  # unix format.
45355  new_path="$path"
45356
45357  windows_path="$new_path"
45358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45359    unix_path=`$CYGPATH -u "$windows_path"`
45360    new_path="$unix_path"
45361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45363    new_path="$unix_path"
45364  fi
45365
45366
45367  # Now try to locate executable using which
45368  new_path=`$WHICH "$new_path" 2> /dev/null`
45369
45370  if test "x$new_path" = x; then
45371    # Oops. Which didn't find the executable.
45372    # The splitting of arguments from the executable at a space might have been incorrect,
45373    # since paths with space are more likely in Windows. Give it another try with the whole
45374    # argument.
45375    path="$complete"
45376    arguments="EOL"
45377    new_path="$path"
45378
45379  windows_path="$new_path"
45380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45381    unix_path=`$CYGPATH -u "$windows_path"`
45382    new_path="$unix_path"
45383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45385    new_path="$unix_path"
45386  fi
45387
45388
45389    new_path=`$WHICH "$new_path" 2> /dev/null`
45390    # bat and cmd files are not always considered executable in MSYS causing which
45391    # to not find them
45392    if test "x$new_path" = x \
45393        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45394        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45395      new_path="$path"
45396
45397  windows_path="$new_path"
45398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45399    unix_path=`$CYGPATH -u "$windows_path"`
45400    new_path="$unix_path"
45401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45403    new_path="$unix_path"
45404  fi
45405
45406    fi
45407
45408    if test "x$new_path" = x; then
45409      # It's still not found. Now this is an unrecoverable error.
45410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45411$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45412      has_space=`$ECHO "$complete" | $GREP " "`
45413      if test "x$has_space" != x; then
45414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45416      fi
45417      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45418    fi
45419  fi
45420
45421  # Now new_path has a complete unix path to the binary
45422  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45423    # Keep paths in /bin as-is, but remove trailing .exe if any
45424    new_path="${new_path/%.exe/}"
45425    # Do not save /bin paths to all_fixpath_prefixes!
45426  else
45427    # Not in mixed or Windows style, start by that.
45428    new_path=`cmd //c echo $new_path`
45429
45430  input_path="$new_path"
45431  # Check if we need to convert this using DOS-style short mode. If the path
45432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45433  # take no chances and rewrite it.
45434  # Note: m4 eats our [], so we need to use [ and ] instead.
45435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45436  if test "x$has_forbidden_chars" != x; then
45437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45439  fi
45440
45441    # Output is in $new_path
45442
45443  windows_path="$new_path"
45444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45445    unix_path=`$CYGPATH -u "$windows_path"`
45446    new_path="$unix_path"
45447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45449    new_path="$unix_path"
45450  fi
45451
45452    # remove trailing .exe if any
45453    new_path="${new_path/%.exe/}"
45454
45455    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45456    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45457  fi
45458
45459    else
45460      # We're on a unix platform. Hooray! :)
45461      # First separate the path from the arguments. This will split at the first
45462      # space.
45463      complete="$BUILD_NM"
45464      path="${complete%% *}"
45465      tmp="$complete EOL"
45466      arguments="${tmp#* }"
45467
45468      # Cannot rely on the command "which" here since it doesn't always work.
45469      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45470      if test -z "$is_absolute_path"; then
45471        # Path to executable is not absolute. Find it.
45472        IFS_save="$IFS"
45473        IFS=:
45474        for p in $PATH; do
45475          if test -f "$p/$path" && test -x "$p/$path"; then
45476            new_path="$p/$path"
45477            break
45478          fi
45479        done
45480        IFS="$IFS_save"
45481      else
45482        # This is an absolute path, we can use it without further modifications.
45483        new_path="$path"
45484      fi
45485
45486      if test "x$new_path" = x; then
45487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45488$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45489        has_space=`$ECHO "$complete" | $GREP " "`
45490        if test "x$has_space" != x; then
45491          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45492$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45493        fi
45494        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45495      fi
45496    fi
45497
45498    # Now join together the path and the arguments once again
45499    if test "x$arguments" != xEOL; then
45500      new_complete="$new_path ${arguments% *}"
45501    else
45502      new_complete="$new_path"
45503    fi
45504
45505    if test "x$complete" != "x$new_complete"; then
45506      BUILD_NM="$new_complete"
45507      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45508$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45509    fi
45510  fi
45511
45512
45513
45514  # Publish this variable in the help.
45515
45516
45517  if [ -z "${BUILD_AR+x}" ]; then
45518    # The variable is not set by user, try to locate tool using the code snippet
45519    for ac_prog in ar gcc-ar
45520do
45521  # Extract the first word of "$ac_prog", so it can be a program name with args.
45522set dummy $ac_prog; ac_word=$2
45523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45524$as_echo_n "checking for $ac_word... " >&6; }
45525if ${ac_cv_path_BUILD_AR+:} false; then :
45526  $as_echo_n "(cached) " >&6
45527else
45528  case $BUILD_AR in
45529  [\\/]* | ?:[\\/]*)
45530  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45531  ;;
45532  *)
45533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45534for as_dir in $PATH
45535do
45536  IFS=$as_save_IFS
45537  test -z "$as_dir" && as_dir=.
45538    for ac_exec_ext in '' $ac_executable_extensions; do
45539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45540    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45542    break 2
45543  fi
45544done
45545  done
45546IFS=$as_save_IFS
45547
45548  ;;
45549esac
45550fi
45551BUILD_AR=$ac_cv_path_BUILD_AR
45552if test -n "$BUILD_AR"; then
45553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45554$as_echo "$BUILD_AR" >&6; }
45555else
45556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45557$as_echo "no" >&6; }
45558fi
45559
45560
45561  test -n "$BUILD_AR" && break
45562done
45563
45564  else
45565    # The variable is set, but is it from the command line or the environment?
45566
45567    # Try to remove the string !BUILD_AR! from our list.
45568    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45569    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45570      # If it failed, the variable was not from the command line. Ignore it,
45571      # but warn the user (except for BASH, which is always set by the calling BASH).
45572      if test "xBUILD_AR" != xBASH; then
45573        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45574$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45575      fi
45576      # Try to locate tool using the code snippet
45577      for ac_prog in ar gcc-ar
45578do
45579  # Extract the first word of "$ac_prog", so it can be a program name with args.
45580set dummy $ac_prog; ac_word=$2
45581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45582$as_echo_n "checking for $ac_word... " >&6; }
45583if ${ac_cv_path_BUILD_AR+:} false; then :
45584  $as_echo_n "(cached) " >&6
45585else
45586  case $BUILD_AR in
45587  [\\/]* | ?:[\\/]*)
45588  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45589  ;;
45590  *)
45591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45592for as_dir in $PATH
45593do
45594  IFS=$as_save_IFS
45595  test -z "$as_dir" && as_dir=.
45596    for ac_exec_ext in '' $ac_executable_extensions; do
45597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45598    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45600    break 2
45601  fi
45602done
45603  done
45604IFS=$as_save_IFS
45605
45606  ;;
45607esac
45608fi
45609BUILD_AR=$ac_cv_path_BUILD_AR
45610if test -n "$BUILD_AR"; then
45611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45612$as_echo "$BUILD_AR" >&6; }
45613else
45614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45615$as_echo "no" >&6; }
45616fi
45617
45618
45619  test -n "$BUILD_AR" && break
45620done
45621
45622    else
45623      # If it succeeded, then it was overridden by the user. We will use it
45624      # for the tool.
45625
45626      # First remove it from the list of overridden variables, so we can test
45627      # for unknown variables in the end.
45628      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45629
45630      # Check if we try to supply an empty value
45631      if test "x$BUILD_AR" = x; then
45632        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45633$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45634        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45635$as_echo_n "checking for BUILD_AR... " >&6; }
45636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45637$as_echo "disabled" >&6; }
45638      else
45639        # Check if the provided tool contains a complete path.
45640        tool_specified="$BUILD_AR"
45641        tool_basename="${tool_specified##*/}"
45642        if test "x$tool_basename" = "x$tool_specified"; then
45643          # A command without a complete path is provided, search $PATH.
45644          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45645$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45646          # Extract the first word of "$tool_basename", so it can be a program name with args.
45647set dummy $tool_basename; ac_word=$2
45648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45649$as_echo_n "checking for $ac_word... " >&6; }
45650if ${ac_cv_path_BUILD_AR+:} false; then :
45651  $as_echo_n "(cached) " >&6
45652else
45653  case $BUILD_AR in
45654  [\\/]* | ?:[\\/]*)
45655  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45656  ;;
45657  *)
45658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45659for as_dir in $PATH
45660do
45661  IFS=$as_save_IFS
45662  test -z "$as_dir" && as_dir=.
45663    for ac_exec_ext in '' $ac_executable_extensions; do
45664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45665    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45667    break 2
45668  fi
45669done
45670  done
45671IFS=$as_save_IFS
45672
45673  ;;
45674esac
45675fi
45676BUILD_AR=$ac_cv_path_BUILD_AR
45677if test -n "$BUILD_AR"; then
45678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45679$as_echo "$BUILD_AR" >&6; }
45680else
45681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45682$as_echo "no" >&6; }
45683fi
45684
45685
45686          if test "x$BUILD_AR" = x; then
45687            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45688          fi
45689        else
45690          # Otherwise we believe it is a complete path. Use it as it is.
45691          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45692$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45693          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45694$as_echo_n "checking for BUILD_AR... " >&6; }
45695          if test ! -x "$tool_specified"; then
45696            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45697$as_echo "not found" >&6; }
45698            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45699          fi
45700          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45701$as_echo "$tool_specified" >&6; }
45702        fi
45703      fi
45704    fi
45705
45706  fi
45707
45708
45709
45710  # Only process if variable expands to non-empty
45711
45712  if test "x$BUILD_AR" != x; then
45713    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45714
45715  # First separate the path from the arguments. This will split at the first
45716  # space.
45717  complete="$BUILD_AR"
45718  path="${complete%% *}"
45719  tmp="$complete EOL"
45720  arguments="${tmp#* }"
45721
45722  # Input might be given as Windows format, start by converting to
45723  # unix format.
45724  new_path=`$CYGPATH -u "$path"`
45725
45726  # Now try to locate executable using which
45727  new_path=`$WHICH "$new_path" 2> /dev/null`
45728  # bat and cmd files are not always considered executable in cygwin causing which
45729  # to not find them
45730  if test "x$new_path" = x \
45731      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45732      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45733    new_path=`$CYGPATH -u "$path"`
45734  fi
45735  if test "x$new_path" = x; then
45736    # Oops. Which didn't find the executable.
45737    # The splitting of arguments from the executable at a space might have been incorrect,
45738    # since paths with space are more likely in Windows. Give it another try with the whole
45739    # argument.
45740    path="$complete"
45741    arguments="EOL"
45742    new_path=`$CYGPATH -u "$path"`
45743    new_path=`$WHICH "$new_path" 2> /dev/null`
45744    # bat and cmd files are not always considered executable in cygwin causing which
45745    # to not find them
45746    if test "x$new_path" = x \
45747        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45748        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45749      new_path=`$CYGPATH -u "$path"`
45750    fi
45751    if test "x$new_path" = x; then
45752      # It's still not found. Now this is an unrecoverable error.
45753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45754$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45755      has_space=`$ECHO "$complete" | $GREP " "`
45756      if test "x$has_space" != x; then
45757        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45758$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45759      fi
45760      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45761    fi
45762  fi
45763
45764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45767  # "foo.exe" is OK but "foo" is an error.
45768  #
45769  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45770  # It is also a way to make sure we got the proper file name for the real test later on.
45771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45772  if test "x$test_shortpath" = x; then
45773    # Short path failed, file does not exist as specified.
45774    # Try adding .exe or .cmd
45775    if test -f "${new_path}.exe"; then
45776      input_to_shortpath="${new_path}.exe"
45777    elif test -f "${new_path}.cmd"; then
45778      input_to_shortpath="${new_path}.cmd"
45779    else
45780      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45781$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45782      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45783$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45784      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45785    fi
45786  else
45787    input_to_shortpath="$new_path"
45788  fi
45789
45790  # Call helper function which possibly converts this using DOS-style short mode.
45791  # If so, the updated path is stored in $new_path.
45792  new_path="$input_to_shortpath"
45793
45794  input_path="$input_to_shortpath"
45795  # Check if we need to convert this using DOS-style short mode. If the path
45796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45797  # take no chances and rewrite it.
45798  # Note: m4 eats our [], so we need to use [ and ] instead.
45799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45800  if test "x$has_forbidden_chars" != x; then
45801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45805      # Going to short mode and back again did indeed matter. Since short mode is
45806      # case insensitive, let's make it lowercase to improve readability.
45807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45808      # Now convert it back to Unix-style (cygpath)
45809      input_path=`$CYGPATH -u "$shortmode_path"`
45810      new_path="$input_path"
45811    fi
45812  fi
45813
45814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45815  if test "x$test_cygdrive_prefix" = x; then
45816    # As a simple fix, exclude /usr/bin since it's not a real path.
45817    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45819      # a path prefixed by /cygdrive for fixpath to work.
45820      new_path="$CYGWIN_ROOT_PATH$input_path"
45821    fi
45822  fi
45823
45824  # remove trailing .exe if any
45825  new_path="${new_path/%.exe/}"
45826
45827    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45828
45829  # First separate the path from the arguments. This will split at the first
45830  # space.
45831  complete="$BUILD_AR"
45832  path="${complete%% *}"
45833  tmp="$complete EOL"
45834  arguments="${tmp#* }"
45835
45836  # Input might be given as Windows format, start by converting to
45837  # unix format.
45838  new_path="$path"
45839
45840  windows_path="$new_path"
45841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45842    unix_path=`$CYGPATH -u "$windows_path"`
45843    new_path="$unix_path"
45844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45846    new_path="$unix_path"
45847  fi
45848
45849
45850  # Now try to locate executable using which
45851  new_path=`$WHICH "$new_path" 2> /dev/null`
45852
45853  if test "x$new_path" = x; then
45854    # Oops. Which didn't find the executable.
45855    # The splitting of arguments from the executable at a space might have been incorrect,
45856    # since paths with space are more likely in Windows. Give it another try with the whole
45857    # argument.
45858    path="$complete"
45859    arguments="EOL"
45860    new_path="$path"
45861
45862  windows_path="$new_path"
45863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45864    unix_path=`$CYGPATH -u "$windows_path"`
45865    new_path="$unix_path"
45866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45868    new_path="$unix_path"
45869  fi
45870
45871
45872    new_path=`$WHICH "$new_path" 2> /dev/null`
45873    # bat and cmd files are not always considered executable in MSYS causing which
45874    # to not find them
45875    if test "x$new_path" = x \
45876        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45877        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45878      new_path="$path"
45879
45880  windows_path="$new_path"
45881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45882    unix_path=`$CYGPATH -u "$windows_path"`
45883    new_path="$unix_path"
45884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45886    new_path="$unix_path"
45887  fi
45888
45889    fi
45890
45891    if test "x$new_path" = x; then
45892      # It's still not found. Now this is an unrecoverable error.
45893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45894$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45895      has_space=`$ECHO "$complete" | $GREP " "`
45896      if test "x$has_space" != x; then
45897        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45898$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45899      fi
45900      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45901    fi
45902  fi
45903
45904  # Now new_path has a complete unix path to the binary
45905  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45906    # Keep paths in /bin as-is, but remove trailing .exe if any
45907    new_path="${new_path/%.exe/}"
45908    # Do not save /bin paths to all_fixpath_prefixes!
45909  else
45910    # Not in mixed or Windows style, start by that.
45911    new_path=`cmd //c echo $new_path`
45912
45913  input_path="$new_path"
45914  # Check if we need to convert this using DOS-style short mode. If the path
45915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45916  # take no chances and rewrite it.
45917  # Note: m4 eats our [], so we need to use [ and ] instead.
45918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45919  if test "x$has_forbidden_chars" != x; then
45920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45921    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45922  fi
45923
45924    # Output is in $new_path
45925
45926  windows_path="$new_path"
45927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45928    unix_path=`$CYGPATH -u "$windows_path"`
45929    new_path="$unix_path"
45930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45932    new_path="$unix_path"
45933  fi
45934
45935    # remove trailing .exe if any
45936    new_path="${new_path/%.exe/}"
45937
45938    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45939    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45940  fi
45941
45942    else
45943      # We're on a unix platform. Hooray! :)
45944      # First separate the path from the arguments. This will split at the first
45945      # space.
45946      complete="$BUILD_AR"
45947      path="${complete%% *}"
45948      tmp="$complete EOL"
45949      arguments="${tmp#* }"
45950
45951      # Cannot rely on the command "which" here since it doesn't always work.
45952      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45953      if test -z "$is_absolute_path"; then
45954        # Path to executable is not absolute. Find it.
45955        IFS_save="$IFS"
45956        IFS=:
45957        for p in $PATH; do
45958          if test -f "$p/$path" && test -x "$p/$path"; then
45959            new_path="$p/$path"
45960            break
45961          fi
45962        done
45963        IFS="$IFS_save"
45964      else
45965        # This is an absolute path, we can use it without further modifications.
45966        new_path="$path"
45967      fi
45968
45969      if test "x$new_path" = x; then
45970        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45971$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45972        has_space=`$ECHO "$complete" | $GREP " "`
45973        if test "x$has_space" != x; then
45974          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45975$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45976        fi
45977        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45978      fi
45979    fi
45980
45981    # Now join together the path and the arguments once again
45982    if test "x$arguments" != xEOL; then
45983      new_complete="$new_path ${arguments% *}"
45984    else
45985      new_complete="$new_path"
45986    fi
45987
45988    if test "x$complete" != "x$new_complete"; then
45989      BUILD_AR="$new_complete"
45990      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45991$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45992    fi
45993  fi
45994
45995
45996
45997  # Publish this variable in the help.
45998
45999
46000  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46001    # The variable is not set by user, try to locate tool using the code snippet
46002    for ac_prog in objcopy
46003do
46004  # Extract the first word of "$ac_prog", so it can be a program name with args.
46005set dummy $ac_prog; ac_word=$2
46006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46007$as_echo_n "checking for $ac_word... " >&6; }
46008if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46009  $as_echo_n "(cached) " >&6
46010else
46011  case $BUILD_OBJCOPY in
46012  [\\/]* | ?:[\\/]*)
46013  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46014  ;;
46015  *)
46016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46017for as_dir in $PATH
46018do
46019  IFS=$as_save_IFS
46020  test -z "$as_dir" && as_dir=.
46021    for ac_exec_ext in '' $ac_executable_extensions; do
46022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46023    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46025    break 2
46026  fi
46027done
46028  done
46029IFS=$as_save_IFS
46030
46031  ;;
46032esac
46033fi
46034BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46035if test -n "$BUILD_OBJCOPY"; then
46036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46037$as_echo "$BUILD_OBJCOPY" >&6; }
46038else
46039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46040$as_echo "no" >&6; }
46041fi
46042
46043
46044  test -n "$BUILD_OBJCOPY" && break
46045done
46046
46047  else
46048    # The variable is set, but is it from the command line or the environment?
46049
46050    # Try to remove the string !BUILD_OBJCOPY! from our list.
46051    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46052    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46053      # If it failed, the variable was not from the command line. Ignore it,
46054      # but warn the user (except for BASH, which is always set by the calling BASH).
46055      if test "xBUILD_OBJCOPY" != xBASH; then
46056        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46057$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46058      fi
46059      # Try to locate tool using the code snippet
46060      for ac_prog in objcopy
46061do
46062  # Extract the first word of "$ac_prog", so it can be a program name with args.
46063set dummy $ac_prog; ac_word=$2
46064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46065$as_echo_n "checking for $ac_word... " >&6; }
46066if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46067  $as_echo_n "(cached) " >&6
46068else
46069  case $BUILD_OBJCOPY in
46070  [\\/]* | ?:[\\/]*)
46071  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46072  ;;
46073  *)
46074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46075for as_dir in $PATH
46076do
46077  IFS=$as_save_IFS
46078  test -z "$as_dir" && as_dir=.
46079    for ac_exec_ext in '' $ac_executable_extensions; do
46080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46081    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46083    break 2
46084  fi
46085done
46086  done
46087IFS=$as_save_IFS
46088
46089  ;;
46090esac
46091fi
46092BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46093if test -n "$BUILD_OBJCOPY"; then
46094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46095$as_echo "$BUILD_OBJCOPY" >&6; }
46096else
46097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46098$as_echo "no" >&6; }
46099fi
46100
46101
46102  test -n "$BUILD_OBJCOPY" && break
46103done
46104
46105    else
46106      # If it succeeded, then it was overridden by the user. We will use it
46107      # for the tool.
46108
46109      # First remove it from the list of overridden variables, so we can test
46110      # for unknown variables in the end.
46111      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46112
46113      # Check if we try to supply an empty value
46114      if test "x$BUILD_OBJCOPY" = x; then
46115        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46116$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46117        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46118$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46119        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46120$as_echo "disabled" >&6; }
46121      else
46122        # Check if the provided tool contains a complete path.
46123        tool_specified="$BUILD_OBJCOPY"
46124        tool_basename="${tool_specified##*/}"
46125        if test "x$tool_basename" = "x$tool_specified"; then
46126          # A command without a complete path is provided, search $PATH.
46127          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46128$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46129          # Extract the first word of "$tool_basename", so it can be a program name with args.
46130set dummy $tool_basename; ac_word=$2
46131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46132$as_echo_n "checking for $ac_word... " >&6; }
46133if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46134  $as_echo_n "(cached) " >&6
46135else
46136  case $BUILD_OBJCOPY in
46137  [\\/]* | ?:[\\/]*)
46138  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46139  ;;
46140  *)
46141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46142for as_dir in $PATH
46143do
46144  IFS=$as_save_IFS
46145  test -z "$as_dir" && as_dir=.
46146    for ac_exec_ext in '' $ac_executable_extensions; do
46147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46148    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46150    break 2
46151  fi
46152done
46153  done
46154IFS=$as_save_IFS
46155
46156  ;;
46157esac
46158fi
46159BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46160if test -n "$BUILD_OBJCOPY"; then
46161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46162$as_echo "$BUILD_OBJCOPY" >&6; }
46163else
46164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46165$as_echo "no" >&6; }
46166fi
46167
46168
46169          if test "x$BUILD_OBJCOPY" = x; then
46170            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46171          fi
46172        else
46173          # Otherwise we believe it is a complete path. Use it as it is.
46174          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46175$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46176          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46177$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46178          if test ! -x "$tool_specified"; then
46179            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46180$as_echo "not found" >&6; }
46181            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46182          fi
46183          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46184$as_echo "$tool_specified" >&6; }
46185        fi
46186      fi
46187    fi
46188
46189  fi
46190
46191
46192
46193  # Only process if variable expands to non-empty
46194
46195  if test "x$BUILD_OBJCOPY" != x; then
46196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46197
46198  # First separate the path from the arguments. This will split at the first
46199  # space.
46200  complete="$BUILD_OBJCOPY"
46201  path="${complete%% *}"
46202  tmp="$complete EOL"
46203  arguments="${tmp#* }"
46204
46205  # Input might be given as Windows format, start by converting to
46206  # unix format.
46207  new_path=`$CYGPATH -u "$path"`
46208
46209  # Now try to locate executable using which
46210  new_path=`$WHICH "$new_path" 2> /dev/null`
46211  # bat and cmd files are not always considered executable in cygwin causing which
46212  # to not find them
46213  if test "x$new_path" = x \
46214      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46215      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46216    new_path=`$CYGPATH -u "$path"`
46217  fi
46218  if test "x$new_path" = x; then
46219    # Oops. Which didn't find the executable.
46220    # The splitting of arguments from the executable at a space might have been incorrect,
46221    # since paths with space are more likely in Windows. Give it another try with the whole
46222    # argument.
46223    path="$complete"
46224    arguments="EOL"
46225    new_path=`$CYGPATH -u "$path"`
46226    new_path=`$WHICH "$new_path" 2> /dev/null`
46227    # bat and cmd files are not always considered executable in cygwin causing which
46228    # to not find them
46229    if test "x$new_path" = x \
46230        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46231        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46232      new_path=`$CYGPATH -u "$path"`
46233    fi
46234    if test "x$new_path" = x; then
46235      # It's still not found. Now this is an unrecoverable error.
46236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46237$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46238      has_space=`$ECHO "$complete" | $GREP " "`
46239      if test "x$has_space" != x; then
46240        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46241$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46242      fi
46243      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46244    fi
46245  fi
46246
46247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46250  # "foo.exe" is OK but "foo" is an error.
46251  #
46252  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46253  # It is also a way to make sure we got the proper file name for the real test later on.
46254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46255  if test "x$test_shortpath" = x; then
46256    # Short path failed, file does not exist as specified.
46257    # Try adding .exe or .cmd
46258    if test -f "${new_path}.exe"; then
46259      input_to_shortpath="${new_path}.exe"
46260    elif test -f "${new_path}.cmd"; then
46261      input_to_shortpath="${new_path}.cmd"
46262    else
46263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46264$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46265      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46266$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46267      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46268    fi
46269  else
46270    input_to_shortpath="$new_path"
46271  fi
46272
46273  # Call helper function which possibly converts this using DOS-style short mode.
46274  # If so, the updated path is stored in $new_path.
46275  new_path="$input_to_shortpath"
46276
46277  input_path="$input_to_shortpath"
46278  # Check if we need to convert this using DOS-style short mode. If the path
46279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46280  # take no chances and rewrite it.
46281  # Note: m4 eats our [], so we need to use [ and ] instead.
46282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46283  if test "x$has_forbidden_chars" != x; then
46284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46288      # Going to short mode and back again did indeed matter. Since short mode is
46289      # case insensitive, let's make it lowercase to improve readability.
46290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46291      # Now convert it back to Unix-style (cygpath)
46292      input_path=`$CYGPATH -u "$shortmode_path"`
46293      new_path="$input_path"
46294    fi
46295  fi
46296
46297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46298  if test "x$test_cygdrive_prefix" = x; then
46299    # As a simple fix, exclude /usr/bin since it's not a real path.
46300    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46302      # a path prefixed by /cygdrive for fixpath to work.
46303      new_path="$CYGWIN_ROOT_PATH$input_path"
46304    fi
46305  fi
46306
46307  # remove trailing .exe if any
46308  new_path="${new_path/%.exe/}"
46309
46310    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46311
46312  # First separate the path from the arguments. This will split at the first
46313  # space.
46314  complete="$BUILD_OBJCOPY"
46315  path="${complete%% *}"
46316  tmp="$complete EOL"
46317  arguments="${tmp#* }"
46318
46319  # Input might be given as Windows format, start by converting to
46320  # unix format.
46321  new_path="$path"
46322
46323  windows_path="$new_path"
46324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46325    unix_path=`$CYGPATH -u "$windows_path"`
46326    new_path="$unix_path"
46327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46329    new_path="$unix_path"
46330  fi
46331
46332
46333  # Now try to locate executable using which
46334  new_path=`$WHICH "$new_path" 2> /dev/null`
46335
46336  if test "x$new_path" = x; then
46337    # Oops. Which didn't find the executable.
46338    # The splitting of arguments from the executable at a space might have been incorrect,
46339    # since paths with space are more likely in Windows. Give it another try with the whole
46340    # argument.
46341    path="$complete"
46342    arguments="EOL"
46343    new_path="$path"
46344
46345  windows_path="$new_path"
46346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46347    unix_path=`$CYGPATH -u "$windows_path"`
46348    new_path="$unix_path"
46349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46351    new_path="$unix_path"
46352  fi
46353
46354
46355    new_path=`$WHICH "$new_path" 2> /dev/null`
46356    # bat and cmd files are not always considered executable in MSYS causing which
46357    # to not find them
46358    if test "x$new_path" = x \
46359        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46360        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46361      new_path="$path"
46362
46363  windows_path="$new_path"
46364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46365    unix_path=`$CYGPATH -u "$windows_path"`
46366    new_path="$unix_path"
46367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46369    new_path="$unix_path"
46370  fi
46371
46372    fi
46373
46374    if test "x$new_path" = x; then
46375      # It's still not found. Now this is an unrecoverable error.
46376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46377$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46378      has_space=`$ECHO "$complete" | $GREP " "`
46379      if test "x$has_space" != x; then
46380        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46381$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46382      fi
46383      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46384    fi
46385  fi
46386
46387  # Now new_path has a complete unix path to the binary
46388  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46389    # Keep paths in /bin as-is, but remove trailing .exe if any
46390    new_path="${new_path/%.exe/}"
46391    # Do not save /bin paths to all_fixpath_prefixes!
46392  else
46393    # Not in mixed or Windows style, start by that.
46394    new_path=`cmd //c echo $new_path`
46395
46396  input_path="$new_path"
46397  # Check if we need to convert this using DOS-style short mode. If the path
46398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46399  # take no chances and rewrite it.
46400  # Note: m4 eats our [], so we need to use [ and ] instead.
46401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46402  if test "x$has_forbidden_chars" != x; then
46403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46405  fi
46406
46407    # Output is in $new_path
46408
46409  windows_path="$new_path"
46410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46411    unix_path=`$CYGPATH -u "$windows_path"`
46412    new_path="$unix_path"
46413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46415    new_path="$unix_path"
46416  fi
46417
46418    # remove trailing .exe if any
46419    new_path="${new_path/%.exe/}"
46420
46421    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46422    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46423  fi
46424
46425    else
46426      # We're on a unix platform. Hooray! :)
46427      # First separate the path from the arguments. This will split at the first
46428      # space.
46429      complete="$BUILD_OBJCOPY"
46430      path="${complete%% *}"
46431      tmp="$complete EOL"
46432      arguments="${tmp#* }"
46433
46434      # Cannot rely on the command "which" here since it doesn't always work.
46435      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46436      if test -z "$is_absolute_path"; then
46437        # Path to executable is not absolute. Find it.
46438        IFS_save="$IFS"
46439        IFS=:
46440        for p in $PATH; do
46441          if test -f "$p/$path" && test -x "$p/$path"; then
46442            new_path="$p/$path"
46443            break
46444          fi
46445        done
46446        IFS="$IFS_save"
46447      else
46448        # This is an absolute path, we can use it without further modifications.
46449        new_path="$path"
46450      fi
46451
46452      if test "x$new_path" = x; then
46453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46454$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46455        has_space=`$ECHO "$complete" | $GREP " "`
46456        if test "x$has_space" != x; then
46457          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46458$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46459        fi
46460        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46461      fi
46462    fi
46463
46464    # Now join together the path and the arguments once again
46465    if test "x$arguments" != xEOL; then
46466      new_complete="$new_path ${arguments% *}"
46467    else
46468      new_complete="$new_path"
46469    fi
46470
46471    if test "x$complete" != "x$new_complete"; then
46472      BUILD_OBJCOPY="$new_complete"
46473      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46474$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46475    fi
46476  fi
46477
46478
46479
46480  # Publish this variable in the help.
46481
46482
46483  if [ -z "${BUILD_STRIP+x}" ]; then
46484    # The variable is not set by user, try to locate tool using the code snippet
46485    for ac_prog in strip
46486do
46487  # Extract the first word of "$ac_prog", so it can be a program name with args.
46488set dummy $ac_prog; ac_word=$2
46489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46490$as_echo_n "checking for $ac_word... " >&6; }
46491if ${ac_cv_path_BUILD_STRIP+:} false; then :
46492  $as_echo_n "(cached) " >&6
46493else
46494  case $BUILD_STRIP in
46495  [\\/]* | ?:[\\/]*)
46496  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46497  ;;
46498  *)
46499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46500for as_dir in $PATH
46501do
46502  IFS=$as_save_IFS
46503  test -z "$as_dir" && as_dir=.
46504    for ac_exec_ext in '' $ac_executable_extensions; do
46505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46506    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46508    break 2
46509  fi
46510done
46511  done
46512IFS=$as_save_IFS
46513
46514  ;;
46515esac
46516fi
46517BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46518if test -n "$BUILD_STRIP"; then
46519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46520$as_echo "$BUILD_STRIP" >&6; }
46521else
46522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46523$as_echo "no" >&6; }
46524fi
46525
46526
46527  test -n "$BUILD_STRIP" && break
46528done
46529
46530  else
46531    # The variable is set, but is it from the command line or the environment?
46532
46533    # Try to remove the string !BUILD_STRIP! from our list.
46534    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46535    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46536      # If it failed, the variable was not from the command line. Ignore it,
46537      # but warn the user (except for BASH, which is always set by the calling BASH).
46538      if test "xBUILD_STRIP" != xBASH; then
46539        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46540$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46541      fi
46542      # Try to locate tool using the code snippet
46543      for ac_prog in strip
46544do
46545  # Extract the first word of "$ac_prog", so it can be a program name with args.
46546set dummy $ac_prog; ac_word=$2
46547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46548$as_echo_n "checking for $ac_word... " >&6; }
46549if ${ac_cv_path_BUILD_STRIP+:} false; then :
46550  $as_echo_n "(cached) " >&6
46551else
46552  case $BUILD_STRIP in
46553  [\\/]* | ?:[\\/]*)
46554  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46555  ;;
46556  *)
46557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46558for as_dir in $PATH
46559do
46560  IFS=$as_save_IFS
46561  test -z "$as_dir" && as_dir=.
46562    for ac_exec_ext in '' $ac_executable_extensions; do
46563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46564    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46566    break 2
46567  fi
46568done
46569  done
46570IFS=$as_save_IFS
46571
46572  ;;
46573esac
46574fi
46575BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46576if test -n "$BUILD_STRIP"; then
46577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46578$as_echo "$BUILD_STRIP" >&6; }
46579else
46580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46581$as_echo "no" >&6; }
46582fi
46583
46584
46585  test -n "$BUILD_STRIP" && break
46586done
46587
46588    else
46589      # If it succeeded, then it was overridden by the user. We will use it
46590      # for the tool.
46591
46592      # First remove it from the list of overridden variables, so we can test
46593      # for unknown variables in the end.
46594      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46595
46596      # Check if we try to supply an empty value
46597      if test "x$BUILD_STRIP" = x; then
46598        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46599$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46600        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46601$as_echo_n "checking for BUILD_STRIP... " >&6; }
46602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46603$as_echo "disabled" >&6; }
46604      else
46605        # Check if the provided tool contains a complete path.
46606        tool_specified="$BUILD_STRIP"
46607        tool_basename="${tool_specified##*/}"
46608        if test "x$tool_basename" = "x$tool_specified"; then
46609          # A command without a complete path is provided, search $PATH.
46610          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46611$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46612          # Extract the first word of "$tool_basename", so it can be a program name with args.
46613set dummy $tool_basename; ac_word=$2
46614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46615$as_echo_n "checking for $ac_word... " >&6; }
46616if ${ac_cv_path_BUILD_STRIP+:} false; then :
46617  $as_echo_n "(cached) " >&6
46618else
46619  case $BUILD_STRIP in
46620  [\\/]* | ?:[\\/]*)
46621  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46622  ;;
46623  *)
46624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46625for as_dir in $PATH
46626do
46627  IFS=$as_save_IFS
46628  test -z "$as_dir" && as_dir=.
46629    for ac_exec_ext in '' $ac_executable_extensions; do
46630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46631    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46633    break 2
46634  fi
46635done
46636  done
46637IFS=$as_save_IFS
46638
46639  ;;
46640esac
46641fi
46642BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46643if test -n "$BUILD_STRIP"; then
46644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46645$as_echo "$BUILD_STRIP" >&6; }
46646else
46647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46648$as_echo "no" >&6; }
46649fi
46650
46651
46652          if test "x$BUILD_STRIP" = x; then
46653            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46654          fi
46655        else
46656          # Otherwise we believe it is a complete path. Use it as it is.
46657          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46658$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46659          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46660$as_echo_n "checking for BUILD_STRIP... " >&6; }
46661          if test ! -x "$tool_specified"; then
46662            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46663$as_echo "not found" >&6; }
46664            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46665          fi
46666          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46667$as_echo "$tool_specified" >&6; }
46668        fi
46669      fi
46670    fi
46671
46672  fi
46673
46674
46675
46676  # Only process if variable expands to non-empty
46677
46678  if test "x$BUILD_STRIP" != x; then
46679    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46680
46681  # First separate the path from the arguments. This will split at the first
46682  # space.
46683  complete="$BUILD_STRIP"
46684  path="${complete%% *}"
46685  tmp="$complete EOL"
46686  arguments="${tmp#* }"
46687
46688  # Input might be given as Windows format, start by converting to
46689  # unix format.
46690  new_path=`$CYGPATH -u "$path"`
46691
46692  # Now try to locate executable using which
46693  new_path=`$WHICH "$new_path" 2> /dev/null`
46694  # bat and cmd files are not always considered executable in cygwin causing which
46695  # to not find them
46696  if test "x$new_path" = x \
46697      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46698      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46699    new_path=`$CYGPATH -u "$path"`
46700  fi
46701  if test "x$new_path" = x; then
46702    # Oops. Which didn't find the executable.
46703    # The splitting of arguments from the executable at a space might have been incorrect,
46704    # since paths with space are more likely in Windows. Give it another try with the whole
46705    # argument.
46706    path="$complete"
46707    arguments="EOL"
46708    new_path=`$CYGPATH -u "$path"`
46709    new_path=`$WHICH "$new_path" 2> /dev/null`
46710    # bat and cmd files are not always considered executable in cygwin causing which
46711    # to not find them
46712    if test "x$new_path" = x \
46713        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46714        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46715      new_path=`$CYGPATH -u "$path"`
46716    fi
46717    if test "x$new_path" = x; then
46718      # It's still not found. Now this is an unrecoverable error.
46719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46720$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46721      has_space=`$ECHO "$complete" | $GREP " "`
46722      if test "x$has_space" != x; then
46723        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46724$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46725      fi
46726      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46727    fi
46728  fi
46729
46730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46733  # "foo.exe" is OK but "foo" is an error.
46734  #
46735  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46736  # It is also a way to make sure we got the proper file name for the real test later on.
46737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46738  if test "x$test_shortpath" = x; then
46739    # Short path failed, file does not exist as specified.
46740    # Try adding .exe or .cmd
46741    if test -f "${new_path}.exe"; then
46742      input_to_shortpath="${new_path}.exe"
46743    elif test -f "${new_path}.cmd"; then
46744      input_to_shortpath="${new_path}.cmd"
46745    else
46746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46747$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46748      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46749$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46750      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46751    fi
46752  else
46753    input_to_shortpath="$new_path"
46754  fi
46755
46756  # Call helper function which possibly converts this using DOS-style short mode.
46757  # If so, the updated path is stored in $new_path.
46758  new_path="$input_to_shortpath"
46759
46760  input_path="$input_to_shortpath"
46761  # Check if we need to convert this using DOS-style short mode. If the path
46762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46763  # take no chances and rewrite it.
46764  # Note: m4 eats our [], so we need to use [ and ] instead.
46765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46766  if test "x$has_forbidden_chars" != x; then
46767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46771      # Going to short mode and back again did indeed matter. Since short mode is
46772      # case insensitive, let's make it lowercase to improve readability.
46773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46774      # Now convert it back to Unix-style (cygpath)
46775      input_path=`$CYGPATH -u "$shortmode_path"`
46776      new_path="$input_path"
46777    fi
46778  fi
46779
46780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46781  if test "x$test_cygdrive_prefix" = x; then
46782    # As a simple fix, exclude /usr/bin since it's not a real path.
46783    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46785      # a path prefixed by /cygdrive for fixpath to work.
46786      new_path="$CYGWIN_ROOT_PATH$input_path"
46787    fi
46788  fi
46789
46790  # remove trailing .exe if any
46791  new_path="${new_path/%.exe/}"
46792
46793    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46794
46795  # First separate the path from the arguments. This will split at the first
46796  # space.
46797  complete="$BUILD_STRIP"
46798  path="${complete%% *}"
46799  tmp="$complete EOL"
46800  arguments="${tmp#* }"
46801
46802  # Input might be given as Windows format, start by converting to
46803  # unix format.
46804  new_path="$path"
46805
46806  windows_path="$new_path"
46807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46808    unix_path=`$CYGPATH -u "$windows_path"`
46809    new_path="$unix_path"
46810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46812    new_path="$unix_path"
46813  fi
46814
46815
46816  # Now try to locate executable using which
46817  new_path=`$WHICH "$new_path" 2> /dev/null`
46818
46819  if test "x$new_path" = x; then
46820    # Oops. Which didn't find the executable.
46821    # The splitting of arguments from the executable at a space might have been incorrect,
46822    # since paths with space are more likely in Windows. Give it another try with the whole
46823    # argument.
46824    path="$complete"
46825    arguments="EOL"
46826    new_path="$path"
46827
46828  windows_path="$new_path"
46829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46830    unix_path=`$CYGPATH -u "$windows_path"`
46831    new_path="$unix_path"
46832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46834    new_path="$unix_path"
46835  fi
46836
46837
46838    new_path=`$WHICH "$new_path" 2> /dev/null`
46839    # bat and cmd files are not always considered executable in MSYS causing which
46840    # to not find them
46841    if test "x$new_path" = x \
46842        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46843        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46844      new_path="$path"
46845
46846  windows_path="$new_path"
46847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46848    unix_path=`$CYGPATH -u "$windows_path"`
46849    new_path="$unix_path"
46850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46852    new_path="$unix_path"
46853  fi
46854
46855    fi
46856
46857    if test "x$new_path" = x; then
46858      # It's still not found. Now this is an unrecoverable error.
46859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46860$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46861      has_space=`$ECHO "$complete" | $GREP " "`
46862      if test "x$has_space" != x; then
46863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46865      fi
46866      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46867    fi
46868  fi
46869
46870  # Now new_path has a complete unix path to the binary
46871  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46872    # Keep paths in /bin as-is, but remove trailing .exe if any
46873    new_path="${new_path/%.exe/}"
46874    # Do not save /bin paths to all_fixpath_prefixes!
46875  else
46876    # Not in mixed or Windows style, start by that.
46877    new_path=`cmd //c echo $new_path`
46878
46879  input_path="$new_path"
46880  # Check if we need to convert this using DOS-style short mode. If the path
46881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46882  # take no chances and rewrite it.
46883  # Note: m4 eats our [], so we need to use [ and ] instead.
46884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46885  if test "x$has_forbidden_chars" != x; then
46886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46888  fi
46889
46890    # Output is in $new_path
46891
46892  windows_path="$new_path"
46893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46894    unix_path=`$CYGPATH -u "$windows_path"`
46895    new_path="$unix_path"
46896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46898    new_path="$unix_path"
46899  fi
46900
46901    # remove trailing .exe if any
46902    new_path="${new_path/%.exe/}"
46903
46904    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46905    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46906  fi
46907
46908    else
46909      # We're on a unix platform. Hooray! :)
46910      # First separate the path from the arguments. This will split at the first
46911      # space.
46912      complete="$BUILD_STRIP"
46913      path="${complete%% *}"
46914      tmp="$complete EOL"
46915      arguments="${tmp#* }"
46916
46917      # Cannot rely on the command "which" here since it doesn't always work.
46918      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46919      if test -z "$is_absolute_path"; then
46920        # Path to executable is not absolute. Find it.
46921        IFS_save="$IFS"
46922        IFS=:
46923        for p in $PATH; do
46924          if test -f "$p/$path" && test -x "$p/$path"; then
46925            new_path="$p/$path"
46926            break
46927          fi
46928        done
46929        IFS="$IFS_save"
46930      else
46931        # This is an absolute path, we can use it without further modifications.
46932        new_path="$path"
46933      fi
46934
46935      if test "x$new_path" = x; then
46936        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46937$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46938        has_space=`$ECHO "$complete" | $GREP " "`
46939        if test "x$has_space" != x; then
46940          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46941$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46942        fi
46943        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46944      fi
46945    fi
46946
46947    # Now join together the path and the arguments once again
46948    if test "x$arguments" != xEOL; then
46949      new_complete="$new_path ${arguments% *}"
46950    else
46951      new_complete="$new_path"
46952    fi
46953
46954    if test "x$complete" != "x$new_complete"; then
46955      BUILD_STRIP="$new_complete"
46956      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46957$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46958    fi
46959  fi
46960
46961    # Assume the C compiler is the assembler
46962    BUILD_AS="$BUILD_CC -c"
46963    # Just like for the target compiler, use the compiler as linker
46964    BUILD_LD="$BUILD_CC"
46965    BUILD_LDCXX="$BUILD_CXX"
46966
46967    PATH="$OLDPATH"
46968
46969
46970  COMPILER=$BUILD_CC
46971  COMPILER_NAME=BuildC
46972
46973  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46974    # cc -V output typically looks like
46975    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46976    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46977    # Check that this is likely to be the Solaris Studio cc.
46978    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46979    if test $? -ne 0; then
46980      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46981      { $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
46982$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46983      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46984$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46985      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46986$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46987      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46988    fi
46989    # Remove usage instructions (if present), and
46990    # collapse compiler output into a single line
46991    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46992        $SED -e 's/ *[Uu]sage:.*//'`
46993    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46994        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46995  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46996    # xlc -qversion output typically looks like
46997    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46998    #     Version: 11.01.0000.0015
46999    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47000    # Check that this is likely to be the IBM XL C compiler.
47001    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47002    if test $? -ne 0; then
47003      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47004      { $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
47005$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47006      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47007$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47008      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47009$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47010      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47011    fi
47012    # Collapse compiler output into a single line
47013    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47014    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47015        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47016  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47017    # There is no specific version flag, but all output starts with a version string.
47018    # First line typically looks something like:
47019    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47020    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47021    # Check that this is likely to be Microsoft CL.EXE.
47022    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47023    if test $? -ne 0; then
47024      { $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
47025$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47026      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47027$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47028      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47029    fi
47030    # Collapse compiler output into a single line
47031    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47032    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47033        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47034  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47035    # gcc --version output typically looks like
47036    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47037    #     Copyright (C) 2013 Free Software Foundation, Inc.
47038    #     This is free software; see the source for copying conditions.  There is NO
47039    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47040    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47041    # Check that this is likely to be GCC.
47042    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47043    if test $? -ne 0; then
47044      { $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
47045$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47046      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47047$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47048      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47049    fi
47050    # Remove Copyright and legalese from version string, and
47051    # collapse into a single line
47052    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47053        $SED -e 's/ *Copyright .*//'`
47054    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47055        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47056  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47057    # clang --version output typically looks like
47058    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47059    #    clang version 3.3 (tags/RELEASE_33/final)
47060    # or
47061    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47062    #    Target: x86_64-pc-linux-gnu
47063    #    Thread model: posix
47064    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47065    # Check that this is likely to be clang
47066    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47067    if test $? -ne 0; then
47068      { $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
47069$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47070      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47071$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47072      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47073    fi
47074    # Collapse compiler output into a single line
47075    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47076    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47077        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47078  else
47079      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47080  fi
47081  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47082  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47083  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47084  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47085
47086  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47087$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47088
47089
47090  COMPILER=$BUILD_CXX
47091  COMPILER_NAME=BuildC++
47092
47093  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47094    # cc -V output typically looks like
47095    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47096    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47097    # Check that this is likely to be the Solaris Studio cc.
47098    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47099    if test $? -ne 0; then
47100      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47101      { $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
47102$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47103      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47104$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47105      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47106$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47107      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47108    fi
47109    # Remove usage instructions (if present), and
47110    # collapse compiler output into a single line
47111    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47112        $SED -e 's/ *[Uu]sage:.*//'`
47113    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47114        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47115  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47116    # xlc -qversion output typically looks like
47117    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47118    #     Version: 11.01.0000.0015
47119    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47120    # Check that this is likely to be the IBM XL C compiler.
47121    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47122    if test $? -ne 0; then
47123      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47124      { $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
47125$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47126      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47127$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47128      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47129$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47130      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47131    fi
47132    # Collapse compiler output into a single line
47133    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47134    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47135        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47136  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47137    # There is no specific version flag, but all output starts with a version string.
47138    # First line typically looks something like:
47139    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47140    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47141    # Check that this is likely to be Microsoft CL.EXE.
47142    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47143    if test $? -ne 0; then
47144      { $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
47145$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47146      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47147$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47148      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47149    fi
47150    # Collapse compiler output into a single line
47151    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47152    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47153        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47154  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47155    # gcc --version output typically looks like
47156    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47157    #     Copyright (C) 2013 Free Software Foundation, Inc.
47158    #     This is free software; see the source for copying conditions.  There is NO
47159    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47160    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47161    # Check that this is likely to be GCC.
47162    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47163    if test $? -ne 0; then
47164      { $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
47165$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47166      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47167$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47168      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47169    fi
47170    # Remove Copyright and legalese from version string, and
47171    # collapse into a single line
47172    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47173        $SED -e 's/ *Copyright .*//'`
47174    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47175        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47176  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47177    # clang --version output typically looks like
47178    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47179    #    clang version 3.3 (tags/RELEASE_33/final)
47180    # or
47181    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47182    #    Target: x86_64-pc-linux-gnu
47183    #    Thread model: posix
47184    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47185    # Check that this is likely to be clang
47186    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47187    if test $? -ne 0; then
47188      { $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
47189$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47190      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47191$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47192      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47193    fi
47194    # Collapse compiler output into a single line
47195    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47196    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47197        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47198  else
47199      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47200  fi
47201  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47202  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47203  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47204  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47205
47206  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47207$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47208
47209
47210  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47211    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
47212$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47213    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47214$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47215  fi
47216
47217  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47218  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47219    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47220$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47221  fi
47222
47223  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47224    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47225$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47226  fi
47227
47228  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47229
47230  else
47231    # If we are not cross compiling, use the normal target compilers for
47232    # building the build platform executables.
47233    BUILD_CC="$CC"
47234    BUILD_CXX="$CXX"
47235    BUILD_LD="$LD"
47236    BUILD_LDCXX="$LDCXX"
47237    BUILD_NM="$NM"
47238    BUILD_AS="$AS"
47239    BUILD_OBJCOPY="$OBJCOPY"
47240    BUILD_STRIP="$STRIP"
47241    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47242    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47243    BUILD_AR="$AR"
47244
47245
47246  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47247    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47248$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47249    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47250$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47251  fi
47252
47253  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47254  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47255    { $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
47256$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;}
47257  fi
47258
47259  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47260    { $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
47261$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47262  fi
47263
47264  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
47265
47266  fi
47267
47268
47269
47270
47271
47272
47273
47274
47275
47276
47277
47278
47279  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47280    # For hotspot, we need these in Windows mixed path,
47281    # so rewrite them all. Need added .exe suffix.
47282    HOTSPOT_CXX="$CXX.exe"
47283    HOTSPOT_LD="$LD.exe"
47284    HOTSPOT_MT="$MT.exe"
47285    HOTSPOT_RC="$RC.exe"
47286
47287  unix_path="$HOTSPOT_CXX"
47288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47289    windows_path=`$CYGPATH -m "$unix_path"`
47290    HOTSPOT_CXX="$windows_path"
47291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47292    windows_path=`cmd //c echo $unix_path`
47293    HOTSPOT_CXX="$windows_path"
47294  fi
47295
47296
47297  unix_path="$HOTSPOT_LD"
47298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47299    windows_path=`$CYGPATH -m "$unix_path"`
47300    HOTSPOT_LD="$windows_path"
47301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47302    windows_path=`cmd //c echo $unix_path`
47303    HOTSPOT_LD="$windows_path"
47304  fi
47305
47306
47307  unix_path="$HOTSPOT_MT"
47308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47309    windows_path=`$CYGPATH -m "$unix_path"`
47310    HOTSPOT_MT="$windows_path"
47311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47312    windows_path=`cmd //c echo $unix_path`
47313    HOTSPOT_MT="$windows_path"
47314  fi
47315
47316
47317  unix_path="$HOTSPOT_RC"
47318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47319    windows_path=`$CYGPATH -m "$unix_path"`
47320    HOTSPOT_RC="$windows_path"
47321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47322    windows_path=`cmd //c echo $unix_path`
47323    HOTSPOT_RC="$windows_path"
47324  fi
47325
47326
47327
47328  else
47329    HOTSPOT_CXX="$CXX"
47330    HOTSPOT_LD="$LD"
47331  fi
47332
47333
47334
47335  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47336    USE_CLANG=true
47337  fi
47338
47339
47340
47341
47342
47343  # The package path is used only on macosx?
47344  # FIXME: clean this up, and/or move it elsewhere.
47345  PACKAGE_PATH=/opt/local
47346
47347
47348  # Check for extra potential brokenness.
47349  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47350    # On Windows, double-check that we got the right compiler.
47351    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47352    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47353    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47354      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47355        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
47356      fi
47357    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47358      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47359        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47360      fi
47361    fi
47362  fi
47363
47364  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47365    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47366    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47367    # This is later checked when setting flags.
47368
47369    # "-Og" suppported for GCC 4.8 and later
47370    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418    # Execute function body
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458
47459
47460
47461
47462
47463
47464
47465
47466
47467    # Execute function body
47468
47469  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47470$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47471  supports=yes
47472
47473  saved_cflags="$CFLAGS"
47474  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47475  ac_ext=c
47476ac_cpp='$CPP $CPPFLAGS'
47477ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47478ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47479ac_compiler_gnu=$ac_cv_c_compiler_gnu
47480
47481  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47482/* end confdefs.h.  */
47483int i;
47484_ACEOF
47485if ac_fn_c_try_compile "$LINENO"; then :
47486
47487else
47488  supports=no
47489fi
47490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47491  ac_ext=cpp
47492ac_cpp='$CXXCPP $CPPFLAGS'
47493ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47494ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47495ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47496
47497  CFLAGS="$saved_cflags"
47498
47499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47500$as_echo "$supports" >&6; }
47501  if test "x$supports" = "xyes" ; then
47502    :
47503    C_COMP_SUPPORTS="yes"
47504  else
47505    :
47506    C_COMP_SUPPORTS="no"
47507  fi
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550
47551
47552
47553
47554
47555
47556
47557
47558
47559
47560
47561
47562
47563
47564
47565
47566
47567    # Execute function body
47568
47569  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47570$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47571  supports=yes
47572
47573  saved_cxxflags="$CXXFLAGS"
47574  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47575  ac_ext=cpp
47576ac_cpp='$CXXCPP $CPPFLAGS'
47577ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47578ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47579ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47580
47581  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47582/* end confdefs.h.  */
47583int i;
47584_ACEOF
47585if ac_fn_cxx_try_compile "$LINENO"; then :
47586
47587else
47588  supports=no
47589fi
47590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47591  ac_ext=cpp
47592ac_cpp='$CXXCPP $CPPFLAGS'
47593ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47594ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47595ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47596
47597  CXXFLAGS="$saved_cxxflags"
47598
47599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47600$as_echo "$supports" >&6; }
47601  if test "x$supports" = "xyes" ; then
47602    :
47603    CXX_COMP_SUPPORTS="yes"
47604  else
47605    :
47606    CXX_COMP_SUPPORTS="no"
47607  fi
47608
47609
47610
47611
47612
47613
47614
47615
47616
47617
47618
47619
47620
47621  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47622$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47623  supports=no
47624  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47625
47626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47627$as_echo "$supports" >&6; }
47628  if test "x$supports" = "xyes" ; then
47629    :
47630    HAS_CFLAG_OPTIMIZE_DEBUG=true
47631  else
47632    :
47633    HAS_CFLAG_OPTIMIZE_DEBUG=false
47634  fi
47635
47636
47637
47638
47639
47640
47641
47642    # "-z relro" supported in GNU binutils 2.17 and later
47643    LINKER_RELRO_FLAG="-Wl,-z,relro"
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685
47686
47687
47688
47689
47690
47691    # Execute function body
47692
47693  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47694$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47695  supports=yes
47696
47697  saved_ldflags="$LDFLAGS"
47698  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47699  ac_ext=c
47700ac_cpp='$CPP $CPPFLAGS'
47701ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47702ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47703ac_compiler_gnu=$ac_cv_c_compiler_gnu
47704
47705  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47706/* end confdefs.h.  */
47707
47708int
47709main ()
47710{
47711
47712  ;
47713  return 0;
47714}
47715_ACEOF
47716if ac_fn_c_try_link "$LINENO"; then :
47717
47718else
47719  supports=no
47720fi
47721rm -f core conftest.err conftest.$ac_objext \
47722    conftest$ac_exeext conftest.$ac_ext
47723  ac_ext=cpp
47724ac_cpp='$CXXCPP $CPPFLAGS'
47725ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47726ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47727ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47728
47729  LDFLAGS="$saved_ldflags"
47730
47731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47732$as_echo "$supports" >&6; }
47733  if test "x$supports" = "xyes" ; then
47734    :
47735    HAS_LINKER_RELRO=true
47736  else
47737    :
47738    HAS_LINKER_RELRO=false
47739  fi
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753    # "-z now" supported in GNU binutils 2.11 and later
47754    LINKER_NOW_FLAG="-Wl,-z,now"
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787
47788
47789
47790
47791
47792
47793
47794
47795
47796
47797
47798
47799
47800
47801
47802    # Execute function body
47803
47804  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47805$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47806  supports=yes
47807
47808  saved_ldflags="$LDFLAGS"
47809  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47810  ac_ext=c
47811ac_cpp='$CPP $CPPFLAGS'
47812ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47813ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47814ac_compiler_gnu=$ac_cv_c_compiler_gnu
47815
47816  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47817/* end confdefs.h.  */
47818
47819int
47820main ()
47821{
47822
47823  ;
47824  return 0;
47825}
47826_ACEOF
47827if ac_fn_c_try_link "$LINENO"; then :
47828
47829else
47830  supports=no
47831fi
47832rm -f core conftest.err conftest.$ac_objext \
47833    conftest$ac_exeext conftest.$ac_ext
47834  ac_ext=cpp
47835ac_cpp='$CXXCPP $CPPFLAGS'
47836ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47837ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47838ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47839
47840  LDFLAGS="$saved_ldflags"
47841
47842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47843$as_echo "$supports" >&6; }
47844  if test "x$supports" = "xyes" ; then
47845    :
47846    HAS_LINKER_NOW=true
47847  else
47848    :
47849    HAS_LINKER_NOW=false
47850  fi
47851
47852
47853
47854
47855
47856
47857
47858
47859
47860
47861
47862
47863  fi
47864
47865  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47866  # in executable.'
47867  USING_BROKEN_SUSE_LD=no
47868  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47869    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47870$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47871    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47872    $ECHO "int main() { }" > main.c
47873    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47874      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47875$as_echo "no" >&6; }
47876      USING_BROKEN_SUSE_LD=no
47877    else
47878      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47879$as_echo "yes" >&6; }
47880      USING_BROKEN_SUSE_LD=yes
47881    fi
47882    $RM version-script.map main.c a.out
47883  fi
47884
47885
47886  # Setup hotspot lecagy names for toolchains
47887  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47888  if test "x$TOOLCHAIN_TYPE" = xclang; then
47889    HOTSPOT_TOOLCHAIN_TYPE=gcc
47890  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47891    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47892  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47893    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47894  fi
47895
47896
47897
47898# Setup the JTReg Regression Test Harness.
47899
47900
47901# Check whether --with-jtreg was given.
47902if test "${with_jtreg+set}" = set; then :
47903  withval=$with_jtreg;
47904else
47905  with_jtreg=no
47906fi
47907
47908
47909  if test "x$with_jtreg" = xno; then
47910    # jtreg disabled
47911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47912$as_echo_n "checking for jtreg... " >&6; }
47913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47914$as_echo "no" >&6; }
47915  else
47916    if test "x$with_jtreg" != xyes; then
47917      # with path specified.
47918      JT_HOME="$with_jtreg"
47919    fi
47920
47921    if test "x$JT_HOME" != x; then
47922      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47923$as_echo_n "checking for jtreg... " >&6; }
47924
47925      # use JT_HOME enviroment var.
47926
47927  # Only process if variable expands to non-empty
47928
47929  if test "x$JT_HOME" != x; then
47930    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47931
47932  # Input might be given as Windows format, start by converting to
47933  # unix format.
47934  path="$JT_HOME"
47935  new_path=`$CYGPATH -u "$path"`
47936
47937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47940  # "foo.exe" is OK but "foo" is an error.
47941  #
47942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47943  # It is also a way to make sure we got the proper file name for the real test later on.
47944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47945  if test "x$test_shortpath" = x; then
47946    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47947$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47948    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47949  fi
47950
47951  # Call helper function which possibly converts this using DOS-style short mode.
47952  # If so, the updated path is stored in $new_path.
47953
47954  input_path="$new_path"
47955  # Check if we need to convert this using DOS-style short mode. If the path
47956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47957  # take no chances and rewrite it.
47958  # Note: m4 eats our [], so we need to use [ and ] instead.
47959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47960  if test "x$has_forbidden_chars" != x; then
47961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47965      # Going to short mode and back again did indeed matter. Since short mode is
47966      # case insensitive, let's make it lowercase to improve readability.
47967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47968      # Now convert it back to Unix-style (cygpath)
47969      input_path=`$CYGPATH -u "$shortmode_path"`
47970      new_path="$input_path"
47971    fi
47972  fi
47973
47974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47975  if test "x$test_cygdrive_prefix" = x; then
47976    # As a simple fix, exclude /usr/bin since it's not a real path.
47977    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47979      # a path prefixed by /cygdrive for fixpath to work.
47980      new_path="$CYGWIN_ROOT_PATH$input_path"
47981    fi
47982  fi
47983
47984
47985  if test "x$path" != "x$new_path"; then
47986    JT_HOME="$new_path"
47987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47988$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47989  fi
47990
47991    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47992
47993  path="$JT_HOME"
47994  has_colon=`$ECHO $path | $GREP ^.:`
47995  new_path="$path"
47996  if test "x$has_colon" = x; then
47997    # Not in mixed or Windows style, start by that.
47998    new_path=`cmd //c echo $path`
47999  fi
48000
48001
48002  input_path="$new_path"
48003  # Check if we need to convert this using DOS-style short mode. If the path
48004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48005  # take no chances and rewrite it.
48006  # Note: m4 eats our [], so we need to use [ and ] instead.
48007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48008  if test "x$has_forbidden_chars" != x; then
48009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48011  fi
48012
48013
48014  windows_path="$new_path"
48015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48016    unix_path=`$CYGPATH -u "$windows_path"`
48017    new_path="$unix_path"
48018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48020    new_path="$unix_path"
48021  fi
48022
48023  if test "x$path" != "x$new_path"; then
48024    JT_HOME="$new_path"
48025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48026$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48027  fi
48028
48029  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48030  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48031
48032    else
48033      # We're on a unix platform. Hooray! :)
48034      path="$JT_HOME"
48035      has_space=`$ECHO "$path" | $GREP " "`
48036      if test "x$has_space" != x; then
48037        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48038$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48039        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48040      fi
48041
48042      # Use eval to expand a potential ~
48043      eval path="$path"
48044      if test ! -f "$path" && test ! -d "$path"; then
48045        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48046      fi
48047
48048      if test -d "$path"; then
48049        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48050      else
48051        dir="`$DIRNAME "$path"`"
48052        base="`$BASENAME "$path"`"
48053        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48054      fi
48055    fi
48056  fi
48057
48058
48059      # jtreg win32 script works for everybody
48060      JTREGEXE="$JT_HOME/bin/jtreg"
48061
48062      if test ! -f "$JTREGEXE"; then
48063        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48064      fi
48065
48066      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48067$as_echo "$JTREGEXE" >&6; }
48068    else
48069      # try to find jtreg on path
48070
48071
48072
48073  # Publish this variable in the help.
48074
48075
48076  if [ -z "${JTREGEXE+x}" ]; then
48077    # The variable is not set by user, try to locate tool using the code snippet
48078    for ac_prog in jtreg
48079do
48080  # Extract the first word of "$ac_prog", so it can be a program name with args.
48081set dummy $ac_prog; ac_word=$2
48082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48083$as_echo_n "checking for $ac_word... " >&6; }
48084if ${ac_cv_path_JTREGEXE+:} false; then :
48085  $as_echo_n "(cached) " >&6
48086else
48087  case $JTREGEXE in
48088  [\\/]* | ?:[\\/]*)
48089  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48090  ;;
48091  *)
48092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48093for as_dir in $PATH
48094do
48095  IFS=$as_save_IFS
48096  test -z "$as_dir" && as_dir=.
48097    for ac_exec_ext in '' $ac_executable_extensions; do
48098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48099    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48101    break 2
48102  fi
48103done
48104  done
48105IFS=$as_save_IFS
48106
48107  ;;
48108esac
48109fi
48110JTREGEXE=$ac_cv_path_JTREGEXE
48111if test -n "$JTREGEXE"; then
48112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48113$as_echo "$JTREGEXE" >&6; }
48114else
48115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48116$as_echo "no" >&6; }
48117fi
48118
48119
48120  test -n "$JTREGEXE" && break
48121done
48122
48123  else
48124    # The variable is set, but is it from the command line or the environment?
48125
48126    # Try to remove the string !JTREGEXE! from our list.
48127    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48128    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48129      # If it failed, the variable was not from the command line. Ignore it,
48130      # but warn the user (except for BASH, which is always set by the calling BASH).
48131      if test "xJTREGEXE" != xBASH; then
48132        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48133$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48134      fi
48135      # Try to locate tool using the code snippet
48136      for ac_prog in jtreg
48137do
48138  # Extract the first word of "$ac_prog", so it can be a program name with args.
48139set dummy $ac_prog; ac_word=$2
48140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48141$as_echo_n "checking for $ac_word... " >&6; }
48142if ${ac_cv_path_JTREGEXE+:} false; then :
48143  $as_echo_n "(cached) " >&6
48144else
48145  case $JTREGEXE in
48146  [\\/]* | ?:[\\/]*)
48147  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48148  ;;
48149  *)
48150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48151for as_dir in $PATH
48152do
48153  IFS=$as_save_IFS
48154  test -z "$as_dir" && as_dir=.
48155    for ac_exec_ext in '' $ac_executable_extensions; do
48156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48157    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48159    break 2
48160  fi
48161done
48162  done
48163IFS=$as_save_IFS
48164
48165  ;;
48166esac
48167fi
48168JTREGEXE=$ac_cv_path_JTREGEXE
48169if test -n "$JTREGEXE"; then
48170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48171$as_echo "$JTREGEXE" >&6; }
48172else
48173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48174$as_echo "no" >&6; }
48175fi
48176
48177
48178  test -n "$JTREGEXE" && break
48179done
48180
48181    else
48182      # If it succeeded, then it was overridden by the user. We will use it
48183      # for the tool.
48184
48185      # First remove it from the list of overridden variables, so we can test
48186      # for unknown variables in the end.
48187      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48188
48189      # Check if we try to supply an empty value
48190      if test "x$JTREGEXE" = x; then
48191        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48192$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48194$as_echo_n "checking for JTREGEXE... " >&6; }
48195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48196$as_echo "disabled" >&6; }
48197      else
48198        # Check if the provided tool contains a complete path.
48199        tool_specified="$JTREGEXE"
48200        tool_basename="${tool_specified##*/}"
48201        if test "x$tool_basename" = "x$tool_specified"; then
48202          # A command without a complete path is provided, search $PATH.
48203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48204$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48205          # Extract the first word of "$tool_basename", so it can be a program name with args.
48206set dummy $tool_basename; ac_word=$2
48207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48208$as_echo_n "checking for $ac_word... " >&6; }
48209if ${ac_cv_path_JTREGEXE+:} false; then :
48210  $as_echo_n "(cached) " >&6
48211else
48212  case $JTREGEXE in
48213  [\\/]* | ?:[\\/]*)
48214  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48215  ;;
48216  *)
48217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48218for as_dir in $PATH
48219do
48220  IFS=$as_save_IFS
48221  test -z "$as_dir" && as_dir=.
48222    for ac_exec_ext in '' $ac_executable_extensions; do
48223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48224    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48226    break 2
48227  fi
48228done
48229  done
48230IFS=$as_save_IFS
48231
48232  ;;
48233esac
48234fi
48235JTREGEXE=$ac_cv_path_JTREGEXE
48236if test -n "$JTREGEXE"; then
48237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48238$as_echo "$JTREGEXE" >&6; }
48239else
48240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48241$as_echo "no" >&6; }
48242fi
48243
48244
48245          if test "x$JTREGEXE" = x; then
48246            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48247          fi
48248        else
48249          # Otherwise we believe it is a complete path. Use it as it is.
48250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48251$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48252          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48253$as_echo_n "checking for JTREGEXE... " >&6; }
48254          if test ! -x "$tool_specified"; then
48255            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48256$as_echo "not found" >&6; }
48257            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48258          fi
48259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48260$as_echo "$tool_specified" >&6; }
48261        fi
48262      fi
48263    fi
48264
48265  fi
48266
48267
48268
48269  if test "x$JTREGEXE" = x; then
48270    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48271  fi
48272
48273
48274      JT_HOME="`$DIRNAME $JTREGEXE`"
48275    fi
48276  fi
48277
48278
48279
48280
48281
48282
48283  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48284  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48285  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48286  #                              commands produced by the link step (currently AIX only)
48287  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48288    COMPILER_TARGET_BITS_FLAG="-q"
48289    COMPILER_COMMAND_FILE_FLAG="-f"
48290    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48291  else
48292    COMPILER_TARGET_BITS_FLAG="-m"
48293    COMPILER_COMMAND_FILE_FLAG="@"
48294    COMPILER_BINDCMD_FILE_FLAG=""
48295
48296    # The solstudio linker does not support @-files.
48297    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48298      COMPILER_COMMAND_FILE_FLAG=
48299    fi
48300
48301    # Check if @file is supported by gcc
48302    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48303      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48304$as_echo_n "checking if @file is supported by gcc... " >&6; }
48305      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48306      $ECHO "" "--version" > command.file
48307      if $CXX @command.file 2>&5 >&5; then
48308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48309$as_echo "yes" >&6; }
48310        COMPILER_COMMAND_FILE_FLAG="@"
48311      else
48312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48313$as_echo "no" >&6; }
48314        COMPILER_COMMAND_FILE_FLAG=
48315      fi
48316      $RM command.file
48317    fi
48318  fi
48319
48320
48321
48322
48323  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48324  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48325    ARFLAGS="-r"
48326  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48327    ARFLAGS="-X64"
48328  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48329    # lib.exe is used as AR to create static libraries.
48330    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48331  else
48332    ARFLAGS=""
48333  fi
48334
48335
48336  ## Setup strip.
48337  # FIXME: should this really be per platform, or should it be per toolchain type?
48338  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48339  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48340  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48341    STRIPFLAGS="-g"
48342  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48343    STRIPFLAGS="-x"
48344  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48345    STRIPFLAGS="-S"
48346  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48347    STRIPFLAGS="-X32_64"
48348  fi
48349
48350
48351
48352  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48353    CC_OUT_OPTION=-Fo
48354    EXE_OUT_OPTION=-out:
48355    LD_OUT_OPTION=-out:
48356    AR_OUT_OPTION=-out:
48357  else
48358    # The option used to specify the target .o,.a or .so file.
48359    # When compiling, how to specify the to be created object file.
48360    CC_OUT_OPTION='-o$(SPACE)'
48361    # When linking, how to specify the to be created executable.
48362    EXE_OUT_OPTION='-o$(SPACE)'
48363    # When linking, how to specify the to be created dynamically linkable library.
48364    LD_OUT_OPTION='-o$(SPACE)'
48365    # When archiving, how to specify the to be create static archive for object files.
48366    AR_OUT_OPTION='rcs$(SPACE)'
48367  fi
48368
48369
48370
48371
48372
48373  # On Windows, we need to set RC flags.
48374  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48375    RC_FLAGS="-nologo -l0x409"
48376    JVM_RCFLAGS="-nologo"
48377    if test "x$DEBUG_LEVEL" = xrelease; then
48378      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48379      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48380    fi
48381
48382    # The version variables used to create RC_FLAGS may be overridden
48383    # in a custom configure script, or possibly the command line.
48384    # Let those variables be expanded at make time in spec.gmk.
48385    # The \$ are escaped to the shell, and the $(...) variables
48386    # are evaluated by make.
48387    RC_FLAGS="$RC_FLAGS \
48388        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48389        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48390        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48391        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48392        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48393        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48394        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48395
48396    JVM_RCFLAGS="$JVM_RCFLAGS \
48397        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48398        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48399        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48400        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48401        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48402        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48403        -D\"HS_FNAME=jvm.dll\" \
48404        -D\"HS_INTERNAL_NAME=jvm\""
48405  fi
48406
48407
48408
48409  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48410    # silence copyright notice and other headers.
48411    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48412  fi
48413
48414
48415# Now we can test some aspects on the target using configure macros.
48416
48417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48418$as_echo_n "checking for ANSI C header files... " >&6; }
48419if ${ac_cv_header_stdc+:} false; then :
48420  $as_echo_n "(cached) " >&6
48421else
48422  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48423/* end confdefs.h.  */
48424#include <stdlib.h>
48425#include <stdarg.h>
48426#include <string.h>
48427#include <float.h>
48428
48429int
48430main ()
48431{
48432
48433  ;
48434  return 0;
48435}
48436_ACEOF
48437if ac_fn_cxx_try_compile "$LINENO"; then :
48438  ac_cv_header_stdc=yes
48439else
48440  ac_cv_header_stdc=no
48441fi
48442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48443
48444if test $ac_cv_header_stdc = yes; then
48445  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48447/* end confdefs.h.  */
48448#include <string.h>
48449
48450_ACEOF
48451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48452  $EGREP "memchr" >/dev/null 2>&1; then :
48453
48454else
48455  ac_cv_header_stdc=no
48456fi
48457rm -f conftest*
48458
48459fi
48460
48461if test $ac_cv_header_stdc = yes; then
48462  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48463  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48464/* end confdefs.h.  */
48465#include <stdlib.h>
48466
48467_ACEOF
48468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48469  $EGREP "free" >/dev/null 2>&1; then :
48470
48471else
48472  ac_cv_header_stdc=no
48473fi
48474rm -f conftest*
48475
48476fi
48477
48478if test $ac_cv_header_stdc = yes; then
48479  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48480  if test "$cross_compiling" = yes; then :
48481  :
48482else
48483  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48484/* end confdefs.h.  */
48485#include <ctype.h>
48486#include <stdlib.h>
48487#if ((' ' & 0x0FF) == 0x020)
48488# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48489# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48490#else
48491# define ISLOWER(c) \
48492		   (('a' <= (c) && (c) <= 'i') \
48493		     || ('j' <= (c) && (c) <= 'r') \
48494		     || ('s' <= (c) && (c) <= 'z'))
48495# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48496#endif
48497
48498#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48499int
48500main ()
48501{
48502  int i;
48503  for (i = 0; i < 256; i++)
48504    if (XOR (islower (i), ISLOWER (i))
48505	|| toupper (i) != TOUPPER (i))
48506      return 2;
48507  return 0;
48508}
48509_ACEOF
48510if ac_fn_cxx_try_run "$LINENO"; then :
48511
48512else
48513  ac_cv_header_stdc=no
48514fi
48515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48516  conftest.$ac_objext conftest.beam conftest.$ac_ext
48517fi
48518
48519fi
48520fi
48521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48522$as_echo "$ac_cv_header_stdc" >&6; }
48523if test $ac_cv_header_stdc = yes; then
48524
48525$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48526
48527fi
48528
48529# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48530for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48531		  inttypes.h stdint.h unistd.h
48532do :
48533  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48534ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48535"
48536if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48537  cat >>confdefs.h <<_ACEOF
48538#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48539_ACEOF
48540
48541fi
48542
48543done
48544
48545
48546
48547  ###############################################################################
48548  #
48549  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48550  # (The JVM can use 32 or 64 bit Java pointers but that decision
48551  # is made at runtime.)
48552  #
48553
48554  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48555    # Always specify -m flag on Solaris
48556    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48557
48558  # When we add flags to the "official" CFLAGS etc, we need to
48559  # keep track of these additions in ADDED_CFLAGS etc. These
48560  # will later be checked to make sure only controlled additions
48561  # have been made to CFLAGS etc.
48562  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48563  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48564  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48565
48566  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48567  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48568  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48569
48570  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48571  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48572  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48573
48574  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48575  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48576  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48577
48578  elif test "x$COMPILE_TYPE" = xreduced; then
48579    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48580      # Specify -m if running reduced on unix platforms
48581
48582  # When we add flags to the "official" CFLAGS etc, we need to
48583  # keep track of these additions in ADDED_CFLAGS etc. These
48584  # will later be checked to make sure only controlled additions
48585  # have been made to CFLAGS etc.
48586  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48587  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48588  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48589
48590  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48591  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48592  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48593
48594  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48595  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48596  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48597
48598  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48599  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48600  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48601
48602    fi
48603  fi
48604  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48605    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48606    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48607    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48608  fi
48609
48610  # Make compilation sanity check
48611  for ac_header in stdio.h
48612do :
48613  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48614if test "x$ac_cv_header_stdio_h" = xyes; then :
48615  cat >>confdefs.h <<_ACEOF
48616#define HAVE_STDIO_H 1
48617_ACEOF
48618
48619else
48620
48621    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48622$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48623    if test "x$COMPILE_TYPE" = xreduced; then
48624
48625  # Print a helpful message on how to acquire the necessary build dependency.
48626  # reduced is the help tag: freetype, cups, alsa etc
48627  MISSING_DEPENDENCY=reduced
48628
48629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48630    cygwin_help $MISSING_DEPENDENCY
48631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48632    msys_help $MISSING_DEPENDENCY
48633  else
48634    PKGHANDLER_COMMAND=
48635
48636    case $PKGHANDLER in
48637      apt-get)
48638        apt_help     $MISSING_DEPENDENCY ;;
48639      yum)
48640        yum_help     $MISSING_DEPENDENCY ;;
48641      port)
48642        port_help    $MISSING_DEPENDENCY ;;
48643      pkgutil)
48644        pkgutil_help $MISSING_DEPENDENCY ;;
48645      pkgadd)
48646        pkgadd_help  $MISSING_DEPENDENCY ;;
48647    esac
48648
48649    if test "x$PKGHANDLER_COMMAND" != x; then
48650      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48651    fi
48652  fi
48653
48654      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48655$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48656    elif test "x$COMPILE_TYPE" = xcross; then
48657      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48658$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48659    fi
48660    as_fn_error $? "Cannot continue." "$LINENO" 5
48661
48662fi
48663
48664done
48665
48666
48667  # The cast to long int works around a bug in the HP C Compiler
48668# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48669# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48670# This bug is HP SR number 8606223364.
48671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48672$as_echo_n "checking size of int *... " >&6; }
48673if ${ac_cv_sizeof_int_p+:} false; then :
48674  $as_echo_n "(cached) " >&6
48675else
48676  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48677
48678else
48679  if test "$ac_cv_type_int_p" = yes; then
48680     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48681$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48682as_fn_error 77 "cannot compute sizeof (int *)
48683See \`config.log' for more details" "$LINENO" 5; }
48684   else
48685     ac_cv_sizeof_int_p=0
48686   fi
48687fi
48688
48689fi
48690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48691$as_echo "$ac_cv_sizeof_int_p" >&6; }
48692
48693
48694
48695cat >>confdefs.h <<_ACEOF
48696#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48697_ACEOF
48698
48699
48700
48701  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48702  if test "x$ac_cv_sizeof_int_p" = x; then
48703    # The test failed, lets stick to the assumed value.
48704    { $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
48705$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48706  else
48707    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48708
48709    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48710      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48711      # Let's try to implicitely set the compilers target architecture and retry the test
48712      { $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
48713$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;}
48714      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48715$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48716
48717  # When we add flags to the "official" CFLAGS etc, we need to
48718  # keep track of these additions in ADDED_CFLAGS etc. These
48719  # will later be checked to make sure only controlled additions
48720  # have been made to CFLAGS etc.
48721  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48722  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48723  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48724
48725  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48726  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48727  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48728
48729  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48730  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48731  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48732
48733  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48734  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48735  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48736
48737
48738      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48739      unset ac_cv_sizeof_int_p
48740      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48741      cat >>confdefs.h <<_ACEOF
48742#undef SIZEOF_INT_P
48743_ACEOF
48744
48745      # The cast to long int works around a bug in the HP C Compiler
48746# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48747# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48748# This bug is HP SR number 8606223364.
48749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48750$as_echo_n "checking size of int *... " >&6; }
48751if ${ac_cv_sizeof_int_p+:} false; then :
48752  $as_echo_n "(cached) " >&6
48753else
48754  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48755
48756else
48757  if test "$ac_cv_type_int_p" = yes; then
48758     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48760as_fn_error 77 "cannot compute sizeof (int *)
48761See \`config.log' for more details" "$LINENO" 5; }
48762   else
48763     ac_cv_sizeof_int_p=0
48764   fi
48765fi
48766
48767fi
48768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48769$as_echo "$ac_cv_sizeof_int_p" >&6; }
48770
48771
48772
48773cat >>confdefs.h <<_ACEOF
48774#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48775_ACEOF
48776
48777
48778
48779      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48780
48781      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48782        { $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
48783$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;}
48784        if test "x$COMPILE_TYPE" = xreduced; then
48785
48786  # Print a helpful message on how to acquire the necessary build dependency.
48787  # reduced is the help tag: freetype, cups, alsa etc
48788  MISSING_DEPENDENCY=reduced
48789
48790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48791    cygwin_help $MISSING_DEPENDENCY
48792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48793    msys_help $MISSING_DEPENDENCY
48794  else
48795    PKGHANDLER_COMMAND=
48796
48797    case $PKGHANDLER in
48798      apt-get)
48799        apt_help     $MISSING_DEPENDENCY ;;
48800      yum)
48801        yum_help     $MISSING_DEPENDENCY ;;
48802      port)
48803        port_help    $MISSING_DEPENDENCY ;;
48804      pkgutil)
48805        pkgutil_help $MISSING_DEPENDENCY ;;
48806      pkgadd)
48807        pkgadd_help  $MISSING_DEPENDENCY ;;
48808    esac
48809
48810    if test "x$PKGHANDLER_COMMAND" != x; then
48811      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48812    fi
48813  fi
48814
48815          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48816$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48817        elif test "x$COMPILE_TYPE" = xcross; then
48818          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48819$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48820        fi
48821        as_fn_error $? "Cannot continue." "$LINENO" 5
48822      fi
48823    fi
48824  fi
48825
48826  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48827$as_echo_n "checking for target address size... " >&6; }
48828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48829$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48830
48831
48832  ###############################################################################
48833  #
48834  # Is the target little of big endian?
48835  #
48836   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48837$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48838if ${ac_cv_c_bigendian+:} false; then :
48839  $as_echo_n "(cached) " >&6
48840else
48841  ac_cv_c_bigendian=unknown
48842    # See if we're dealing with a universal compiler.
48843    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48844/* end confdefs.h.  */
48845#ifndef __APPLE_CC__
48846	       not a universal capable compiler
48847	     #endif
48848	     typedef int dummy;
48849
48850_ACEOF
48851if ac_fn_cxx_try_compile "$LINENO"; then :
48852
48853	# Check for potential -arch flags.  It is not universal unless
48854	# there are at least two -arch flags with different values.
48855	ac_arch=
48856	ac_prev=
48857	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48858	 if test -n "$ac_prev"; then
48859	   case $ac_word in
48860	     i?86 | x86_64 | ppc | ppc64)
48861	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48862		 ac_arch=$ac_word
48863	       else
48864		 ac_cv_c_bigendian=universal
48865		 break
48866	       fi
48867	       ;;
48868	   esac
48869	   ac_prev=
48870	 elif test "x$ac_word" = "x-arch"; then
48871	   ac_prev=arch
48872	 fi
48873       done
48874fi
48875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48876    if test $ac_cv_c_bigendian = unknown; then
48877      # See if sys/param.h defines the BYTE_ORDER macro.
48878      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48879/* end confdefs.h.  */
48880#include <sys/types.h>
48881	     #include <sys/param.h>
48882
48883int
48884main ()
48885{
48886#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48887		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48888		     && LITTLE_ENDIAN)
48889	      bogus endian macros
48890	     #endif
48891
48892  ;
48893  return 0;
48894}
48895_ACEOF
48896if ac_fn_cxx_try_compile "$LINENO"; then :
48897  # It does; now see whether it defined to BIG_ENDIAN or not.
48898	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48899/* end confdefs.h.  */
48900#include <sys/types.h>
48901		#include <sys/param.h>
48902
48903int
48904main ()
48905{
48906#if BYTE_ORDER != BIG_ENDIAN
48907		 not big endian
48908		#endif
48909
48910  ;
48911  return 0;
48912}
48913_ACEOF
48914if ac_fn_cxx_try_compile "$LINENO"; then :
48915  ac_cv_c_bigendian=yes
48916else
48917  ac_cv_c_bigendian=no
48918fi
48919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48920fi
48921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48922    fi
48923    if test $ac_cv_c_bigendian = unknown; then
48924      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48925      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48926/* end confdefs.h.  */
48927#include <limits.h>
48928
48929int
48930main ()
48931{
48932#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48933	      bogus endian macros
48934	     #endif
48935
48936  ;
48937  return 0;
48938}
48939_ACEOF
48940if ac_fn_cxx_try_compile "$LINENO"; then :
48941  # It does; now see whether it defined to _BIG_ENDIAN or not.
48942	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48943/* end confdefs.h.  */
48944#include <limits.h>
48945
48946int
48947main ()
48948{
48949#ifndef _BIG_ENDIAN
48950		 not big endian
48951		#endif
48952
48953  ;
48954  return 0;
48955}
48956_ACEOF
48957if ac_fn_cxx_try_compile "$LINENO"; then :
48958  ac_cv_c_bigendian=yes
48959else
48960  ac_cv_c_bigendian=no
48961fi
48962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48963fi
48964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48965    fi
48966    if test $ac_cv_c_bigendian = unknown; then
48967      # Compile a test program.
48968      if test "$cross_compiling" = yes; then :
48969  # Try to guess by grepping values from an object file.
48970	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48971/* end confdefs.h.  */
48972short int ascii_mm[] =
48973		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48974		short int ascii_ii[] =
48975		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48976		int use_ascii (int i) {
48977		  return ascii_mm[i] + ascii_ii[i];
48978		}
48979		short int ebcdic_ii[] =
48980		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48981		short int ebcdic_mm[] =
48982		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48983		int use_ebcdic (int i) {
48984		  return ebcdic_mm[i] + ebcdic_ii[i];
48985		}
48986		extern int foo;
48987
48988int
48989main ()
48990{
48991return use_ascii (foo) == use_ebcdic (foo);
48992  ;
48993  return 0;
48994}
48995_ACEOF
48996if ac_fn_cxx_try_compile "$LINENO"; then :
48997  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48998	      ac_cv_c_bigendian=yes
48999	    fi
49000	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49001	      if test "$ac_cv_c_bigendian" = unknown; then
49002		ac_cv_c_bigendian=no
49003	      else
49004		# finding both strings is unlikely to happen, but who knows?
49005		ac_cv_c_bigendian=unknown
49006	      fi
49007	    fi
49008fi
49009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49010else
49011  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49012/* end confdefs.h.  */
49013$ac_includes_default
49014int
49015main ()
49016{
49017
49018	     /* Are we little or big endian?  From Harbison&Steele.  */
49019	     union
49020	     {
49021	       long int l;
49022	       char c[sizeof (long int)];
49023	     } u;
49024	     u.l = 1;
49025	     return u.c[sizeof (long int) - 1] == 1;
49026
49027  ;
49028  return 0;
49029}
49030_ACEOF
49031if ac_fn_cxx_try_run "$LINENO"; then :
49032  ac_cv_c_bigendian=no
49033else
49034  ac_cv_c_bigendian=yes
49035fi
49036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49037  conftest.$ac_objext conftest.beam conftest.$ac_ext
49038fi
49039
49040    fi
49041fi
49042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49043$as_echo "$ac_cv_c_bigendian" >&6; }
49044 case $ac_cv_c_bigendian in #(
49045   yes)
49046     ENDIAN="big";; #(
49047   no)
49048     ENDIAN="little" ;; #(
49049   universal)
49050     ENDIAN="universal_endianness"
49051     ;; #(
49052   *)
49053     ENDIAN="unknown" ;;
49054 esac
49055
49056
49057  if test "x$ENDIAN" = xuniversal_endianness; then
49058    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49059  fi
49060  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49061    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
49062  fi
49063
49064
49065# Configure flags for the tools
49066
49067  ###############################################################################
49068  #
49069  # How to compile shared libraries.
49070  #
49071
49072  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49073    PICFLAG="-fPIC"
49074    C_FLAG_REORDER=''
49075    CXX_FLAG_REORDER=''
49076
49077    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49078      # Linking is different on MacOSX
49079      if test "x$STATIC_BUILD" = xtrue; then
49080        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49081      else
49082        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49083        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49084      fi
49085      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49086      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49087      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49088      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49089    else
49090      # Default works for linux, might work on other platforms as well.
49091      SHARED_LIBRARY_FLAGS='-shared'
49092      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49093      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49094      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49095      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49096    fi
49097  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49098    C_FLAG_REORDER=''
49099    CXX_FLAG_REORDER=''
49100
49101    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49102      # Linking is different on MacOSX
49103      PICFLAG=''
49104      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49105      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49106      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49107      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49108      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49109
49110      if test "x$STATIC_BUILD" = xfalse; then
49111        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49112      fi
49113    else
49114      # Default works for linux, might work on other platforms as well.
49115      PICFLAG='-fPIC'
49116      SHARED_LIBRARY_FLAGS='-shared'
49117      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49118      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49119      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49120      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49121    fi
49122  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49123    PICFLAG="-KPIC"
49124    C_FLAG_REORDER='-xF'
49125    CXX_FLAG_REORDER='-xF'
49126    SHARED_LIBRARY_FLAGS="-G"
49127    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
49128    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49129    SET_SHARED_LIBRARY_NAME='-h $1'
49130    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49131  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49132    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49133    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49134    # will have to patch this single instruction with a call to some out-of-order code which
49135    # does the load from the TOC. This is of course slow. But in that case we also would have
49136    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49137    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49138    # can be patched directly by the linker and does not require a jump to out-of-order code.
49139    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49140    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49141    # loads for accessing a global variable). But there are rumors that this may be seen as a
49142    # 'performance feature' because of improved code locality of the symbols used in a
49143    # compilation unit.
49144    PICFLAG="-qpic"
49145    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49146    C_FLAG_REORDER=''
49147    CXX_FLAG_REORDER=''
49148    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49149    SET_EXECUTABLE_ORIGIN=""
49150    SET_SHARED_LIBRARY_ORIGIN=''
49151    SET_SHARED_LIBRARY_NAME=''
49152    SET_SHARED_LIBRARY_MAPFILE=''
49153  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49154    PICFLAG=""
49155    C_FLAG_REORDER=''
49156    CXX_FLAG_REORDER=''
49157    SHARED_LIBRARY_FLAGS="-dll"
49158    SET_EXECUTABLE_ORIGIN=''
49159    SET_SHARED_LIBRARY_ORIGIN=''
49160    SET_SHARED_LIBRARY_NAME=''
49161    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49162  fi
49163
49164
49165
49166
49167
49168
49169
49170
49171
49172  # The (cross) compiler is now configured, we can now test capabilities
49173  # of the target platform.
49174
49175
49176
49177  ###############################################################################
49178  #
49179  # Setup the opt flags for different compilers
49180  # and different operating systems.
49181  #
49182
49183  # FIXME: this was indirectly the old default, but just inherited.
49184  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49185  #   C_FLAG_DEPS="-MMD -MF"
49186  # fi
49187
49188  # Generate make dependency files
49189  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49190    C_FLAG_DEPS="-MMD -MF"
49191  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49192    C_FLAG_DEPS="-MMD -MF"
49193  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49194    C_FLAG_DEPS="-xMMD -xMF"
49195  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49196    C_FLAG_DEPS="-qmakedep=gcc -MF"
49197  fi
49198  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49199
49200
49201
49202  # Debug symbols
49203  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49204    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49205      # reduce from default "-g2" option to save space
49206      CFLAGS_DEBUG_SYMBOLS="-g1"
49207      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49208    else
49209      CFLAGS_DEBUG_SYMBOLS="-g"
49210      CXXFLAGS_DEBUG_SYMBOLS="-g"
49211    fi
49212  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49213    CFLAGS_DEBUG_SYMBOLS="-g"
49214    CXXFLAGS_DEBUG_SYMBOLS="-g"
49215  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49216    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49217    # -g0 enables debug symbols without disabling inlining.
49218    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49219  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49220    CFLAGS_DEBUG_SYMBOLS="-g"
49221    CXXFLAGS_DEBUG_SYMBOLS="-g"
49222  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49223    CFLAGS_DEBUG_SYMBOLS="-Zi"
49224    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49225  fi
49226
49227
49228
49229  # Debug symbols for JVM_CFLAGS
49230  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49231    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49232    if test "x$DEBUG_LEVEL" = xslowdebug; then
49233      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49234    else
49235      # -g0 does not disable inlining, which -g does.
49236      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49237    fi
49238  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49239    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49240  else
49241    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49242  fi
49243
49244
49245  # bounds, memory and behavior checking options
49246  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49247    case $DEBUG_LEVEL in
49248    release )
49249      # no adjustment
49250      ;;
49251    fastdebug )
49252      # no adjustment
49253      ;;
49254    slowdebug )
49255      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49256      # get's added conditionally on whether we produce debug symbols or not.
49257      # This is most likely not really correct.
49258
49259      # Add runtime stack smashing and undefined behavior checks.
49260      # Not all versions of gcc support -fstack-protector
49261      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
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    # Execute function body
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340
49341
49342
49343
49344
49345
49346
49347
49348
49349
49350
49351
49352
49353    # Execute function body
49354
49355  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49356$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49357  supports=yes
49358
49359  saved_cflags="$CFLAGS"
49360  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49361  ac_ext=c
49362ac_cpp='$CPP $CPPFLAGS'
49363ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49364ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49365ac_compiler_gnu=$ac_cv_c_compiler_gnu
49366
49367  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49368/* end confdefs.h.  */
49369int i;
49370_ACEOF
49371if ac_fn_c_try_compile "$LINENO"; then :
49372
49373else
49374  supports=no
49375fi
49376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49377  ac_ext=cpp
49378ac_cpp='$CXXCPP $CPPFLAGS'
49379ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49380ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49381ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49382
49383  CFLAGS="$saved_cflags"
49384
49385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49386$as_echo "$supports" >&6; }
49387  if test "x$supports" = "xyes" ; then
49388    :
49389    C_COMP_SUPPORTS="yes"
49390  else
49391    :
49392    C_COMP_SUPPORTS="no"
49393  fi
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
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445
49446
49447
49448
49449
49450
49451
49452
49453    # Execute function body
49454
49455  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49456$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49457  supports=yes
49458
49459  saved_cxxflags="$CXXFLAGS"
49460  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49461  ac_ext=cpp
49462ac_cpp='$CXXCPP $CPPFLAGS'
49463ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49464ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49465ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49466
49467  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49468/* end confdefs.h.  */
49469int i;
49470_ACEOF
49471if ac_fn_cxx_try_compile "$LINENO"; then :
49472
49473else
49474  supports=no
49475fi
49476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49477  ac_ext=cpp
49478ac_cpp='$CXXCPP $CPPFLAGS'
49479ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49480ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49481ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49482
49483  CXXFLAGS="$saved_cxxflags"
49484
49485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49486$as_echo "$supports" >&6; }
49487  if test "x$supports" = "xyes" ; then
49488    :
49489    CXX_COMP_SUPPORTS="yes"
49490  else
49491    :
49492    CXX_COMP_SUPPORTS="no"
49493  fi
49494
49495
49496
49497
49498
49499
49500
49501
49502
49503
49504
49505
49506
49507  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49508$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49509  supports=no
49510  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49511
49512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49513$as_echo "$supports" >&6; }
49514  if test "x$supports" = "xyes" ; then
49515    :
49516
49517  else
49518    :
49519    STACK_PROTECTOR_CFLAG=""
49520  fi
49521
49522
49523
49524
49525
49526
49527
49528      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49529      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49530      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49531        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49532      fi
49533      ;;
49534    esac
49535  fi
49536
49537  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49538    if test "x$DEBUG_LEVEL" != xrelease; then
49539      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49540        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49541      fi
49542    fi
49543  fi
49544
49545  # Optimization levels
49546  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49547    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49548
49549    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49550      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49551      C_O_FLAG_HIGHEST_JVM="-xO4"
49552      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49553      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49554      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49555      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49556      C_O_FLAG_DEBUG_JVM=""
49557      C_O_FLAG_NONE="-xregs=no%frameptr"
49558      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49559      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49560      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49561      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49562      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49563      CXX_O_FLAG_DEBUG_JVM=""
49564      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49565      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49566        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49567        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49568      fi
49569    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49570      C_O_FLAG_HIGHEST_JVM="-xO4"
49571      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49572      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49573      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49574      C_O_FLAG_DEBUG=""
49575      C_O_FLAG_DEBUG_JVM=""
49576      C_O_FLAG_NONE=""
49577      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49578      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49579      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49580      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49581      CXX_O_FLAG_DEBUG=""
49582      CXX_O_FLAG_DEBUG_JVM=""
49583      CXX_O_FLAG_NONE=""
49584    fi
49585  else
49586    # The remaining toolchains share opt flags between CC and CXX;
49587    # setup for C and duplicate afterwards.
49588    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49589      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49590        # On MacOSX we optimize for size, something
49591        # we should do for all platforms?
49592        C_O_FLAG_HIGHEST_JVM="-Os"
49593        C_O_FLAG_HIGHEST="-Os"
49594        C_O_FLAG_HI="-Os"
49595        C_O_FLAG_NORM="-Os"
49596        C_O_FLAG_SIZE="-Os"
49597      else
49598        C_O_FLAG_HIGHEST_JVM="-O3"
49599        C_O_FLAG_HIGHEST="-O3"
49600        C_O_FLAG_HI="-O3"
49601        C_O_FLAG_NORM="-O2"
49602        C_O_FLAG_SIZE="-Os"
49603      fi
49604      C_O_FLAG_DEBUG="-O0"
49605      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49606        C_O_FLAG_DEBUG_JVM=""
49607      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49608        C_O_FLAG_DEBUG_JVM="-O0"
49609      fi
49610      C_O_FLAG_NONE="-O0"
49611    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49612      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49613        # On MacOSX we optimize for size, something
49614        # we should do for all platforms?
49615        C_O_FLAG_HIGHEST_JVM="-Os"
49616        C_O_FLAG_HIGHEST="-Os"
49617        C_O_FLAG_HI="-Os"
49618        C_O_FLAG_NORM="-Os"
49619        C_O_FLAG_SIZE="-Os"
49620      else
49621        C_O_FLAG_HIGHEST_JVM="-O3"
49622        C_O_FLAG_HIGHEST="-O3"
49623        C_O_FLAG_HI="-O3"
49624        C_O_FLAG_NORM="-O2"
49625        C_O_FLAG_SIZE="-Os"
49626      fi
49627      C_O_FLAG_DEBUG="-O0"
49628      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49629        C_O_FLAG_DEBUG_JVM=""
49630      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49631        C_O_FLAG_DEBUG_JVM="-O0"
49632      fi
49633      C_O_FLAG_NONE="-O0"
49634    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49635      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49636      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49637      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49638      C_O_FLAG_NORM="-O2"
49639      C_O_FLAG_DEBUG="-qnoopt"
49640      # FIXME: Value below not verified.
49641      C_O_FLAG_DEBUG_JVM=""
49642      C_O_FLAG_NONE="-qnoopt"
49643    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49644      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49645      C_O_FLAG_HIGHEST="-O2"
49646      C_O_FLAG_HI="-O1"
49647      C_O_FLAG_NORM="-O1"
49648      C_O_FLAG_DEBUG="-Od"
49649      C_O_FLAG_DEBUG_JVM=""
49650      C_O_FLAG_NONE="-Od"
49651      C_O_FLAG_SIZE="-Os"
49652    fi
49653    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49654    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49655    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49656    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49657    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49658    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49659    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49660    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49661  fi
49662
49663  # Adjust optimization flags according to debug level.
49664  case $DEBUG_LEVEL in
49665    release )
49666      # no adjustment
49667      ;;
49668    fastdebug )
49669      # Not quite so much optimization
49670      C_O_FLAG_HI="$C_O_FLAG_NORM"
49671      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49672      ;;
49673    slowdebug )
49674      # Disable optimization
49675      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49676      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49677      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49678      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49679      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49680      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49681      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49682      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49683      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49684      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49685      ;;
49686  esac
49687
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697
49698
49699
49700
49701
49702
49703
49704
49705
49706  # Special extras...
49707  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49708    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49709      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49710      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49711    fi
49712    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49713    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49714  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49715    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49716    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49717  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49718    CXXSTD_CXXFLAG="-std=gnu++98"
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742
49743
49744
49745
49746
49747
49748
49749
49750
49751
49752
49753
49754
49755
49756
49757
49758
49759
49760
49761    # Execute function body
49762
49763  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49764$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49765  supports=yes
49766
49767  saved_cxxflags="$CXXFLAGS"
49768  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49769  ac_ext=cpp
49770ac_cpp='$CXXCPP $CPPFLAGS'
49771ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49772ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49773ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49774
49775  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49776/* end confdefs.h.  */
49777int i;
49778_ACEOF
49779if ac_fn_cxx_try_compile "$LINENO"; then :
49780
49781else
49782  supports=no
49783fi
49784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49785  ac_ext=cpp
49786ac_cpp='$CXXCPP $CPPFLAGS'
49787ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49788ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49789ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49790
49791  CXXFLAGS="$saved_cxxflags"
49792
49793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49794$as_echo "$supports" >&6; }
49795  if test "x$supports" = "xyes" ; then
49796    :
49797
49798  else
49799    :
49800    CXXSTD_CXXFLAG=""
49801  fi
49802
49803
49804
49805
49806
49807
49808
49809
49810
49811
49812
49813
49814    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49815    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49816
49817  fi
49818  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49819    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49820    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49821  fi
49822
49823  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49824    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49825    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49826  fi
49827
49828  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49829  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49830  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49831
49832  ###############################################################################
49833  #
49834  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49835  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49836  #
49837
49838  # Setup compiler/platform specific flags into
49839  #    CFLAGS_JDK    - C Compiler flags
49840  #    CXXFLAGS_JDK  - C++ Compiler flags
49841  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49842  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49843    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49844    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49845    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49846    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49847      # Force compatibility with i586 on 32 bit intel platforms.
49848      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49849      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49850    fi
49851    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49852        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49853    case $OPENJDK_TARGET_CPU_ARCH in
49854      arm )
49855        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49856        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49857        ;;
49858      ppc )
49859        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49860        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49861        ;;
49862      * )
49863        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49864        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49865        ;;
49866    esac
49867
49868
49869
49870
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
49914
49915
49916
49917
49918
49919
49920
49921    # Execute function body
49922
49923  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49924  REFERENCE_VERSION=6
49925
49926  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49927    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49928  fi
49929
49930  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49931    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49932  fi
49933
49934  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49935  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49936
49937  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49938    :
49939
49940  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49941  # runs afoul of the more aggressive versions of these optimisations.
49942  # Notably, value range propagation now assumes that the this pointer of C++
49943  # member functions is non-null.
49944  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49945        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49946        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49947$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49948  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49949  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49950
49951  else
49952    :
49953
49954  fi
49955
49956
49957
49958
49959
49960
49961
49962
49963
49964
49965
49966
49967
49968
49969  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49970    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49971
49972    # Restrict the debug information created by Clang to avoid
49973    # too big object files and speed the build up a little bit
49974    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49975    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49976    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49977      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49978        # Force compatibility with i586 on 32 bit intel platforms.
49979        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49980        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49981      fi
49982      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49983      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49984          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49985      case $OPENJDK_TARGET_CPU_ARCH in
49986        ppc )
49987          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49988          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49989          ;;
49990        * )
49991          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49992          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49993          ;;
49994      esac
49995    fi
49996  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49997    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49998    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49999    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50000      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50001    fi
50002
50003    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50004    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50005  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50006    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50007    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50008    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50009  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50010    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50011        -MD -Zc:wchar_t- -W3 -wd4800 \
50012        -DWIN32_LEAN_AND_MEAN \
50013        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50014        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50015        -DWIN32 -DIAL"
50016    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50017      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50018    else
50019      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50020    fi
50021    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50022    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50023    # studio.
50024    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50025      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50026      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50027      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50028    fi
50029  fi
50030
50031  ###############################################################################
50032
50033  # Adjust flags according to debug level.
50034  case $DEBUG_LEVEL in
50035    fastdebug | slowdebug )
50036      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50037      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50038      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50039      ;;
50040    release )
50041      ;;
50042    * )
50043      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50044      ;;
50045  esac
50046
50047  # Set some common defines. These works for all compilers, but assume
50048  # -D is universally accepted.
50049
50050  # Setup endianness
50051  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50052    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50053    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50054    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50055    #   Note: -Dmacro         is the same as    #define macro 1
50056    #         -Dmacro=        is the same as    #define macro
50057    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50058      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50059    else
50060      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50061    fi
50062  else
50063    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50064    # are defined in the system?
50065    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50066      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50067    else
50068      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50069    fi
50070  fi
50071
50072  # Setup target OS define. Use OS target name but in upper case.
50073  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50074  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50075
50076  # Setup target CPU
50077  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50078      $OPENJDK_TARGET_ADD_LP64 \
50079      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50080
50081  # Setup debug/release defines
50082  if test "x$DEBUG_LEVEL" = xrelease; then
50083    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50084    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50085      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50086    fi
50087  else
50088    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50089  fi
50090
50091  # Set some additional per-OS defines.
50092  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50093    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50094    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50095        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50096  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50097    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50098    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50099        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50100  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50101    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50102    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50103    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50104    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50105        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50106        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50107        -fno-omit-frame-pointer"
50108  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50109    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50110    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50111    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50112        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50113        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50114  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50115    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50116  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50117    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50118    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50119  fi
50120
50121  # Set some additional per-CPU defines.
50122  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50123    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50124  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50125    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50126  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50127    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50128      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50129      # fixes `relocation truncated to fit' error for gcc 4.1.
50130      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50131      # Use ppc64 instructions, but schedule for power5
50132      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50133    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50134      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50135    fi
50136  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50137    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50138      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50139      # Little endian machine uses ELFv2 ABI.
50140      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50141      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50142      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50143    fi
50144  fi
50145
50146  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50147    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50148  fi
50149
50150  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50151    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50152      # Solaris does not have _LP64=1 in the old build.
50153      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50154      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50155    fi
50156  fi
50157
50158  # Set JVM_CFLAGS warning handling
50159  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50160    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50161        -Wunused-value -Woverloaded-virtual"
50162
50163    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50164
50165
50166
50167
50168
50169
50170
50171
50172
50173
50174
50175
50176
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206
50207
50208
50209
50210
50211
50212
50213
50214
50215
50216
50217
50218    # Execute function body
50219
50220  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50221  REFERENCE_VERSION=4.8
50222
50223  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50224    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50225  fi
50226
50227  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50228    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50229  fi
50230
50231  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50232  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50233
50234  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50235    :
50236
50237            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50238            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50239
50240
50241  else
50242    :
50243
50244  fi
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
50258
50259    fi
50260    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50261      # Non-zero builds have stricter warnings
50262      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50263    else
50264      if test "x$TOOLCHAIN_TYPE" = xclang; then
50265        # Some versions of llvm do not like -Wundef
50266        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50267      fi
50268    fi
50269  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50270    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50271        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50272  fi
50273
50274  # Additional macosx handling
50275  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50276    # Setting these parameters makes it an error to link to macosx APIs that are
50277    # newer than the given OS version and makes the linked binaries compatible
50278    # even if built on a newer version of the OS.
50279    # The expected format is X.Y.Z
50280    MACOSX_VERSION_MIN=10.7.0
50281
50282
50283    # The macro takes the version with no dots, ex: 1070
50284    # Let the flags variables get resolved in make for easier override on make
50285    # command line.
50286    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50287    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50288  fi
50289
50290  # Setup some hard coded includes
50291  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50292      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50293      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50294      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50295      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50296      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50297
50298  # The shared libraries are compiled using the picflag.
50299  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50300      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50301  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50302      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50303
50304  # Executable flags
50305  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50306  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50307
50308
50309
50310
50311
50312
50313  # Setup LDFLAGS et al.
50314  #
50315
50316  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50317    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50318    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50319    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50320    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50321      LDFLAGS_SAFESH="-safeseh"
50322      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50323      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50324      # NOTE: Old build added -machine. Probably not needed.
50325      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50326    else
50327      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50328    fi
50329  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50330      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50331      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50332        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50333        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50334    fi
50335  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50336    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50337    # We have previously set HAS_GNU_HASH if this is the case
50338    if test -n "$HAS_GNU_HASH"; then
50339      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50340      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50341      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50342    fi
50343      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50344        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50345    fi
50346    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50347      # And since we now know that the linker is gnu, then add -z defs, to forbid
50348      # undefined symbols in object files.
50349      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50350      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50351      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50352      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50353      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50354      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50355        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50356      fi
50357      case $DEBUG_LEVEL in
50358        release )
50359          # tell linker to optimize libraries.
50360          # Should this be supplied to the OSS linker as well?
50361          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50362          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50363          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50364          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50365            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50366          fi
50367          ;;
50368        slowdebug )
50369          # Hotspot always let the linker optimize
50370          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50371          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50372            # do relocations at load
50373            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50374            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50375            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50376          fi
50377          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50378            # mark relocations read only
50379            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50380            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50381            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50382          fi
50383          ;;
50384        fastdebug )
50385          # Hotspot always let the linker optimize
50386          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50387          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50388            # mark relocations read only
50389            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50390            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50391            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50392          fi
50393          ;;
50394        * )
50395          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50396          ;;
50397        esac
50398    fi
50399  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50400    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50401    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50402    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50403    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50404    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50405    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50406      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50407    fi
50408  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50409    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50410    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50411    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50412  fi
50413
50414  # Customize LDFLAGS for executables
50415
50416  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50417
50418  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50419    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50420      LDFLAGS_STACK_SIZE=1048576
50421    else
50422      LDFLAGS_STACK_SIZE=327680
50423    fi
50424    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50425  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50426    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50427  fi
50428
50429  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50430
50431  # Customize LDFLAGS for libs
50432  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50433
50434  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50435  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50436    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50437        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50438    JDKLIB_LIBS=""
50439  else
50440    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50441        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50442
50443    if test "xTARGET" = "xTARGET"; then
50444    # On some platforms (mac) the linker warns about non existing -L dirs.
50445    # Add server first if available. Linking aginst client does not always produce the same results.
50446      # Only add client/minimal dir if client/minimal is being built.
50447    # Default to server for other variants.
50448      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50449        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50450      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50451        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50452      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50453        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50454    else
50455        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50456    fi
50457    elif test "xTARGET" = "xBUILD"; then
50458      # When building a buildjdk, it's always only the server variant
50459      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50460          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50461    fi
50462
50463    JDKLIB_LIBS="-ljava -ljvm"
50464    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50465      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50466    fi
50467
50468  fi
50469
50470LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50471
50472  # Set JVM_LIBS (per os)
50473  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50474    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50475  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50476    # FIXME: This hard-coded path is not really proper.
50477    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50478      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50479    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50480      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50481    fi
50482    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50483        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50484  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50485    JVM_LIBS="$JVM_LIBS -lm"
50486  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50487    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50488  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50489    JVM_LIBS="$JVM_LIBS -lm"
50490  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50491    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50492        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50493        wsock32.lib winmm.lib version.lib psapi.lib"
50494    fi
50495
50496  # Set JVM_ASFLAGS
50497  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50498    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50499      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50500    fi
50501  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50502    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50503  fi
50504
50505  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50506
50507
50508
50509
50510
50511
50512
50513
50514
50515
50516
50517
50518
50519
50520
50521  # Special extras...
50522  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50523    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50524      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50525      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50526    fi
50527    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50528    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50529  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50530    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50531    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50532  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50533    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50534
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552
50553
50554
50555
50556
50557
50558
50559
50560
50561
50562
50563
50564
50565
50566
50567
50568
50569
50570
50571
50572
50573
50574
50575
50576    # Execute function body
50577
50578  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50579$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50580  supports=yes
50581
50582  saved_cxxflags="$CXXFLAGS"
50583  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50584  ac_ext=cpp
50585ac_cpp='$CXXCPP $CPPFLAGS'
50586ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50587ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50588ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50589
50590  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50591/* end confdefs.h.  */
50592int i;
50593_ACEOF
50594if ac_fn_cxx_try_compile "$LINENO"; then :
50595
50596else
50597  supports=no
50598fi
50599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50600  ac_ext=cpp
50601ac_cpp='$CXXCPP $CPPFLAGS'
50602ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50603ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50604ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50605
50606  CXXFLAGS="$saved_cxxflags"
50607
50608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50609$as_echo "$supports" >&6; }
50610  if test "x$supports" = "xyes" ; then
50611    :
50612
50613  else
50614    :
50615    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50616  fi
50617
50618
50619
50620
50621
50622
50623
50624
50625
50626
50627
50628
50629    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50630    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50631
50632  fi
50633  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50634    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50635    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50636  fi
50637
50638  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50639    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50640    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50641  fi
50642
50643  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50644  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50645  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50646
50647  ###############################################################################
50648  #
50649  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50650  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50651  #
50652
50653  # Setup compiler/platform specific flags into
50654  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50655  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50656  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50657  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50658    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50659    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50660    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50661    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50662      # Force compatibility with i586 on 32 bit intel platforms.
50663      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50664      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50665    fi
50666    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50667        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50668    case $OPENJDK_BUILD_CPU_ARCH in
50669      arm )
50670        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50671        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50672        ;;
50673      ppc )
50674        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50675        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50676        ;;
50677      * )
50678        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50679        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50680        ;;
50681    esac
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725
50726
50727
50728
50729
50730
50731
50732
50733
50734
50735
50736    # Execute function body
50737
50738  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50739  REFERENCE_VERSION=6
50740
50741  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50742    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50743  fi
50744
50745  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50746    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50747  fi
50748
50749  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50750  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50751
50752  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50753    :
50754
50755  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50756  # runs afoul of the more aggressive versions of these optimisations.
50757  # Notably, value range propagation now assumes that the this pointer of C++
50758  # member functions is non-null.
50759  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50760        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50761        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50762$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50763  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50764  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50765
50766  else
50767    :
50768
50769  fi
50770
50771
50772
50773
50774
50775
50776
50777
50778
50779
50780
50781
50782
50783
50784  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50785    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50786
50787    # Restrict the debug information created by Clang to avoid
50788    # too big object files and speed the build up a little bit
50789    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50790    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50791    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50792      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50793        # Force compatibility with i586 on 32 bit intel platforms.
50794        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50795        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50796      fi
50797      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50798      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50799          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50800      case $OPENJDK_BUILD_CPU_ARCH in
50801        ppc )
50802          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50803          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50804          ;;
50805        * )
50806          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50807          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50808          ;;
50809      esac
50810    fi
50811  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50812    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50813    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50814    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50815      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50816    fi
50817
50818    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50819    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50820  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50821    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50822    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50823    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50824  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50825    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50826        -MD -Zc:wchar_t- -W3 -wd4800 \
50827        -DWIN32_LEAN_AND_MEAN \
50828        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50829        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50830        -DWIN32 -DIAL"
50831    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50832      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50833    else
50834      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50835    fi
50836    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50837    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50838    # studio.
50839    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50840      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50841      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50842      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50843    fi
50844  fi
50845
50846  ###############################################################################
50847
50848  # Adjust flags according to debug level.
50849  case $DEBUG_LEVEL in
50850    fastdebug | slowdebug )
50851      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50852      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50853      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50854      ;;
50855    release )
50856      ;;
50857    * )
50858      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50859      ;;
50860  esac
50861
50862  # Set some common defines. These works for all compilers, but assume
50863  # -D is universally accepted.
50864
50865  # Setup endianness
50866  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50867    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50868    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50869    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50870    #   Note: -Dmacro         is the same as    #define macro 1
50871    #         -Dmacro=        is the same as    #define macro
50872    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50873      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50874    else
50875      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50876    fi
50877  else
50878    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50879    # are defined in the system?
50880    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50881      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50882    else
50883      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50884    fi
50885  fi
50886
50887  # Setup target OS define. Use OS target name but in upper case.
50888  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50889  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50890
50891  # Setup target CPU
50892  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50893      $OPENJDK_BUILD_ADD_LP64 \
50894      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50895
50896  # Setup debug/release defines
50897  if test "x$DEBUG_LEVEL" = xrelease; then
50898    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50899    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50900      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50901    fi
50902  else
50903    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50904  fi
50905
50906  # Set some additional per-OS defines.
50907  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50908    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50909    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50910        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50911  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50912    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50913    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50914        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50915  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50916    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50917    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50918    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50919    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50920        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50921        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50922        -fno-omit-frame-pointer"
50923  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50924    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50925    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50926    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50927        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50928        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50929  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50930    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50931  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50932    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50933    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50934  fi
50935
50936  # Set some additional per-CPU defines.
50937  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50938    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50939  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50940    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50941  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50942    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50943      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50944      # fixes `relocation truncated to fit' error for gcc 4.1.
50945      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50946      # Use ppc64 instructions, but schedule for power5
50947      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50948    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50949      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50950    fi
50951  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50952    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50953      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50954      # Little endian machine uses ELFv2 ABI.
50955      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50956      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50957      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50958    fi
50959  fi
50960
50961  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50962    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50963  fi
50964
50965  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50966    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50967      # Solaris does not have _LP64=1 in the old build.
50968      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50969      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50970    fi
50971  fi
50972
50973  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50974  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50975    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50976        -Wunused-value -Woverloaded-virtual"
50977
50978    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50979
50980
50981
50982
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997
50998
50999
51000
51001
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019
51020
51021
51022
51023
51024
51025
51026
51027
51028
51029
51030
51031
51032
51033    # Execute function body
51034
51035  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51036  REFERENCE_VERSION=4.8
51037
51038  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51039    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51040  fi
51041
51042  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51043    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51044  fi
51045
51046  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51047  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51048
51049  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51050    :
51051
51052            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51053            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51054
51055
51056  else
51057    :
51058
51059  fi
51060
51061
51062
51063
51064
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074    fi
51075    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51076      # Non-zero builds have stricter warnings
51077      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51078    else
51079      if test "x$TOOLCHAIN_TYPE" = xclang; then
51080        # Some versions of llvm do not like -Wundef
51081        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51082      fi
51083    fi
51084  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51085    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51086        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51087  fi
51088
51089  # Additional macosx handling
51090  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51091    # Setting these parameters makes it an error to link to macosx APIs that are
51092    # newer than the given OS version and makes the linked binaries compatible
51093    # even if built on a newer version of the OS.
51094    # The expected format is X.Y.Z
51095    MACOSX_VERSION_MIN=10.7.0
51096
51097
51098    # The macro takes the version with no dots, ex: 1070
51099    # Let the flags variables get resolved in make for easier override on make
51100    # command line.
51101    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)"
51102    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51103  fi
51104
51105  # Setup some hard coded includes
51106  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51107      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51108      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51109      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51110      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51111      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51112
51113  # The shared libraries are compiled using the picflag.
51114  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51115      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51116  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51117      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51118
51119  # Executable flags
51120  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51121  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51122
51123
51124
51125
51126
51127
51128  # Setup LDFLAGS et al.
51129  #
51130
51131  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51132    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51133    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51134    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51135    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51136      LDFLAGS_SAFESH="-safeseh"
51137      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51138      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51139      # NOTE: Old build added -machine. Probably not needed.
51140      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51141    else
51142      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51143    fi
51144  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51145      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51146      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51147        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51148        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51149    fi
51150  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51151    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51152    # We have previously set HAS_GNU_HASH if this is the case
51153    if test -n "$HAS_GNU_HASH"; then
51154      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51155      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51156      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51157    fi
51158      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51159        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51160    fi
51161    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51162      # And since we now know that the linker is gnu, then add -z defs, to forbid
51163      # undefined symbols in object files.
51164      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51165      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51166      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51167      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51168      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51169      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51170        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51171      fi
51172      case $DEBUG_LEVEL in
51173        release )
51174          # tell linker to optimize libraries.
51175          # Should this be supplied to the OSS linker as well?
51176          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51177          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51178          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51179          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51180            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51181          fi
51182          ;;
51183        slowdebug )
51184          # Hotspot always let the linker optimize
51185          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51186          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51187            # do relocations at load
51188            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51189            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51190            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51191          fi
51192          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51193            # mark relocations read only
51194            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51195            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51196            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51197          fi
51198          ;;
51199        fastdebug )
51200          # Hotspot always let the linker optimize
51201          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51202          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51203            # mark relocations read only
51204            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51205            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51206            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51207          fi
51208          ;;
51209        * )
51210          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51211          ;;
51212        esac
51213    fi
51214  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51215    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51216    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51217    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51218    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51219    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51220    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51221      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51222    fi
51223  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51224    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51225    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51226    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51227  fi
51228
51229  # Customize LDFLAGS for executables
51230
51231  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51232
51233  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51234    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51235      LDFLAGS_STACK_SIZE=1048576
51236    else
51237      LDFLAGS_STACK_SIZE=327680
51238    fi
51239    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51240  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51241    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51242  fi
51243
51244  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51245
51246  # Customize LDFLAGS for libs
51247  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51248
51249  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51250  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51251    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51252        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51253    OPENJDK_BUILD_JDKLIB_LIBS=""
51254  else
51255    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51256        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51257
51258    if test "xBUILD" = "xTARGET"; then
51259    # On some platforms (mac) the linker warns about non existing -L dirs.
51260    # Add server first if available. Linking aginst client does not always produce the same results.
51261      # Only add client/minimal dir if client/minimal is being built.
51262    # Default to server for other variants.
51263      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51264        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51265      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51266        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51267      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51268        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51269    else
51270        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51271    fi
51272    elif test "xBUILD" = "xBUILD"; then
51273      # When building a buildjdk, it's always only the server variant
51274      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51275          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51276    fi
51277
51278    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51279    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51280      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51281    fi
51282
51283  fi
51284
51285OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51286
51287  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51288  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51289    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51290  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51291    # FIXME: This hard-coded path is not really proper.
51292    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51293      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51294    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51295      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51296    fi
51297    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51298        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51299  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51300    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51301  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51302    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51303  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51304    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51305  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51306    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51307        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51308        wsock32.lib winmm.lib version.lib psapi.lib"
51309    fi
51310
51311  # Set OPENJDK_BUILD_JVM_ASFLAGS
51312  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51313    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51314      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51315    fi
51316  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51317    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51318  fi
51319
51320  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336  # Tests are only ever compiled for TARGET
51337  # Flags for compiling test libraries
51338  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51339  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51340
51341  # Flags for compiling test executables
51342  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51343  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51344
51345
51346
51347
51348
51349
51350  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51351  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51352
51353
51354
51355
51356
51357
51358  # Some Zero and Shark settings.
51359  # ZERO_ARCHFLAG tells the compiler which mode to build for
51360  case "${OPENJDK_TARGET_CPU}" in
51361    s390)
51362      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51363      ;;
51364    *)
51365      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51366  esac
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408
51409    # Execute function body
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
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    # Execute function body
51459
51460  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51461$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51462  supports=yes
51463
51464  saved_cflags="$CFLAGS"
51465  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51466  ac_ext=c
51467ac_cpp='$CPP $CPPFLAGS'
51468ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51469ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51470ac_compiler_gnu=$ac_cv_c_compiler_gnu
51471
51472  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51473/* end confdefs.h.  */
51474int i;
51475_ACEOF
51476if ac_fn_c_try_compile "$LINENO"; then :
51477
51478else
51479  supports=no
51480fi
51481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51482  ac_ext=cpp
51483ac_cpp='$CXXCPP $CPPFLAGS'
51484ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51485ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51486ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51487
51488  CFLAGS="$saved_cflags"
51489
51490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51491$as_echo "$supports" >&6; }
51492  if test "x$supports" = "xyes" ; then
51493    :
51494    C_COMP_SUPPORTS="yes"
51495  else
51496    :
51497    C_COMP_SUPPORTS="no"
51498  fi
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558    # Execute function body
51559
51560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51561$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51562  supports=yes
51563
51564  saved_cxxflags="$CXXFLAGS"
51565  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51566  ac_ext=cpp
51567ac_cpp='$CXXCPP $CPPFLAGS'
51568ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51569ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51570ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51571
51572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51573/* end confdefs.h.  */
51574int i;
51575_ACEOF
51576if ac_fn_cxx_try_compile "$LINENO"; then :
51577
51578else
51579  supports=no
51580fi
51581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51582  ac_ext=cpp
51583ac_cpp='$CXXCPP $CPPFLAGS'
51584ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51585ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51586ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51587
51588  CXXFLAGS="$saved_cxxflags"
51589
51590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51591$as_echo "$supports" >&6; }
51592  if test "x$supports" = "xyes" ; then
51593    :
51594    CXX_COMP_SUPPORTS="yes"
51595  else
51596    :
51597    CXX_COMP_SUPPORTS="no"
51598  fi
51599
51600
51601
51602
51603
51604
51605
51606
51607
51608
51609
51610
51611
51612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51613$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51614  supports=no
51615  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51616
51617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51618$as_echo "$supports" >&6; }
51619  if test "x$supports" = "xyes" ; then
51620    :
51621
51622  else
51623    :
51624    ZERO_ARCHFLAG=""
51625  fi
51626
51627
51628
51629
51630
51631
51632
51633
51634  # Check that the compiler supports -mX (or -qX on AIX) flags
51635  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683    # Execute function body
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732    # Execute function body
51733
51734  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51735$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51736  supports=yes
51737
51738  saved_cflags="$CFLAGS"
51739  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51740  ac_ext=c
51741ac_cpp='$CPP $CPPFLAGS'
51742ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51743ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51744ac_compiler_gnu=$ac_cv_c_compiler_gnu
51745
51746  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51747/* end confdefs.h.  */
51748int i;
51749_ACEOF
51750if ac_fn_c_try_compile "$LINENO"; then :
51751
51752else
51753  supports=no
51754fi
51755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51756  ac_ext=cpp
51757ac_cpp='$CXXCPP $CPPFLAGS'
51758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51761
51762  CFLAGS="$saved_cflags"
51763
51764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51765$as_echo "$supports" >&6; }
51766  if test "x$supports" = "xyes" ; then
51767    :
51768    C_COMP_SUPPORTS="yes"
51769  else
51770    :
51771    C_COMP_SUPPORTS="no"
51772  fi
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832    # Execute function body
51833
51834  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51835$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51836  supports=yes
51837
51838  saved_cxxflags="$CXXFLAGS"
51839  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51840  ac_ext=cpp
51841ac_cpp='$CXXCPP $CPPFLAGS'
51842ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51843ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51844ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51845
51846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51847/* end confdefs.h.  */
51848int i;
51849_ACEOF
51850if ac_fn_cxx_try_compile "$LINENO"; then :
51851
51852else
51853  supports=no
51854fi
51855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51856  ac_ext=cpp
51857ac_cpp='$CXXCPP $CPPFLAGS'
51858ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51859ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51860ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51861
51862  CXXFLAGS="$saved_cxxflags"
51863
51864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51865$as_echo "$supports" >&6; }
51866  if test "x$supports" = "xyes" ; then
51867    :
51868    CXX_COMP_SUPPORTS="yes"
51869  else
51870    :
51871    CXX_COMP_SUPPORTS="no"
51872  fi
51873
51874
51875
51876
51877
51878
51879
51880
51881
51882
51883
51884
51885
51886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51887$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51888  supports=no
51889  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51890
51891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51892$as_echo "$supports" >&6; }
51893  if test "x$supports" = "xyes" ; then
51894    :
51895    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51896  else
51897    :
51898    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51899  fi
51900
51901
51902
51903
51904
51905
51906
51907
51908  # Check whether --enable-warnings-as-errors was given.
51909if test "${enable_warnings_as_errors+set}" = set; then :
51910  enableval=$enable_warnings_as_errors;
51911fi
51912
51913
51914  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51915$as_echo_n "checking if native warnings are errors... " >&6; }
51916  if test "x$enable_warnings_as_errors" = "xyes"; then
51917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51918$as_echo "yes (explicitely set)" >&6; }
51919    WARNINGS_AS_ERRORS=true
51920  elif test "x$enable_warnings_as_errors" = "xno"; then
51921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51922$as_echo "no" >&6; }
51923    WARNINGS_AS_ERRORS=false
51924  elif test "x$enable_warnings_as_errors" = "x"; then
51925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51926$as_echo "yes (default)" >&6; }
51927    WARNINGS_AS_ERRORS=true
51928  else
51929    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51930  fi
51931
51932  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51933    # Set legacy hotspot variable
51934    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51935  else
51936    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51937  fi
51938
51939
51940
51941
51942  case "${TOOLCHAIN_TYPE}" in
51943    microsoft)
51944      DISABLE_WARNING_PREFIX="-wd"
51945      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51946      ;;
51947    solstudio)
51948      DISABLE_WARNING_PREFIX="-erroff="
51949      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51950      ;;
51951    gcc)
51952      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
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
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000    # Execute function body
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
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    # Execute function body
52050
52051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52052$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52053  supports=yes
52054
52055  saved_cflags="$CFLAGS"
52056  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52057  ac_ext=c
52058ac_cpp='$CPP $CPPFLAGS'
52059ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52060ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52061ac_compiler_gnu=$ac_cv_c_compiler_gnu
52062
52063  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52064/* end confdefs.h.  */
52065int i;
52066_ACEOF
52067if ac_fn_c_try_compile "$LINENO"; then :
52068
52069else
52070  supports=no
52071fi
52072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52073  ac_ext=cpp
52074ac_cpp='$CXXCPP $CPPFLAGS'
52075ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52076ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52077ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52078
52079  CFLAGS="$saved_cflags"
52080
52081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52082$as_echo "$supports" >&6; }
52083  if test "x$supports" = "xyes" ; then
52084    :
52085    C_COMP_SUPPORTS="yes"
52086  else
52087    :
52088    C_COMP_SUPPORTS="no"
52089  fi
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149    # Execute function body
52150
52151  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52152$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52153  supports=yes
52154
52155  saved_cxxflags="$CXXFLAGS"
52156  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52157  ac_ext=cpp
52158ac_cpp='$CXXCPP $CPPFLAGS'
52159ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52160ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52161ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52162
52163  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52164/* end confdefs.h.  */
52165int i;
52166_ACEOF
52167if ac_fn_cxx_try_compile "$LINENO"; then :
52168
52169else
52170  supports=no
52171fi
52172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52173  ac_ext=cpp
52174ac_cpp='$CXXCPP $CPPFLAGS'
52175ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52176ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52177ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52178
52179  CXXFLAGS="$saved_cxxflags"
52180
52181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52182$as_echo "$supports" >&6; }
52183  if test "x$supports" = "xyes" ; then
52184    :
52185    CXX_COMP_SUPPORTS="yes"
52186  else
52187    :
52188    CXX_COMP_SUPPORTS="no"
52189  fi
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52204$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52205  supports=no
52206  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52207
52208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52209$as_echo "$supports" >&6; }
52210  if test "x$supports" = "xyes" ; then
52211    :
52212    GCC_CAN_DISABLE_WARNINGS=true
52213  else
52214    :
52215    GCC_CAN_DISABLE_WARNINGS=false
52216
52217  fi
52218
52219
52220
52221
52222
52223
52224      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52225        DISABLE_WARNING_PREFIX="-Wno-"
52226      else
52227        DISABLE_WARNING_PREFIX=
52228      fi
52229      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52230      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52231      # CFLAGS since any target specific flags will likely not work with the
52232      # build compiler
52233      CC_OLD="$CC"
52234      CXX_OLD="$CXX"
52235      CC="$BUILD_CC"
52236      CXX="$BUILD_CXX"
52237      CFLAGS_OLD="$CFLAGS"
52238      CFLAGS=""
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286    # Execute function body
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335    # Execute function body
52336
52337  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52338$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52339  supports=yes
52340
52341  saved_cflags="$CFLAGS"
52342  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52343  ac_ext=c
52344ac_cpp='$CPP $CPPFLAGS'
52345ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52346ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52347ac_compiler_gnu=$ac_cv_c_compiler_gnu
52348
52349  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52350/* end confdefs.h.  */
52351int i;
52352_ACEOF
52353if ac_fn_c_try_compile "$LINENO"; then :
52354
52355else
52356  supports=no
52357fi
52358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52359  ac_ext=cpp
52360ac_cpp='$CXXCPP $CPPFLAGS'
52361ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52362ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52363ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52364
52365  CFLAGS="$saved_cflags"
52366
52367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52368$as_echo "$supports" >&6; }
52369  if test "x$supports" = "xyes" ; then
52370    :
52371    C_COMP_SUPPORTS="yes"
52372  else
52373    :
52374    C_COMP_SUPPORTS="no"
52375  fi
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433
52434
52435    # Execute function body
52436
52437  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52438$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52439  supports=yes
52440
52441  saved_cxxflags="$CXXFLAGS"
52442  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52443  ac_ext=cpp
52444ac_cpp='$CXXCPP $CPPFLAGS'
52445ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52446ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52447ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52448
52449  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52450/* end confdefs.h.  */
52451int i;
52452_ACEOF
52453if ac_fn_cxx_try_compile "$LINENO"; then :
52454
52455else
52456  supports=no
52457fi
52458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52459  ac_ext=cpp
52460ac_cpp='$CXXCPP $CPPFLAGS'
52461ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52462ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52463ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52464
52465  CXXFLAGS="$saved_cxxflags"
52466
52467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52468$as_echo "$supports" >&6; }
52469  if test "x$supports" = "xyes" ; then
52470    :
52471    CXX_COMP_SUPPORTS="yes"
52472  else
52473    :
52474    CXX_COMP_SUPPORTS="no"
52475  fi
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52490$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52491  supports=no
52492  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52493
52494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52495$as_echo "$supports" >&6; }
52496  if test "x$supports" = "xyes" ; then
52497    :
52498    BUILD_CC_CAN_DISABLE_WARNINGS=true
52499  else
52500    :
52501    BUILD_CC_CAN_DISABLE_WARNINGS=false
52502
52503  fi
52504
52505
52506
52507
52508
52509
52510      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52511        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52512      else
52513        BUILD_CC_DISABLE_WARNING_PREFIX=
52514      fi
52515      CC="$CC_OLD"
52516      CXX="$CXX_OLD"
52517      CFLAGS="$CFLAGS_OLD"
52518      ;;
52519    clang)
52520      DISABLE_WARNING_PREFIX="-Wno-"
52521      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52522      ;;
52523    xlc)
52524      DISABLE_WARNING_PREFIX="-qsuppress="
52525      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52526      ;;
52527  esac
52528
52529
52530
52531
52532
52533# Setup debug symbols (need objcopy from the toolchain for that)
52534
52535  #
52536  # NATIVE_DEBUG_SYMBOLS
52537  # This must be done after the toolchain is setup, since we're looking at objcopy.
52538  #
52539  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52540$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52541
52542# Check whether --with-native-debug-symbols was given.
52543if test "${with_native_debug_symbols+set}" = set; then :
52544  withval=$with_native_debug_symbols;
52545        if test "x$OPENJDK_TARGET_OS" = xaix; then
52546          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52547            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52548          fi
52549        fi
52550
52551else
52552
52553        if test "x$OPENJDK_TARGET_OS" = xaix; then
52554          # AIX doesn't support 'zipped' so use 'internal' as default
52555          with_native_debug_symbols="internal"
52556        else
52557          if test "x$STATIC_BUILD" = xtrue; then
52558            with_native_debug_symbols="none"
52559          else
52560            with_native_debug_symbols="zipped"
52561          fi
52562        fi
52563
52564fi
52565
52566  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52568$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52569
52570  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52571
52572    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52573      if test "x$OBJCOPY" = x; then
52574        # enabling of enable-debug-symbols and can't find objcopy
52575        # this is an error
52576        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52577      fi
52578    fi
52579
52580    COMPILE_WITH_DEBUG_SYMBOLS=true
52581    COPY_DEBUG_SYMBOLS=true
52582    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52583
52584    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52585    DEBUG_BINARIES=false
52586    STRIP_POLICY=min_strip
52587
52588  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52589    COMPILE_WITH_DEBUG_SYMBOLS=false
52590    COPY_DEBUG_SYMBOLS=false
52591    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52592
52593    DEBUG_BINARIES=false
52594    STRIP_POLICY=no_strip
52595  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52596    COMPILE_WITH_DEBUG_SYMBOLS=true
52597    COPY_DEBUG_SYMBOLS=false
52598    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52599
52600    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52601    DEBUG_BINARIES=true
52602    STRIP_POLICY=no_strip
52603    STRIP=""
52604
52605  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52606
52607    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52608      if test "x$OBJCOPY" = x; then
52609        # enabling of enable-debug-symbols and can't find objcopy
52610        # this is an error
52611        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52612      fi
52613    fi
52614
52615    COMPILE_WITH_DEBUG_SYMBOLS=true
52616    COPY_DEBUG_SYMBOLS=true
52617    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52618
52619    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52620    DEBUG_BINARIES=false
52621    STRIP_POLICY=min_strip
52622  else
52623    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52624  fi
52625
52626  # --enable-debug-symbols is deprecated.
52627  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52628
52629  # Check whether --enable-debug-symbols was given.
52630if test "${enable_debug_symbols+set}" = set; then :
52631  enableval=$enable_debug_symbols;
52632fi
52633
52634  if test "x$enable_debug_symbols" != x; then
52635    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52636$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52637
52638    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52639      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52640$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52641    fi
52642
52643  fi
52644
52645
52646  # --enable-zip-debug-info is deprecated.
52647  # Please use --with-native-debug-symbols=zipped .
52648
52649  # Check whether --enable-zip-debug-info was given.
52650if test "${enable_zip_debug_info+set}" = set; then :
52651  enableval=$enable_zip_debug_info;
52652fi
52653
52654  if test "x$enable_zip_debug_info" != x; then
52655    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52656$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52657
52658    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52659      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52660$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52661    fi
52662
52663  fi
52664
52665
52666
52667
52668
52669
52670  # Legacy values
52671
52672
52673
52674
52675  # Check whether --enable-native-coverage was given.
52676if test "${enable_native_coverage+set}" = set; then :
52677  enableval=$enable_native_coverage;
52678fi
52679
52680  GCOV_ENABLED="false"
52681  if test "x$enable_native_coverage" = "xyes"; then
52682    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52683      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52684$as_echo_n "checking if native coverage is enabled... " >&6; }
52685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52686$as_echo "yes" >&6; }
52687      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52688      GCOV_LDFLAGS="-fprofile-arcs"
52689      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52690      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52691      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52692      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52693      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52694      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52695      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52696      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52697      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52698      GCOV_ENABLED="true"
52699    else
52700      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52701    fi
52702  elif test "x$enable_native_coverage" = "xno"; then
52703    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52704$as_echo_n "checking if native coverage is enabled... " >&6; }
52705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52706$as_echo "no" >&6; }
52707  elif test "x$enable_native_coverage" != "x"; then
52708    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52709  fi
52710
52711
52712
52713
52714# Need toolchain to setup dtrace
52715
52716  # Test for dtrace dependencies
52717  # Check whether --enable-dtrace was given.
52718if test "${enable_dtrace+set}" = set; then :
52719  enableval=$enable_dtrace;
52720fi
52721
52722
52723  DTRACE_DEP_MISSING=false
52724
52725  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52726$as_echo_n "checking for dtrace tool... " >&6; }
52727  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52729$as_echo "$DTRACE" >&6; }
52730  else
52731    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52732$as_echo "not found, cannot build dtrace" >&6; }
52733    DTRACE_DEP_MISSING=true
52734  fi
52735
52736  for ac_header in sys/sdt.h
52737do :
52738  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52739if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52740  cat >>confdefs.h <<_ACEOF
52741#define HAVE_SYS_SDT_H 1
52742_ACEOF
52743 DTRACE_HEADERS_OK=yes
52744else
52745  DTRACE_HEADERS_OK=no
52746fi
52747
52748done
52749
52750  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52751    DTRACE_DEP_MISSING=true
52752  fi
52753
52754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52755$as_echo_n "checking if dtrace should be built... " >&6; }
52756  if test "x$enable_dtrace" = "xyes"; then
52757    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52759$as_echo "no, missing dependencies" >&6; }
52760
52761  # Print a helpful message on how to acquire the necessary build dependency.
52762  # dtrace is the help tag: freetype, cups, alsa etc
52763  MISSING_DEPENDENCY=dtrace
52764
52765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52766    cygwin_help $MISSING_DEPENDENCY
52767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52768    msys_help $MISSING_DEPENDENCY
52769  else
52770    PKGHANDLER_COMMAND=
52771
52772    case $PKGHANDLER in
52773      apt-get)
52774        apt_help     $MISSING_DEPENDENCY ;;
52775      yum)
52776        yum_help     $MISSING_DEPENDENCY ;;
52777      port)
52778        port_help    $MISSING_DEPENDENCY ;;
52779      pkgutil)
52780        pkgutil_help $MISSING_DEPENDENCY ;;
52781      pkgadd)
52782        pkgadd_help  $MISSING_DEPENDENCY ;;
52783    esac
52784
52785    if test "x$PKGHANDLER_COMMAND" != x; then
52786      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52787    fi
52788  fi
52789
52790      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52791    else
52792      INCLUDE_DTRACE=true
52793      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52794$as_echo "yes, forced" >&6; }
52795    fi
52796  elif test "x$enable_dtrace" = "xno"; then
52797    INCLUDE_DTRACE=false
52798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52799$as_echo "no, forced" >&6; }
52800  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52801    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52802      INCLUDE_DTRACE=false
52803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52804$as_echo "no, missing dependencies" >&6; }
52805    else
52806      INCLUDE_DTRACE=true
52807      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52808$as_echo "yes, dependencies present" >&6; }
52809    fi
52810  else
52811    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52812  fi
52813
52814
52815
52816  # The user can in some cases supply additional jvm features. For the custom
52817  # variant, this defines the entire variant.
52818
52819# Check whether --with-jvm-features was given.
52820if test "${with_jvm_features+set}" = set; then :
52821  withval=$with_jvm_features;
52822fi
52823
52824  if test "x$with_jvm_features" != x; then
52825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52826$as_echo_n "checking additional JVM features... " >&6; }
52827    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52828    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52829$as_echo "$JVM_FEATURES" >&6; }
52830  fi
52831
52832  # Verify that dependencies are met for explicitly set features.
52833  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52834    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52835  fi
52836
52837  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52838    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52839  fi
52840
52841  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52842    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52843  fi
52844
52845  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52846    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52847  fi
52848
52849  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52850    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52851  fi
52852
52853  # Turn on additional features based on other parts of configure
52854  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52855    JVM_FEATURES="$JVM_FEATURES dtrace"
52856  else
52857    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52858      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52859    fi
52860  fi
52861
52862  if test "x$STATIC_BUILD" = "xtrue"; then
52863    JVM_FEATURES="$JVM_FEATURES static-build"
52864  else
52865    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52866      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52867    fi
52868  fi
52869
52870  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52871    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52872      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52873    fi
52874  fi
52875
52876  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52877    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52878      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52879    fi
52880  fi
52881
52882  # Only enable jvmci on x86_64, sparcv9 and aarch64.
52883  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52884      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52885      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52886    JVM_FEATURES_jvmci="jvmci"
52887  else
52888    JVM_FEATURES_jvmci=""
52889  fi
52890
52891  # All variants but minimal (and custom) get these features
52892  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52893
52894  # Enable features depending on variant.
52895  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52896  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52897  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52898  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52899  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52900  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52901  JVM_FEATURES_custom="$JVM_FEATURES"
52902
52903
52904
52905
52906
52907
52908
52909
52910
52911  # Used for verification of Makefiles by check-jvm-feature
52912
52913
52914  # We don't support --with-jvm-interpreter anymore, use zero instead.
52915
52916
52917# Check whether --with-jvm-interpreter was given.
52918if test "${with_jvm_interpreter+set}" = set; then :
52919  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52920$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52921fi
52922
52923
52924
52925
52926  # Check whether --enable-hotspot-gtest was given.
52927if test "${enable_hotspot_gtest+set}" = set; then :
52928  enableval=$enable_hotspot_gtest;
52929fi
52930
52931
52932  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52933    GTEST_DIR_EXISTS="true"
52934  else
52935    GTEST_DIR_EXISTS="false"
52936  fi
52937
52938  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52939$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52940  if test "x$enable_hotspot_gtest" = "xyes"; then
52941    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52942      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52943$as_echo "yes, forced" >&6; }
52944      BUILD_GTEST="true"
52945    else
52946      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52947    fi
52948  elif test "x$enable_hotspot_gtest" = "xno"; then
52949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52950$as_echo "no, forced" >&6; }
52951    BUILD_GTEST="false"
52952  elif test "x$enable_hotspot_gtest" = "x"; then
52953    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52954      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52955$as_echo "yes" >&6; }
52956      BUILD_GTEST="true"
52957    else
52958      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52959$as_echo "no" >&6; }
52960      BUILD_GTEST="false"
52961    fi
52962  else
52963    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52964  fi
52965
52966
52967
52968
52969###############################################################################
52970#
52971# Check dependencies for external and internal libraries.
52972#
52973###############################################################################
52974
52975# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52976
52977  # When using cygwin or msys, we need a wrapper binary that renames
52978  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52979  # @files and rewrites these too! This wrapper binary is
52980  # called fixpath.
52981  FIXPATH=
52982  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52983    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52984$as_echo_n "checking if fixpath can be created... " >&6; }
52985    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52986    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52987    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52988    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52989      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52990      FIXPATH="$FIXPATH_BIN -c"
52991    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52992      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52993      # @ was chosen as separator to minimize risk of other tools messing around with it
52994      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52995          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52996      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52997      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52998    fi
52999    FIXPATH_SRC_W="$FIXPATH_SRC"
53000    FIXPATH_BIN_W="$FIXPATH_BIN"
53001
53002  unix_path="$FIXPATH_SRC_W"
53003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53004    windows_path=`$CYGPATH -m "$unix_path"`
53005    FIXPATH_SRC_W="$windows_path"
53006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53007    windows_path=`cmd //c echo $unix_path`
53008    FIXPATH_SRC_W="$windows_path"
53009  fi
53010
53011
53012  unix_path="$FIXPATH_BIN_W"
53013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53014    windows_path=`$CYGPATH -m "$unix_path"`
53015    FIXPATH_BIN_W="$windows_path"
53016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53017    windows_path=`cmd //c echo $unix_path`
53018    FIXPATH_BIN_W="$windows_path"
53019  fi
53020
53021    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53022    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53023    cd $FIXPATH_DIR
53024    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53025    cd $CURDIR
53026
53027    if test ! -x $FIXPATH_BIN; then
53028      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53029$as_echo "no" >&6; }
53030      cat $FIXPATH_DIR/fixpath1.log
53031      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53032    fi
53033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53034$as_echo "yes" >&6; }
53035    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53036$as_echo_n "checking if fixpath.exe works... " >&6; }
53037    cd $FIXPATH_DIR
53038    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53039        > $FIXPATH_DIR/fixpath2.log 2>&1
53040    cd $CURDIR
53041    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53042      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53043$as_echo "no" >&6; }
53044      cat $FIXPATH_DIR/fixpath2.log
53045      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53046    fi
53047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53048$as_echo "yes" >&6; }
53049
53050    FIXPATH_DETACH_FLAG="--detach"
53051  fi
53052
53053
53054
53055
53056
53057
53058  # Check if X11 is needed
53059  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53060    # No X11 support on windows or macosx
53061    NEEDS_LIB_X11=false
53062  else
53063    if test "x$SUPPORT_HEADFUL" = xno; then
53064      # No X11 support if building headless-only
53065      NEEDS_LIB_X11=false
53066    else
53067      # All other instances need X11
53068      NEEDS_LIB_X11=true
53069    fi
53070  fi
53071
53072  # Check if cups is needed
53073  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53074    # Windows have a separate print system
53075    NEEDS_LIB_CUPS=false
53076  else
53077    NEEDS_LIB_CUPS=true
53078  fi
53079
53080  # A custom hook may have set this already
53081  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53082    NEEDS_LIB_FREETYPE=true
53083  fi
53084
53085  # Check if alsa is needed
53086  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53087    NEEDS_LIB_ALSA=true
53088  else
53089    NEEDS_LIB_ALSA=false
53090  fi
53091
53092  # Check if ffi is needed
53093  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53094    NEEDS_LIB_FFI=true
53095  else
53096    NEEDS_LIB_FFI=false
53097  fi
53098
53099
53100  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53101  # dynamic build is configured on command line.
53102
53103# Check whether --with-stdc++lib was given.
53104if test "${with_stdc__lib+set}" = set; then :
53105  withval=$with_stdc__lib;
53106        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53107                && test "x$with_stdc__lib" != xdefault; then
53108          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53109        fi
53110
53111else
53112  with_stdc__lib=default
53113
53114fi
53115
53116
53117  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53118    # Test if -lstdc++ works.
53119    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
53120$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
53121    ac_ext=cpp
53122ac_cpp='$CXXCPP $CPPFLAGS'
53123ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53124ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53125ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53126
53127    OLD_CXXFLAGS="$CXXFLAGS"
53128    CXXFLAGS="$CXXFLAGS -lstdc++"
53129    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53130/* end confdefs.h.  */
53131
53132int
53133main ()
53134{
53135return 0;
53136  ;
53137  return 0;
53138}
53139_ACEOF
53140if ac_fn_cxx_try_link "$LINENO"; then :
53141  has_dynamic_libstdcxx=yes
53142else
53143  has_dynamic_libstdcxx=no
53144fi
53145rm -f core conftest.err conftest.$ac_objext \
53146    conftest$ac_exeext conftest.$ac_ext
53147    CXXFLAGS="$OLD_CXXFLAGS"
53148    ac_ext=cpp
53149ac_cpp='$CXXCPP $CPPFLAGS'
53150ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53151ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53152ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53153
53154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
53155$as_echo "$has_dynamic_libstdcxx" >&6; }
53156
53157    # Test if stdc++ can be linked statically.
53158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53159$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53160    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
53161    ac_ext=cpp
53162ac_cpp='$CXXCPP $CPPFLAGS'
53163ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53164ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53165ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53166
53167    OLD_LIBS="$LIBS"
53168    OLD_CXX="$CXX"
53169    LIBS="$STATIC_STDCXX_FLAGS"
53170    CXX="$CC"
53171    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53172/* end confdefs.h.  */
53173
53174int
53175main ()
53176{
53177return 0;
53178  ;
53179  return 0;
53180}
53181_ACEOF
53182if ac_fn_cxx_try_link "$LINENO"; then :
53183  has_static_libstdcxx=yes
53184else
53185  has_static_libstdcxx=no
53186fi
53187rm -f core conftest.err conftest.$ac_objext \
53188    conftest$ac_exeext conftest.$ac_ext
53189    LIBS="$OLD_LIBS"
53190    CXX="$OLD_CXX"
53191    ac_ext=cpp
53192ac_cpp='$CXXCPP $CPPFLAGS'
53193ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53194ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53195ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53196
53197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53198$as_echo "$has_static_libstdcxx" >&6; }
53199
53200    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
53201      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
53202    fi
53203
53204    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53205      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53206    fi
53207
53208    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
53209      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
53210    fi
53211
53212    # If dynamic was requested, it's available since it would fail above otherwise.
53213    # If dynamic wasn't requested, go with static unless it isn't available.
53214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53215$as_echo_n "checking how to link with libstdc++... " >&6; }
53216    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53217      LIBCXX="$LIBCXX -lstdc++"
53218      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53219      JVM_LIBS="-lstdc++ $JVM_LIBS"
53220      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53221      # just use the same setting as for the TARGET toolchain.
53222      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
53223      LDCXX="$CXX"
53224      STATIC_CXX_SETTING="STATIC_CXX=false"
53225      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53226$as_echo "dynamic" >&6; }
53227    else
53228      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53229      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
53230      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53231      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
53232      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53233      # just use the same setting as for the TARGET toolchain.
53234      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
53235      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
53236      LDCXX="$CC"
53237      STATIC_CXX_SETTING="STATIC_CXX=true"
53238      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53239$as_echo "static" >&6; }
53240    fi
53241  fi
53242
53243
53244  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53245  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53246    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53247  fi
53248
53249  # TODO better (platform agnostic) test
53250  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
53251    LIBCXX="-lstdc++"
53252  fi
53253
53254
53255  # Setup Windows runtime dlls
53256  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53257
53258
53259# Check whether --with-msvcr-dll was given.
53260if test "${with_msvcr_dll+set}" = set; then :
53261  withval=$with_msvcr_dll;
53262fi
53263
53264
53265  if test "x$with_msvcr_dll" != x; then
53266    # If given explicitely by user, do not probe. If not present, fail directly.
53267
53268  DLL_NAME="$MSVCR_NAME"
53269  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53270  METHOD="--with-msvcr-dll"
53271  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53272    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53273$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53274
53275    # Need to check if the found msvcr is correct architecture
53276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53277$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53278    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53280      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53281      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53282      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53283        CORRECT_MSVCR_ARCH="PE32 executable"
53284      else
53285        CORRECT_MSVCR_ARCH="PE32+ executable"
53286      fi
53287    else
53288      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53289        CORRECT_MSVCR_ARCH=386
53290      else
53291        CORRECT_MSVCR_ARCH=x86-64
53292      fi
53293    fi
53294    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53295      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53296$as_echo "ok" >&6; }
53297      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53298
53299  # Only process if variable expands to non-empty
53300
53301  if test "x$MSVC_DLL" != x; then
53302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53303
53304  # Input might be given as Windows format, start by converting to
53305  # unix format.
53306  path="$MSVC_DLL"
53307  new_path=`$CYGPATH -u "$path"`
53308
53309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53312  # "foo.exe" is OK but "foo" is an error.
53313  #
53314  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53315  # It is also a way to make sure we got the proper file name for the real test later on.
53316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53317  if test "x$test_shortpath" = x; then
53318    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53319$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53320    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53321  fi
53322
53323  # Call helper function which possibly converts this using DOS-style short mode.
53324  # If so, the updated path is stored in $new_path.
53325
53326  input_path="$new_path"
53327  # Check if we need to convert this using DOS-style short mode. If the path
53328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53329  # take no chances and rewrite it.
53330  # Note: m4 eats our [], so we need to use [ and ] instead.
53331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53332  if test "x$has_forbidden_chars" != x; then
53333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53337      # Going to short mode and back again did indeed matter. Since short mode is
53338      # case insensitive, let's make it lowercase to improve readability.
53339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53340      # Now convert it back to Unix-style (cygpath)
53341      input_path=`$CYGPATH -u "$shortmode_path"`
53342      new_path="$input_path"
53343    fi
53344  fi
53345
53346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53347  if test "x$test_cygdrive_prefix" = x; then
53348    # As a simple fix, exclude /usr/bin since it's not a real path.
53349    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53351      # a path prefixed by /cygdrive for fixpath to work.
53352      new_path="$CYGWIN_ROOT_PATH$input_path"
53353    fi
53354  fi
53355
53356
53357  if test "x$path" != "x$new_path"; then
53358    MSVC_DLL="$new_path"
53359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53360$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53361  fi
53362
53363    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53364
53365  path="$MSVC_DLL"
53366  has_colon=`$ECHO $path | $GREP ^.:`
53367  new_path="$path"
53368  if test "x$has_colon" = x; then
53369    # Not in mixed or Windows style, start by that.
53370    new_path=`cmd //c echo $path`
53371  fi
53372
53373
53374  input_path="$new_path"
53375  # Check if we need to convert this using DOS-style short mode. If the path
53376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53377  # take no chances and rewrite it.
53378  # Note: m4 eats our [], so we need to use [ and ] instead.
53379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53380  if test "x$has_forbidden_chars" != x; then
53381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53383  fi
53384
53385
53386  windows_path="$new_path"
53387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53388    unix_path=`$CYGPATH -u "$windows_path"`
53389    new_path="$unix_path"
53390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53392    new_path="$unix_path"
53393  fi
53394
53395  if test "x$path" != "x$new_path"; then
53396    MSVC_DLL="$new_path"
53397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53398$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53399  fi
53400
53401  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53402  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53403
53404    else
53405      # We're on a unix platform. Hooray! :)
53406      path="$MSVC_DLL"
53407      has_space=`$ECHO "$path" | $GREP " "`
53408      if test "x$has_space" != x; then
53409        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53410$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53411        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53412      fi
53413
53414      # Use eval to expand a potential ~
53415      eval path="$path"
53416      if test ! -f "$path" && test ! -d "$path"; then
53417        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53418      fi
53419
53420      if test -d "$path"; then
53421        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53422      else
53423        dir="`$DIRNAME "$path"`"
53424        base="`$BASENAME "$path"`"
53425        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53426      fi
53427    fi
53428  fi
53429
53430      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53431$as_echo_n "checking for $DLL_NAME... " >&6; }
53432      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53433$as_echo "$MSVC_DLL" >&6; }
53434    else
53435      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53436$as_echo "incorrect, ignoring" >&6; }
53437      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53438$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53439    fi
53440  fi
53441
53442    if test "x$MSVC_DLL" = x; then
53443      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53444    fi
53445    MSVCR_DLL="$MSVC_DLL"
53446  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53447
53448  DLL_NAME="$MSVCR_NAME"
53449  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53450  METHOD="devkit"
53451  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53452    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53453$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53454
53455    # Need to check if the found msvcr is correct architecture
53456    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53457$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53458    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53459    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53460      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53461      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53462      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53463        CORRECT_MSVCR_ARCH="PE32 executable"
53464      else
53465        CORRECT_MSVCR_ARCH="PE32+ executable"
53466      fi
53467    else
53468      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53469        CORRECT_MSVCR_ARCH=386
53470      else
53471        CORRECT_MSVCR_ARCH=x86-64
53472      fi
53473    fi
53474    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53475      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53476$as_echo "ok" >&6; }
53477      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53478
53479  # Only process if variable expands to non-empty
53480
53481  if test "x$MSVC_DLL" != x; then
53482    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53483
53484  # Input might be given as Windows format, start by converting to
53485  # unix format.
53486  path="$MSVC_DLL"
53487  new_path=`$CYGPATH -u "$path"`
53488
53489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53492  # "foo.exe" is OK but "foo" is an error.
53493  #
53494  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53495  # It is also a way to make sure we got the proper file name for the real test later on.
53496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53497  if test "x$test_shortpath" = x; then
53498    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53499$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53500    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53501  fi
53502
53503  # Call helper function which possibly converts this using DOS-style short mode.
53504  # If so, the updated path is stored in $new_path.
53505
53506  input_path="$new_path"
53507  # Check if we need to convert this using DOS-style short mode. If the path
53508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53509  # take no chances and rewrite it.
53510  # Note: m4 eats our [], so we need to use [ and ] instead.
53511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53512  if test "x$has_forbidden_chars" != x; then
53513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53517      # Going to short mode and back again did indeed matter. Since short mode is
53518      # case insensitive, let's make it lowercase to improve readability.
53519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53520      # Now convert it back to Unix-style (cygpath)
53521      input_path=`$CYGPATH -u "$shortmode_path"`
53522      new_path="$input_path"
53523    fi
53524  fi
53525
53526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53527  if test "x$test_cygdrive_prefix" = x; then
53528    # As a simple fix, exclude /usr/bin since it's not a real path.
53529    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53531      # a path prefixed by /cygdrive for fixpath to work.
53532      new_path="$CYGWIN_ROOT_PATH$input_path"
53533    fi
53534  fi
53535
53536
53537  if test "x$path" != "x$new_path"; then
53538    MSVC_DLL="$new_path"
53539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53540$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53541  fi
53542
53543    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53544
53545  path="$MSVC_DLL"
53546  has_colon=`$ECHO $path | $GREP ^.:`
53547  new_path="$path"
53548  if test "x$has_colon" = x; then
53549    # Not in mixed or Windows style, start by that.
53550    new_path=`cmd //c echo $path`
53551  fi
53552
53553
53554  input_path="$new_path"
53555  # Check if we need to convert this using DOS-style short mode. If the path
53556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53557  # take no chances and rewrite it.
53558  # Note: m4 eats our [], so we need to use [ and ] instead.
53559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53560  if test "x$has_forbidden_chars" != x; then
53561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53563  fi
53564
53565
53566  windows_path="$new_path"
53567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53568    unix_path=`$CYGPATH -u "$windows_path"`
53569    new_path="$unix_path"
53570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53572    new_path="$unix_path"
53573  fi
53574
53575  if test "x$path" != "x$new_path"; then
53576    MSVC_DLL="$new_path"
53577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53578$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53579  fi
53580
53581  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53582  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53583
53584    else
53585      # We're on a unix platform. Hooray! :)
53586      path="$MSVC_DLL"
53587      has_space=`$ECHO "$path" | $GREP " "`
53588      if test "x$has_space" != x; then
53589        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53590$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53591        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53592      fi
53593
53594      # Use eval to expand a potential ~
53595      eval path="$path"
53596      if test ! -f "$path" && test ! -d "$path"; then
53597        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53598      fi
53599
53600      if test -d "$path"; then
53601        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53602      else
53603        dir="`$DIRNAME "$path"`"
53604        base="`$BASENAME "$path"`"
53605        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53606      fi
53607    fi
53608  fi
53609
53610      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53611$as_echo_n "checking for $DLL_NAME... " >&6; }
53612      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53613$as_echo "$MSVC_DLL" >&6; }
53614    else
53615      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53616$as_echo "incorrect, ignoring" >&6; }
53617      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53618$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53619    fi
53620  fi
53621
53622    if test "x$MSVC_DLL" = x; then
53623      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53624    fi
53625    MSVCR_DLL="$MSVC_DLL"
53626  else
53627
53628  DLL_NAME="${MSVCR_NAME}"
53629  MSVC_DLL=
53630
53631  if test "x$MSVC_DLL" = x; then
53632    # Probe: Using well-known location from Visual Studio 10.0
53633    if test "x$VCINSTALLDIR" != x; then
53634      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53635
53636  windows_path="$CYGWIN_VC_INSTALL_DIR"
53637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53638    unix_path=`$CYGPATH -u "$windows_path"`
53639    CYGWIN_VC_INSTALL_DIR="$unix_path"
53640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53642    CYGWIN_VC_INSTALL_DIR="$unix_path"
53643  fi
53644
53645      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53646        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53647      else
53648        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53649      fi
53650      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53651
53652  DLL_NAME="$DLL_NAME"
53653  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53654  METHOD="well-known location in VCINSTALLDIR"
53655  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53656    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53657$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53658
53659    # Need to check if the found msvcr is correct architecture
53660    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53661$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53662    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53663    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53664      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53665      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53666      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53667        CORRECT_MSVCR_ARCH="PE32 executable"
53668      else
53669        CORRECT_MSVCR_ARCH="PE32+ executable"
53670      fi
53671    else
53672      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53673        CORRECT_MSVCR_ARCH=386
53674      else
53675        CORRECT_MSVCR_ARCH=x86-64
53676      fi
53677    fi
53678    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53679      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53680$as_echo "ok" >&6; }
53681      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53682
53683  # Only process if variable expands to non-empty
53684
53685  if test "x$MSVC_DLL" != x; then
53686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53687
53688  # Input might be given as Windows format, start by converting to
53689  # unix format.
53690  path="$MSVC_DLL"
53691  new_path=`$CYGPATH -u "$path"`
53692
53693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53696  # "foo.exe" is OK but "foo" is an error.
53697  #
53698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53699  # It is also a way to make sure we got the proper file name for the real test later on.
53700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53701  if test "x$test_shortpath" = x; then
53702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53703$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53704    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53705  fi
53706
53707  # Call helper function which possibly converts this using DOS-style short mode.
53708  # If so, the updated path is stored in $new_path.
53709
53710  input_path="$new_path"
53711  # Check if we need to convert this using DOS-style short mode. If the path
53712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53713  # take no chances and rewrite it.
53714  # Note: m4 eats our [], so we need to use [ and ] instead.
53715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53716  if test "x$has_forbidden_chars" != x; then
53717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53721      # Going to short mode and back again did indeed matter. Since short mode is
53722      # case insensitive, let's make it lowercase to improve readability.
53723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53724      # Now convert it back to Unix-style (cygpath)
53725      input_path=`$CYGPATH -u "$shortmode_path"`
53726      new_path="$input_path"
53727    fi
53728  fi
53729
53730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53731  if test "x$test_cygdrive_prefix" = x; then
53732    # As a simple fix, exclude /usr/bin since it's not a real path.
53733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53735      # a path prefixed by /cygdrive for fixpath to work.
53736      new_path="$CYGWIN_ROOT_PATH$input_path"
53737    fi
53738  fi
53739
53740
53741  if test "x$path" != "x$new_path"; then
53742    MSVC_DLL="$new_path"
53743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53744$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53745  fi
53746
53747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53748
53749  path="$MSVC_DLL"
53750  has_colon=`$ECHO $path | $GREP ^.:`
53751  new_path="$path"
53752  if test "x$has_colon" = x; then
53753    # Not in mixed or Windows style, start by that.
53754    new_path=`cmd //c echo $path`
53755  fi
53756
53757
53758  input_path="$new_path"
53759  # Check if we need to convert this using DOS-style short mode. If the path
53760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53761  # take no chances and rewrite it.
53762  # Note: m4 eats our [], so we need to use [ and ] instead.
53763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53764  if test "x$has_forbidden_chars" != x; then
53765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53767  fi
53768
53769
53770  windows_path="$new_path"
53771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53772    unix_path=`$CYGPATH -u "$windows_path"`
53773    new_path="$unix_path"
53774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53776    new_path="$unix_path"
53777  fi
53778
53779  if test "x$path" != "x$new_path"; then
53780    MSVC_DLL="$new_path"
53781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53782$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53783  fi
53784
53785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53787
53788    else
53789      # We're on a unix platform. Hooray! :)
53790      path="$MSVC_DLL"
53791      has_space=`$ECHO "$path" | $GREP " "`
53792      if test "x$has_space" != x; then
53793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53794$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53795        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53796      fi
53797
53798      # Use eval to expand a potential ~
53799      eval path="$path"
53800      if test ! -f "$path" && test ! -d "$path"; then
53801        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53802      fi
53803
53804      if test -d "$path"; then
53805        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53806      else
53807        dir="`$DIRNAME "$path"`"
53808        base="`$BASENAME "$path"`"
53809        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53810      fi
53811    fi
53812  fi
53813
53814      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53815$as_echo_n "checking for $DLL_NAME... " >&6; }
53816      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53817$as_echo "$MSVC_DLL" >&6; }
53818    else
53819      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53820$as_echo "incorrect, ignoring" >&6; }
53821      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53822$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53823    fi
53824  fi
53825
53826    fi
53827  fi
53828
53829  if test "x$MSVC_DLL" = x; then
53830    # Probe: Check in the Boot JDK directory.
53831    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53832
53833  DLL_NAME="$DLL_NAME"
53834  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53835  METHOD="well-known location in Boot JDK"
53836  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53837    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53838$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53839
53840    # Need to check if the found msvcr is correct architecture
53841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53842$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53843    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53844    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53845      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53846      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53847      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53848        CORRECT_MSVCR_ARCH="PE32 executable"
53849      else
53850        CORRECT_MSVCR_ARCH="PE32+ executable"
53851      fi
53852    else
53853      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53854        CORRECT_MSVCR_ARCH=386
53855      else
53856        CORRECT_MSVCR_ARCH=x86-64
53857      fi
53858    fi
53859    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53861$as_echo "ok" >&6; }
53862      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53863
53864  # Only process if variable expands to non-empty
53865
53866  if test "x$MSVC_DLL" != x; then
53867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53868
53869  # Input might be given as Windows format, start by converting to
53870  # unix format.
53871  path="$MSVC_DLL"
53872  new_path=`$CYGPATH -u "$path"`
53873
53874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53877  # "foo.exe" is OK but "foo" is an error.
53878  #
53879  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53880  # It is also a way to make sure we got the proper file name for the real test later on.
53881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53882  if test "x$test_shortpath" = x; then
53883    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53884$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53885    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53886  fi
53887
53888  # Call helper function which possibly converts this using DOS-style short mode.
53889  # If so, the updated path is stored in $new_path.
53890
53891  input_path="$new_path"
53892  # Check if we need to convert this using DOS-style short mode. If the path
53893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53894  # take no chances and rewrite it.
53895  # Note: m4 eats our [], so we need to use [ and ] instead.
53896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53897  if test "x$has_forbidden_chars" != x; then
53898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53902      # Going to short mode and back again did indeed matter. Since short mode is
53903      # case insensitive, let's make it lowercase to improve readability.
53904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53905      # Now convert it back to Unix-style (cygpath)
53906      input_path=`$CYGPATH -u "$shortmode_path"`
53907      new_path="$input_path"
53908    fi
53909  fi
53910
53911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53912  if test "x$test_cygdrive_prefix" = x; then
53913    # As a simple fix, exclude /usr/bin since it's not a real path.
53914    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53916      # a path prefixed by /cygdrive for fixpath to work.
53917      new_path="$CYGWIN_ROOT_PATH$input_path"
53918    fi
53919  fi
53920
53921
53922  if test "x$path" != "x$new_path"; then
53923    MSVC_DLL="$new_path"
53924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53925$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53926  fi
53927
53928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53929
53930  path="$MSVC_DLL"
53931  has_colon=`$ECHO $path | $GREP ^.:`
53932  new_path="$path"
53933  if test "x$has_colon" = x; then
53934    # Not in mixed or Windows style, start by that.
53935    new_path=`cmd //c echo $path`
53936  fi
53937
53938
53939  input_path="$new_path"
53940  # Check if we need to convert this using DOS-style short mode. If the path
53941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53942  # take no chances and rewrite it.
53943  # Note: m4 eats our [], so we need to use [ and ] instead.
53944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53945  if test "x$has_forbidden_chars" != x; then
53946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53948  fi
53949
53950
53951  windows_path="$new_path"
53952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53953    unix_path=`$CYGPATH -u "$windows_path"`
53954    new_path="$unix_path"
53955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53957    new_path="$unix_path"
53958  fi
53959
53960  if test "x$path" != "x$new_path"; then
53961    MSVC_DLL="$new_path"
53962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53963$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53964  fi
53965
53966  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53967  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53968
53969    else
53970      # We're on a unix platform. Hooray! :)
53971      path="$MSVC_DLL"
53972      has_space=`$ECHO "$path" | $GREP " "`
53973      if test "x$has_space" != x; then
53974        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53975$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53976        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53977      fi
53978
53979      # Use eval to expand a potential ~
53980      eval path="$path"
53981      if test ! -f "$path" && test ! -d "$path"; then
53982        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53983      fi
53984
53985      if test -d "$path"; then
53986        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53987      else
53988        dir="`$DIRNAME "$path"`"
53989        base="`$BASENAME "$path"`"
53990        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53991      fi
53992    fi
53993  fi
53994
53995      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53996$as_echo_n "checking for $DLL_NAME... " >&6; }
53997      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53998$as_echo "$MSVC_DLL" >&6; }
53999    else
54000      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54001$as_echo "incorrect, ignoring" >&6; }
54002      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54003$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54004    fi
54005  fi
54006
54007  fi
54008
54009  if test "x$MSVC_DLL" = x; then
54010    # Probe: Look in the Windows system32 directory
54011    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54012
54013  windows_path="$CYGWIN_SYSTEMROOT"
54014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54015    unix_path=`$CYGPATH -u "$windows_path"`
54016    CYGWIN_SYSTEMROOT="$unix_path"
54017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54019    CYGWIN_SYSTEMROOT="$unix_path"
54020  fi
54021
54022    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54023
54024  DLL_NAME="$DLL_NAME"
54025  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54026  METHOD="well-known location in SYSTEMROOT"
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
54200  if test "x$MSVC_DLL" = x; then
54201    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54202    if test "x$VS100COMNTOOLS" != x; then
54203      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54204
54205  windows_path="$CYGWIN_VS_TOOLS_DIR"
54206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54207    unix_path=`$CYGPATH -u "$windows_path"`
54208    CYGWIN_VS_TOOLS_DIR="$unix_path"
54209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54211    CYGWIN_VS_TOOLS_DIR="$unix_path"
54212  fi
54213
54214      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54215        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54216	    | $GREP -i /x64/ | $HEAD --lines 1`
54217      else
54218        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54219	    | $GREP -i /x86/ | $HEAD --lines 1`
54220      fi
54221
54222  DLL_NAME="$DLL_NAME"
54223  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54224  METHOD="search of VS100COMNTOOLS"
54225  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54226    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54227$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54228
54229    # Need to check if the found msvcr is correct architecture
54230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54231$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54232    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54234      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54235      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54236      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54237        CORRECT_MSVCR_ARCH="PE32 executable"
54238      else
54239        CORRECT_MSVCR_ARCH="PE32+ executable"
54240      fi
54241    else
54242      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54243        CORRECT_MSVCR_ARCH=386
54244      else
54245        CORRECT_MSVCR_ARCH=x86-64
54246      fi
54247    fi
54248    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54249      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54250$as_echo "ok" >&6; }
54251      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54252
54253  # Only process if variable expands to non-empty
54254
54255  if test "x$MSVC_DLL" != x; then
54256    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54257
54258  # Input might be given as Windows format, start by converting to
54259  # unix format.
54260  path="$MSVC_DLL"
54261  new_path=`$CYGPATH -u "$path"`
54262
54263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54266  # "foo.exe" is OK but "foo" is an error.
54267  #
54268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54269  # It is also a way to make sure we got the proper file name for the real test later on.
54270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54271  if test "x$test_shortpath" = x; then
54272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54273$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54274    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54275  fi
54276
54277  # Call helper function which possibly converts this using DOS-style short mode.
54278  # If so, the updated path is stored in $new_path.
54279
54280  input_path="$new_path"
54281  # Check if we need to convert this using DOS-style short mode. If the path
54282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54283  # take no chances and rewrite it.
54284  # Note: m4 eats our [], so we need to use [ and ] instead.
54285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54286  if test "x$has_forbidden_chars" != x; then
54287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54291      # Going to short mode and back again did indeed matter. Since short mode is
54292      # case insensitive, let's make it lowercase to improve readability.
54293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54294      # Now convert it back to Unix-style (cygpath)
54295      input_path=`$CYGPATH -u "$shortmode_path"`
54296      new_path="$input_path"
54297    fi
54298  fi
54299
54300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54301  if test "x$test_cygdrive_prefix" = x; then
54302    # As a simple fix, exclude /usr/bin since it's not a real path.
54303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54305      # a path prefixed by /cygdrive for fixpath to work.
54306      new_path="$CYGWIN_ROOT_PATH$input_path"
54307    fi
54308  fi
54309
54310
54311  if test "x$path" != "x$new_path"; then
54312    MSVC_DLL="$new_path"
54313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54314$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54315  fi
54316
54317    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54318
54319  path="$MSVC_DLL"
54320  has_colon=`$ECHO $path | $GREP ^.:`
54321  new_path="$path"
54322  if test "x$has_colon" = x; then
54323    # Not in mixed or Windows style, start by that.
54324    new_path=`cmd //c echo $path`
54325  fi
54326
54327
54328  input_path="$new_path"
54329  # Check if we need to convert this using DOS-style short mode. If the path
54330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54331  # take no chances and rewrite it.
54332  # Note: m4 eats our [], so we need to use [ and ] instead.
54333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54334  if test "x$has_forbidden_chars" != x; then
54335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54337  fi
54338
54339
54340  windows_path="$new_path"
54341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54342    unix_path=`$CYGPATH -u "$windows_path"`
54343    new_path="$unix_path"
54344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54346    new_path="$unix_path"
54347  fi
54348
54349  if test "x$path" != "x$new_path"; then
54350    MSVC_DLL="$new_path"
54351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54352$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54353  fi
54354
54355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54357
54358    else
54359      # We're on a unix platform. Hooray! :)
54360      path="$MSVC_DLL"
54361      has_space=`$ECHO "$path" | $GREP " "`
54362      if test "x$has_space" != x; then
54363        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54364$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54365        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54366      fi
54367
54368      # Use eval to expand a potential ~
54369      eval path="$path"
54370      if test ! -f "$path" && test ! -d "$path"; then
54371        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54372      fi
54373
54374      if test -d "$path"; then
54375        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54376      else
54377        dir="`$DIRNAME "$path"`"
54378        base="`$BASENAME "$path"`"
54379        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54380      fi
54381    fi
54382  fi
54383
54384      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54385$as_echo_n "checking for $DLL_NAME... " >&6; }
54386      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54387$as_echo "$MSVC_DLL" >&6; }
54388    else
54389      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54390$as_echo "incorrect, ignoring" >&6; }
54391      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54392$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54393    fi
54394  fi
54395
54396    fi
54397  fi
54398
54399  if test "x$MSVC_DLL" = x; then
54400    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54401    # (This was the original behaviour; kept since it might turn something up)
54402    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54403      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54404        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54405	    | $GREP x64 | $HEAD --lines 1`
54406      else
54407        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54408	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54409        if test "x$POSSIBLE_MSVC_DLL" = x; then
54410          # We're grasping at straws now...
54411          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54412	      | $HEAD --lines 1`
54413        fi
54414      fi
54415
54416
54417  DLL_NAME="$DLL_NAME"
54418  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54419  METHOD="search of VCINSTALLDIR"
54420  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54421    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54422$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54423
54424    # Need to check if the found msvcr is correct architecture
54425    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54426$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54427    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54428    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54429      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54430      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54431      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54432        CORRECT_MSVCR_ARCH="PE32 executable"
54433      else
54434        CORRECT_MSVCR_ARCH="PE32+ executable"
54435      fi
54436    else
54437      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54438        CORRECT_MSVCR_ARCH=386
54439      else
54440        CORRECT_MSVCR_ARCH=x86-64
54441      fi
54442    fi
54443    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54444      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54445$as_echo "ok" >&6; }
54446      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54447
54448  # Only process if variable expands to non-empty
54449
54450  if test "x$MSVC_DLL" != x; then
54451    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54452
54453  # Input might be given as Windows format, start by converting to
54454  # unix format.
54455  path="$MSVC_DLL"
54456  new_path=`$CYGPATH -u "$path"`
54457
54458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54461  # "foo.exe" is OK but "foo" is an error.
54462  #
54463  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54464  # It is also a way to make sure we got the proper file name for the real test later on.
54465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54466  if test "x$test_shortpath" = x; then
54467    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54468$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54469    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54470  fi
54471
54472  # Call helper function which possibly converts this using DOS-style short mode.
54473  # If so, the updated path is stored in $new_path.
54474
54475  input_path="$new_path"
54476  # Check if we need to convert this using DOS-style short mode. If the path
54477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54478  # take no chances and rewrite it.
54479  # Note: m4 eats our [], so we need to use [ and ] instead.
54480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54481  if test "x$has_forbidden_chars" != x; then
54482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54486      # Going to short mode and back again did indeed matter. Since short mode is
54487      # case insensitive, let's make it lowercase to improve readability.
54488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54489      # Now convert it back to Unix-style (cygpath)
54490      input_path=`$CYGPATH -u "$shortmode_path"`
54491      new_path="$input_path"
54492    fi
54493  fi
54494
54495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54496  if test "x$test_cygdrive_prefix" = x; then
54497    # As a simple fix, exclude /usr/bin since it's not a real path.
54498    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54500      # a path prefixed by /cygdrive for fixpath to work.
54501      new_path="$CYGWIN_ROOT_PATH$input_path"
54502    fi
54503  fi
54504
54505
54506  if test "x$path" != "x$new_path"; then
54507    MSVC_DLL="$new_path"
54508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54509$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54510  fi
54511
54512    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54513
54514  path="$MSVC_DLL"
54515  has_colon=`$ECHO $path | $GREP ^.:`
54516  new_path="$path"
54517  if test "x$has_colon" = x; then
54518    # Not in mixed or Windows style, start by that.
54519    new_path=`cmd //c echo $path`
54520  fi
54521
54522
54523  input_path="$new_path"
54524  # Check if we need to convert this using DOS-style short mode. If the path
54525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54526  # take no chances and rewrite it.
54527  # Note: m4 eats our [], so we need to use [ and ] instead.
54528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54529  if test "x$has_forbidden_chars" != x; then
54530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54532  fi
54533
54534
54535  windows_path="$new_path"
54536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54537    unix_path=`$CYGPATH -u "$windows_path"`
54538    new_path="$unix_path"
54539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54541    new_path="$unix_path"
54542  fi
54543
54544  if test "x$path" != "x$new_path"; then
54545    MSVC_DLL="$new_path"
54546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54547$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54548  fi
54549
54550  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54551  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54552
54553    else
54554      # We're on a unix platform. Hooray! :)
54555      path="$MSVC_DLL"
54556      has_space=`$ECHO "$path" | $GREP " "`
54557      if test "x$has_space" != x; then
54558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54559$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54560        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54561      fi
54562
54563      # Use eval to expand a potential ~
54564      eval path="$path"
54565      if test ! -f "$path" && test ! -d "$path"; then
54566        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54567      fi
54568
54569      if test -d "$path"; then
54570        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54571      else
54572        dir="`$DIRNAME "$path"`"
54573        base="`$BASENAME "$path"`"
54574        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54575      fi
54576    fi
54577  fi
54578
54579      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54580$as_echo_n "checking for $DLL_NAME... " >&6; }
54581      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54582$as_echo "$MSVC_DLL" >&6; }
54583    else
54584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54585$as_echo "incorrect, ignoring" >&6; }
54586      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54587$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54588    fi
54589  fi
54590
54591    fi
54592  fi
54593
54594  if test "x$MSVC_DLL" = x; then
54595    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54596$as_echo_n "checking for $DLL_NAME... " >&6; }
54597    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54598$as_echo "no" >&6; }
54599    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54600  fi
54601
54602    MSVCR_DLL="$MSVC_DLL"
54603  fi
54604
54605
54606
54607# Check whether --with-msvcp-dll was given.
54608if test "${with_msvcp_dll+set}" = set; then :
54609  withval=$with_msvcp_dll;
54610fi
54611
54612
54613  if test "x$MSVCP_NAME" != "x"; then
54614    if test "x$with_msvcp_dll" != x; then
54615      # If given explicitely by user, do not probe. If not present, fail directly.
54616
54617  DLL_NAME="$MSVCP_NAME"
54618  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54619  METHOD="--with-msvcp-dll"
54620  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54621    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54622$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54623
54624    # Need to check if the found msvcr is correct architecture
54625    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54626$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54627    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54629      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54630      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54631      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54632        CORRECT_MSVCR_ARCH="PE32 executable"
54633      else
54634        CORRECT_MSVCR_ARCH="PE32+ executable"
54635      fi
54636    else
54637      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54638        CORRECT_MSVCR_ARCH=386
54639      else
54640        CORRECT_MSVCR_ARCH=x86-64
54641      fi
54642    fi
54643    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54644      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54645$as_echo "ok" >&6; }
54646      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54647
54648  # Only process if variable expands to non-empty
54649
54650  if test "x$MSVC_DLL" != x; then
54651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54652
54653  # Input might be given as Windows format, start by converting to
54654  # unix format.
54655  path="$MSVC_DLL"
54656  new_path=`$CYGPATH -u "$path"`
54657
54658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54661  # "foo.exe" is OK but "foo" is an error.
54662  #
54663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54664  # It is also a way to make sure we got the proper file name for the real test later on.
54665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54666  if test "x$test_shortpath" = x; then
54667    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54668$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54669    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54670  fi
54671
54672  # Call helper function which possibly converts this using DOS-style short mode.
54673  # If so, the updated path is stored in $new_path.
54674
54675  input_path="$new_path"
54676  # Check if we need to convert this using DOS-style short mode. If the path
54677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54678  # take no chances and rewrite it.
54679  # Note: m4 eats our [], so we need to use [ and ] instead.
54680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54681  if test "x$has_forbidden_chars" != x; then
54682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54686      # Going to short mode and back again did indeed matter. Since short mode is
54687      # case insensitive, let's make it lowercase to improve readability.
54688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54689      # Now convert it back to Unix-style (cygpath)
54690      input_path=`$CYGPATH -u "$shortmode_path"`
54691      new_path="$input_path"
54692    fi
54693  fi
54694
54695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54696  if test "x$test_cygdrive_prefix" = x; then
54697    # As a simple fix, exclude /usr/bin since it's not a real path.
54698    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54700      # a path prefixed by /cygdrive for fixpath to work.
54701      new_path="$CYGWIN_ROOT_PATH$input_path"
54702    fi
54703  fi
54704
54705
54706  if test "x$path" != "x$new_path"; then
54707    MSVC_DLL="$new_path"
54708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54709$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54710  fi
54711
54712    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54713
54714  path="$MSVC_DLL"
54715  has_colon=`$ECHO $path | $GREP ^.:`
54716  new_path="$path"
54717  if test "x$has_colon" = x; then
54718    # Not in mixed or Windows style, start by that.
54719    new_path=`cmd //c echo $path`
54720  fi
54721
54722
54723  input_path="$new_path"
54724  # Check if we need to convert this using DOS-style short mode. If the path
54725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54726  # take no chances and rewrite it.
54727  # Note: m4 eats our [], so we need to use [ and ] instead.
54728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54729  if test "x$has_forbidden_chars" != x; then
54730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54732  fi
54733
54734
54735  windows_path="$new_path"
54736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54737    unix_path=`$CYGPATH -u "$windows_path"`
54738    new_path="$unix_path"
54739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54741    new_path="$unix_path"
54742  fi
54743
54744  if test "x$path" != "x$new_path"; then
54745    MSVC_DLL="$new_path"
54746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54747$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54748  fi
54749
54750  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54751  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54752
54753    else
54754      # We're on a unix platform. Hooray! :)
54755      path="$MSVC_DLL"
54756      has_space=`$ECHO "$path" | $GREP " "`
54757      if test "x$has_space" != x; then
54758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54759$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54760        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54761      fi
54762
54763      # Use eval to expand a potential ~
54764      eval path="$path"
54765      if test ! -f "$path" && test ! -d "$path"; then
54766        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54767      fi
54768
54769      if test -d "$path"; then
54770        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54771      else
54772        dir="`$DIRNAME "$path"`"
54773        base="`$BASENAME "$path"`"
54774        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54775      fi
54776    fi
54777  fi
54778
54779      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54780$as_echo_n "checking for $DLL_NAME... " >&6; }
54781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54782$as_echo "$MSVC_DLL" >&6; }
54783    else
54784      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54785$as_echo "incorrect, ignoring" >&6; }
54786      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54787$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54788    fi
54789  fi
54790
54791      if test "x$MSVC_DLL" = x; then
54792        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54793      fi
54794      MSVCP_DLL="$MSVC_DLL"
54795    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54796
54797  DLL_NAME="$MSVCP_NAME"
54798  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54799  METHOD="devkit"
54800  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54801    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54802$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54803
54804    # Need to check if the found msvcr is correct architecture
54805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54806$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54807    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54809      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54810      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54811      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54812        CORRECT_MSVCR_ARCH="PE32 executable"
54813      else
54814        CORRECT_MSVCR_ARCH="PE32+ executable"
54815      fi
54816    else
54817      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54818        CORRECT_MSVCR_ARCH=386
54819      else
54820        CORRECT_MSVCR_ARCH=x86-64
54821      fi
54822    fi
54823    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54824      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54825$as_echo "ok" >&6; }
54826      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54827
54828  # Only process if variable expands to non-empty
54829
54830  if test "x$MSVC_DLL" != x; then
54831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54832
54833  # Input might be given as Windows format, start by converting to
54834  # unix format.
54835  path="$MSVC_DLL"
54836  new_path=`$CYGPATH -u "$path"`
54837
54838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54841  # "foo.exe" is OK but "foo" is an error.
54842  #
54843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54844  # It is also a way to make sure we got the proper file name for the real test later on.
54845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54846  if test "x$test_shortpath" = x; then
54847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54848$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54849    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54850  fi
54851
54852  # Call helper function which possibly converts this using DOS-style short mode.
54853  # If so, the updated path is stored in $new_path.
54854
54855  input_path="$new_path"
54856  # Check if we need to convert this using DOS-style short mode. If the path
54857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54858  # take no chances and rewrite it.
54859  # Note: m4 eats our [], so we need to use [ and ] instead.
54860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54861  if test "x$has_forbidden_chars" != x; then
54862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54866      # Going to short mode and back again did indeed matter. Since short mode is
54867      # case insensitive, let's make it lowercase to improve readability.
54868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54869      # Now convert it back to Unix-style (cygpath)
54870      input_path=`$CYGPATH -u "$shortmode_path"`
54871      new_path="$input_path"
54872    fi
54873  fi
54874
54875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54876  if test "x$test_cygdrive_prefix" = x; then
54877    # As a simple fix, exclude /usr/bin since it's not a real path.
54878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54880      # a path prefixed by /cygdrive for fixpath to work.
54881      new_path="$CYGWIN_ROOT_PATH$input_path"
54882    fi
54883  fi
54884
54885
54886  if test "x$path" != "x$new_path"; then
54887    MSVC_DLL="$new_path"
54888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54889$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54890  fi
54891
54892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54893
54894  path="$MSVC_DLL"
54895  has_colon=`$ECHO $path | $GREP ^.:`
54896  new_path="$path"
54897  if test "x$has_colon" = x; then
54898    # Not in mixed or Windows style, start by that.
54899    new_path=`cmd //c echo $path`
54900  fi
54901
54902
54903  input_path="$new_path"
54904  # Check if we need to convert this using DOS-style short mode. If the path
54905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54906  # take no chances and rewrite it.
54907  # Note: m4 eats our [], so we need to use [ and ] instead.
54908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54909  if test "x$has_forbidden_chars" != x; then
54910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54912  fi
54913
54914
54915  windows_path="$new_path"
54916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54917    unix_path=`$CYGPATH -u "$windows_path"`
54918    new_path="$unix_path"
54919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54921    new_path="$unix_path"
54922  fi
54923
54924  if test "x$path" != "x$new_path"; then
54925    MSVC_DLL="$new_path"
54926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54927$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54928  fi
54929
54930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54932
54933    else
54934      # We're on a unix platform. Hooray! :)
54935      path="$MSVC_DLL"
54936      has_space=`$ECHO "$path" | $GREP " "`
54937      if test "x$has_space" != x; then
54938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54939$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54940        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54941      fi
54942
54943      # Use eval to expand a potential ~
54944      eval path="$path"
54945      if test ! -f "$path" && test ! -d "$path"; then
54946        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54947      fi
54948
54949      if test -d "$path"; then
54950        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54951      else
54952        dir="`$DIRNAME "$path"`"
54953        base="`$BASENAME "$path"`"
54954        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54955      fi
54956    fi
54957  fi
54958
54959      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54960$as_echo_n "checking for $DLL_NAME... " >&6; }
54961      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54962$as_echo "$MSVC_DLL" >&6; }
54963    else
54964      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54965$as_echo "incorrect, ignoring" >&6; }
54966      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54967$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54968    fi
54969  fi
54970
54971      if test "x$MSVC_DLL" = x; then
54972        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54973      fi
54974      MSVCP_DLL="$MSVC_DLL"
54975    else
54976
54977  DLL_NAME="${MSVCP_NAME}"
54978  MSVC_DLL=
54979
54980  if test "x$MSVC_DLL" = x; then
54981    # Probe: Using well-known location from Visual Studio 10.0
54982    if test "x$VCINSTALLDIR" != x; then
54983      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54984
54985  windows_path="$CYGWIN_VC_INSTALL_DIR"
54986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54987    unix_path=`$CYGPATH -u "$windows_path"`
54988    CYGWIN_VC_INSTALL_DIR="$unix_path"
54989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54991    CYGWIN_VC_INSTALL_DIR="$unix_path"
54992  fi
54993
54994      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54995        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54996      else
54997        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54998      fi
54999      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55000
55001  DLL_NAME="$DLL_NAME"
55002  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55003  METHOD="well-known location in VCINSTALLDIR"
55004  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55005    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55006$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55007
55008    # Need to check if the found msvcr is correct architecture
55009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55010$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55011    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55013      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55014      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55015      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55016        CORRECT_MSVCR_ARCH="PE32 executable"
55017      else
55018        CORRECT_MSVCR_ARCH="PE32+ executable"
55019      fi
55020    else
55021      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55022        CORRECT_MSVCR_ARCH=386
55023      else
55024        CORRECT_MSVCR_ARCH=x86-64
55025      fi
55026    fi
55027    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55028      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55029$as_echo "ok" >&6; }
55030      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55031
55032  # Only process if variable expands to non-empty
55033
55034  if test "x$MSVC_DLL" != x; then
55035    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55036
55037  # Input might be given as Windows format, start by converting to
55038  # unix format.
55039  path="$MSVC_DLL"
55040  new_path=`$CYGPATH -u "$path"`
55041
55042  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55043  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55044  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55045  # "foo.exe" is OK but "foo" is an error.
55046  #
55047  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55048  # It is also a way to make sure we got the proper file name for the real test later on.
55049  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55050  if test "x$test_shortpath" = x; then
55051    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55052$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55053    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55054  fi
55055
55056  # Call helper function which possibly converts this using DOS-style short mode.
55057  # If so, the updated path is stored in $new_path.
55058
55059  input_path="$new_path"
55060  # Check if we need to convert this using DOS-style short mode. If the path
55061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55062  # take no chances and rewrite it.
55063  # Note: m4 eats our [], so we need to use [ and ] instead.
55064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55065  if test "x$has_forbidden_chars" != x; then
55066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55067    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55068    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55069    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55070      # Going to short mode and back again did indeed matter. Since short mode is
55071      # case insensitive, let's make it lowercase to improve readability.
55072      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55073      # Now convert it back to Unix-style (cygpath)
55074      input_path=`$CYGPATH -u "$shortmode_path"`
55075      new_path="$input_path"
55076    fi
55077  fi
55078
55079  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55080  if test "x$test_cygdrive_prefix" = x; then
55081    # As a simple fix, exclude /usr/bin since it's not a real path.
55082    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55083      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55084      # a path prefixed by /cygdrive for fixpath to work.
55085      new_path="$CYGWIN_ROOT_PATH$input_path"
55086    fi
55087  fi
55088
55089
55090  if test "x$path" != "x$new_path"; then
55091    MSVC_DLL="$new_path"
55092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55093$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55094  fi
55095
55096    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55097
55098  path="$MSVC_DLL"
55099  has_colon=`$ECHO $path | $GREP ^.:`
55100  new_path="$path"
55101  if test "x$has_colon" = x; then
55102    # Not in mixed or Windows style, start by that.
55103    new_path=`cmd //c echo $path`
55104  fi
55105
55106
55107  input_path="$new_path"
55108  # Check if we need to convert this using DOS-style short mode. If the path
55109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55110  # take no chances and rewrite it.
55111  # Note: m4 eats our [], so we need to use [ and ] instead.
55112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55113  if test "x$has_forbidden_chars" != x; then
55114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55115    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55116  fi
55117
55118
55119  windows_path="$new_path"
55120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55121    unix_path=`$CYGPATH -u "$windows_path"`
55122    new_path="$unix_path"
55123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55125    new_path="$unix_path"
55126  fi
55127
55128  if test "x$path" != "x$new_path"; then
55129    MSVC_DLL="$new_path"
55130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55131$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55132  fi
55133
55134  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55135  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55136
55137    else
55138      # We're on a unix platform. Hooray! :)
55139      path="$MSVC_DLL"
55140      has_space=`$ECHO "$path" | $GREP " "`
55141      if test "x$has_space" != x; then
55142        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55143$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55144        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55145      fi
55146
55147      # Use eval to expand a potential ~
55148      eval path="$path"
55149      if test ! -f "$path" && test ! -d "$path"; then
55150        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55151      fi
55152
55153      if test -d "$path"; then
55154        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55155      else
55156        dir="`$DIRNAME "$path"`"
55157        base="`$BASENAME "$path"`"
55158        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55159      fi
55160    fi
55161  fi
55162
55163      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55164$as_echo_n "checking for $DLL_NAME... " >&6; }
55165      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55166$as_echo "$MSVC_DLL" >&6; }
55167    else
55168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55169$as_echo "incorrect, ignoring" >&6; }
55170      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55171$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55172    fi
55173  fi
55174
55175    fi
55176  fi
55177
55178  if test "x$MSVC_DLL" = x; then
55179    # Probe: Check in the Boot JDK directory.
55180    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55181
55182  DLL_NAME="$DLL_NAME"
55183  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55184  METHOD="well-known location in Boot JDK"
55185  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55186    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55187$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55188
55189    # Need to check if the found msvcr is correct architecture
55190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55191$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55192    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55194      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55195      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55196      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55197        CORRECT_MSVCR_ARCH="PE32 executable"
55198      else
55199        CORRECT_MSVCR_ARCH="PE32+ executable"
55200      fi
55201    else
55202      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55203        CORRECT_MSVCR_ARCH=386
55204      else
55205        CORRECT_MSVCR_ARCH=x86-64
55206      fi
55207    fi
55208    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55209      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55210$as_echo "ok" >&6; }
55211      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55212
55213  # Only process if variable expands to non-empty
55214
55215  if test "x$MSVC_DLL" != x; then
55216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55217
55218  # Input might be given as Windows format, start by converting to
55219  # unix format.
55220  path="$MSVC_DLL"
55221  new_path=`$CYGPATH -u "$path"`
55222
55223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55226  # "foo.exe" is OK but "foo" is an error.
55227  #
55228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55229  # It is also a way to make sure we got the proper file name for the real test later on.
55230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55231  if test "x$test_shortpath" = x; then
55232    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55233$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55234    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55235  fi
55236
55237  # Call helper function which possibly converts this using DOS-style short mode.
55238  # If so, the updated path is stored in $new_path.
55239
55240  input_path="$new_path"
55241  # Check if we need to convert this using DOS-style short mode. If the path
55242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55243  # take no chances and rewrite it.
55244  # Note: m4 eats our [], so we need to use [ and ] instead.
55245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55246  if test "x$has_forbidden_chars" != x; then
55247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55251      # Going to short mode and back again did indeed matter. Since short mode is
55252      # case insensitive, let's make it lowercase to improve readability.
55253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55254      # Now convert it back to Unix-style (cygpath)
55255      input_path=`$CYGPATH -u "$shortmode_path"`
55256      new_path="$input_path"
55257    fi
55258  fi
55259
55260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55261  if test "x$test_cygdrive_prefix" = x; then
55262    # As a simple fix, exclude /usr/bin since it's not a real path.
55263    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55265      # a path prefixed by /cygdrive for fixpath to work.
55266      new_path="$CYGWIN_ROOT_PATH$input_path"
55267    fi
55268  fi
55269
55270
55271  if test "x$path" != "x$new_path"; then
55272    MSVC_DLL="$new_path"
55273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55274$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55275  fi
55276
55277    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55278
55279  path="$MSVC_DLL"
55280  has_colon=`$ECHO $path | $GREP ^.:`
55281  new_path="$path"
55282  if test "x$has_colon" = x; then
55283    # Not in mixed or Windows style, start by that.
55284    new_path=`cmd //c echo $path`
55285  fi
55286
55287
55288  input_path="$new_path"
55289  # Check if we need to convert this using DOS-style short mode. If the path
55290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55291  # take no chances and rewrite it.
55292  # Note: m4 eats our [], so we need to use [ and ] instead.
55293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55294  if test "x$has_forbidden_chars" != x; then
55295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55297  fi
55298
55299
55300  windows_path="$new_path"
55301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55302    unix_path=`$CYGPATH -u "$windows_path"`
55303    new_path="$unix_path"
55304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55306    new_path="$unix_path"
55307  fi
55308
55309  if test "x$path" != "x$new_path"; then
55310    MSVC_DLL="$new_path"
55311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55312$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55313  fi
55314
55315  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55316  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55317
55318    else
55319      # We're on a unix platform. Hooray! :)
55320      path="$MSVC_DLL"
55321      has_space=`$ECHO "$path" | $GREP " "`
55322      if test "x$has_space" != x; then
55323        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55324$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55325        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55326      fi
55327
55328      # Use eval to expand a potential ~
55329      eval path="$path"
55330      if test ! -f "$path" && test ! -d "$path"; then
55331        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55332      fi
55333
55334      if test -d "$path"; then
55335        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55336      else
55337        dir="`$DIRNAME "$path"`"
55338        base="`$BASENAME "$path"`"
55339        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55340      fi
55341    fi
55342  fi
55343
55344      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55345$as_echo_n "checking for $DLL_NAME... " >&6; }
55346      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55347$as_echo "$MSVC_DLL" >&6; }
55348    else
55349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55350$as_echo "incorrect, ignoring" >&6; }
55351      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55352$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55353    fi
55354  fi
55355
55356  fi
55357
55358  if test "x$MSVC_DLL" = x; then
55359    # Probe: Look in the Windows system32 directory
55360    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55361
55362  windows_path="$CYGWIN_SYSTEMROOT"
55363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55364    unix_path=`$CYGPATH -u "$windows_path"`
55365    CYGWIN_SYSTEMROOT="$unix_path"
55366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55368    CYGWIN_SYSTEMROOT="$unix_path"
55369  fi
55370
55371    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55372
55373  DLL_NAME="$DLL_NAME"
55374  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55375  METHOD="well-known location in SYSTEMROOT"
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
55549  if test "x$MSVC_DLL" = x; then
55550    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55551    if test "x$VS100COMNTOOLS" != x; then
55552      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55553
55554  windows_path="$CYGWIN_VS_TOOLS_DIR"
55555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55556    unix_path=`$CYGPATH -u "$windows_path"`
55557    CYGWIN_VS_TOOLS_DIR="$unix_path"
55558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55560    CYGWIN_VS_TOOLS_DIR="$unix_path"
55561  fi
55562
55563      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55564        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55565	    | $GREP -i /x64/ | $HEAD --lines 1`
55566      else
55567        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55568	    | $GREP -i /x86/ | $HEAD --lines 1`
55569      fi
55570
55571  DLL_NAME="$DLL_NAME"
55572  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55573  METHOD="search of VS100COMNTOOLS"
55574  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55575    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55576$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55577
55578    # Need to check if the found msvcr is correct architecture
55579    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55580$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55581    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55582    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55583      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55584      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55585      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55586        CORRECT_MSVCR_ARCH="PE32 executable"
55587      else
55588        CORRECT_MSVCR_ARCH="PE32+ executable"
55589      fi
55590    else
55591      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55592        CORRECT_MSVCR_ARCH=386
55593      else
55594        CORRECT_MSVCR_ARCH=x86-64
55595      fi
55596    fi
55597    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55598      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55599$as_echo "ok" >&6; }
55600      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55601
55602  # Only process if variable expands to non-empty
55603
55604  if test "x$MSVC_DLL" != x; then
55605    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55606
55607  # Input might be given as Windows format, start by converting to
55608  # unix format.
55609  path="$MSVC_DLL"
55610  new_path=`$CYGPATH -u "$path"`
55611
55612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55615  # "foo.exe" is OK but "foo" is an error.
55616  #
55617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55618  # It is also a way to make sure we got the proper file name for the real test later on.
55619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55620  if test "x$test_shortpath" = x; then
55621    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55622$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55623    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55624  fi
55625
55626  # Call helper function which possibly converts this using DOS-style short mode.
55627  # If so, the updated path is stored in $new_path.
55628
55629  input_path="$new_path"
55630  # Check if we need to convert this using DOS-style short mode. If the path
55631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55632  # take no chances and rewrite it.
55633  # Note: m4 eats our [], so we need to use [ and ] instead.
55634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55635  if test "x$has_forbidden_chars" != x; then
55636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55640      # Going to short mode and back again did indeed matter. Since short mode is
55641      # case insensitive, let's make it lowercase to improve readability.
55642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55643      # Now convert it back to Unix-style (cygpath)
55644      input_path=`$CYGPATH -u "$shortmode_path"`
55645      new_path="$input_path"
55646    fi
55647  fi
55648
55649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55650  if test "x$test_cygdrive_prefix" = x; then
55651    # As a simple fix, exclude /usr/bin since it's not a real path.
55652    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55654      # a path prefixed by /cygdrive for fixpath to work.
55655      new_path="$CYGWIN_ROOT_PATH$input_path"
55656    fi
55657  fi
55658
55659
55660  if test "x$path" != "x$new_path"; then
55661    MSVC_DLL="$new_path"
55662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55663$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55664  fi
55665
55666    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55667
55668  path="$MSVC_DLL"
55669  has_colon=`$ECHO $path | $GREP ^.:`
55670  new_path="$path"
55671  if test "x$has_colon" = x; then
55672    # Not in mixed or Windows style, start by that.
55673    new_path=`cmd //c echo $path`
55674  fi
55675
55676
55677  input_path="$new_path"
55678  # Check if we need to convert this using DOS-style short mode. If the path
55679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55680  # take no chances and rewrite it.
55681  # Note: m4 eats our [], so we need to use [ and ] instead.
55682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55683  if test "x$has_forbidden_chars" != x; then
55684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55686  fi
55687
55688
55689  windows_path="$new_path"
55690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55691    unix_path=`$CYGPATH -u "$windows_path"`
55692    new_path="$unix_path"
55693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55695    new_path="$unix_path"
55696  fi
55697
55698  if test "x$path" != "x$new_path"; then
55699    MSVC_DLL="$new_path"
55700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55701$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55702  fi
55703
55704  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55705  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55706
55707    else
55708      # We're on a unix platform. Hooray! :)
55709      path="$MSVC_DLL"
55710      has_space=`$ECHO "$path" | $GREP " "`
55711      if test "x$has_space" != x; then
55712        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55713$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55714        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55715      fi
55716
55717      # Use eval to expand a potential ~
55718      eval path="$path"
55719      if test ! -f "$path" && test ! -d "$path"; then
55720        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55721      fi
55722
55723      if test -d "$path"; then
55724        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55725      else
55726        dir="`$DIRNAME "$path"`"
55727        base="`$BASENAME "$path"`"
55728        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55729      fi
55730    fi
55731  fi
55732
55733      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55734$as_echo_n "checking for $DLL_NAME... " >&6; }
55735      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55736$as_echo "$MSVC_DLL" >&6; }
55737    else
55738      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55739$as_echo "incorrect, ignoring" >&6; }
55740      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55741$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55742    fi
55743  fi
55744
55745    fi
55746  fi
55747
55748  if test "x$MSVC_DLL" = x; then
55749    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55750    # (This was the original behaviour; kept since it might turn something up)
55751    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55752      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55753        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55754	    | $GREP x64 | $HEAD --lines 1`
55755      else
55756        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55757	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55758        if test "x$POSSIBLE_MSVC_DLL" = x; then
55759          # We're grasping at straws now...
55760          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55761	      | $HEAD --lines 1`
55762        fi
55763      fi
55764
55765
55766  DLL_NAME="$DLL_NAME"
55767  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55768  METHOD="search of VCINSTALLDIR"
55769  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55770    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55771$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55772
55773    # Need to check if the found msvcr is correct architecture
55774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55775$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55776    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55778      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55779      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55780      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55781        CORRECT_MSVCR_ARCH="PE32 executable"
55782      else
55783        CORRECT_MSVCR_ARCH="PE32+ executable"
55784      fi
55785    else
55786      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55787        CORRECT_MSVCR_ARCH=386
55788      else
55789        CORRECT_MSVCR_ARCH=x86-64
55790      fi
55791    fi
55792    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55793      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55794$as_echo "ok" >&6; }
55795      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55796
55797  # Only process if variable expands to non-empty
55798
55799  if test "x$MSVC_DLL" != x; then
55800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55801
55802  # Input might be given as Windows format, start by converting to
55803  # unix format.
55804  path="$MSVC_DLL"
55805  new_path=`$CYGPATH -u "$path"`
55806
55807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55810  # "foo.exe" is OK but "foo" is an error.
55811  #
55812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55813  # It is also a way to make sure we got the proper file name for the real test later on.
55814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55815  if test "x$test_shortpath" = x; then
55816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55817$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55818    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55819  fi
55820
55821  # Call helper function which possibly converts this using DOS-style short mode.
55822  # If so, the updated path is stored in $new_path.
55823
55824  input_path="$new_path"
55825  # Check if we need to convert this using DOS-style short mode. If the path
55826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55827  # take no chances and rewrite it.
55828  # Note: m4 eats our [], so we need to use [ and ] instead.
55829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55830  if test "x$has_forbidden_chars" != x; then
55831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55835      # Going to short mode and back again did indeed matter. Since short mode is
55836      # case insensitive, let's make it lowercase to improve readability.
55837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55838      # Now convert it back to Unix-style (cygpath)
55839      input_path=`$CYGPATH -u "$shortmode_path"`
55840      new_path="$input_path"
55841    fi
55842  fi
55843
55844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55845  if test "x$test_cygdrive_prefix" = x; then
55846    # As a simple fix, exclude /usr/bin since it's not a real path.
55847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55849      # a path prefixed by /cygdrive for fixpath to work.
55850      new_path="$CYGWIN_ROOT_PATH$input_path"
55851    fi
55852  fi
55853
55854
55855  if test "x$path" != "x$new_path"; then
55856    MSVC_DLL="$new_path"
55857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55858$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55859  fi
55860
55861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55862
55863  path="$MSVC_DLL"
55864  has_colon=`$ECHO $path | $GREP ^.:`
55865  new_path="$path"
55866  if test "x$has_colon" = x; then
55867    # Not in mixed or Windows style, start by that.
55868    new_path=`cmd //c echo $path`
55869  fi
55870
55871
55872  input_path="$new_path"
55873  # Check if we need to convert this using DOS-style short mode. If the path
55874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55875  # take no chances and rewrite it.
55876  # Note: m4 eats our [], so we need to use [ and ] instead.
55877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55878  if test "x$has_forbidden_chars" != x; then
55879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55881  fi
55882
55883
55884  windows_path="$new_path"
55885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55886    unix_path=`$CYGPATH -u "$windows_path"`
55887    new_path="$unix_path"
55888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55890    new_path="$unix_path"
55891  fi
55892
55893  if test "x$path" != "x$new_path"; then
55894    MSVC_DLL="$new_path"
55895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55896$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55897  fi
55898
55899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55901
55902    else
55903      # We're on a unix platform. Hooray! :)
55904      path="$MSVC_DLL"
55905      has_space=`$ECHO "$path" | $GREP " "`
55906      if test "x$has_space" != x; then
55907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55908$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55909        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55910      fi
55911
55912      # Use eval to expand a potential ~
55913      eval path="$path"
55914      if test ! -f "$path" && test ! -d "$path"; then
55915        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55916      fi
55917
55918      if test -d "$path"; then
55919        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55920      else
55921        dir="`$DIRNAME "$path"`"
55922        base="`$BASENAME "$path"`"
55923        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55924      fi
55925    fi
55926  fi
55927
55928      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55929$as_echo_n "checking for $DLL_NAME... " >&6; }
55930      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55931$as_echo "$MSVC_DLL" >&6; }
55932    else
55933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55934$as_echo "incorrect, ignoring" >&6; }
55935      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55936$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55937    fi
55938  fi
55939
55940    fi
55941  fi
55942
55943  if test "x$MSVC_DLL" = x; then
55944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55945$as_echo_n "checking for $DLL_NAME... " >&6; }
55946    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55947$as_echo "no" >&6; }
55948    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55949  fi
55950
55951      MSVCP_DLL="$MSVC_DLL"
55952    fi
55953
55954  fi
55955
55956  fi
55957
55958
55959  if test "x$NEEDS_LIB_X11" = xfalse; then
55960    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55961      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55962$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55963    fi
55964    X_CFLAGS=
55965    X_LIBS=
55966  else
55967
55968    if test "x${with_x}" = xno; then
55969      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55970    fi
55971
55972    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55973      # The user has specified a X11 base directory. Use it for includes and
55974      # libraries, unless explicitely overridden.
55975      if test "x$x_includes" = xNONE; then
55976        x_includes="${with_x}/include"
55977      fi
55978      if test "x$x_libraries" = xNONE; then
55979        x_libraries="${with_x}/lib"
55980      fi
55981    else
55982      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55983      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55984      # --x-libraries for the sysroot, if that seems to be correct.
55985      if test "x$SYSROOT" != "x"; then
55986        if test "x$x_includes" = xNONE; then
55987          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55988            x_includes="$SYSROOT/usr/X11R6/include"
55989          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55990            x_includes="$SYSROOT/usr/include"
55991          fi
55992        fi
55993        if test "x$x_libraries" = xNONE; then
55994          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55995            x_libraries="$SYSROOT/usr/X11R6/lib"
55996          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55997            x_libraries="$SYSROOT/usr/lib64"
55998          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55999            x_libraries="$SYSROOT/usr/lib"
56000          fi
56001        fi
56002      fi
56003    fi
56004
56005    # Now let autoconf do it's magic
56006    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56007$as_echo_n "checking for X... " >&6; }
56008
56009
56010# Check whether --with-x was given.
56011if test "${with_x+set}" = set; then :
56012  withval=$with_x;
56013fi
56014
56015# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56016if test "x$with_x" = xno; then
56017  # The user explicitly disabled X.
56018  have_x=disabled
56019else
56020  case $x_includes,$x_libraries in #(
56021    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56022    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56023  $as_echo_n "(cached) " >&6
56024else
56025  # One or both of the vars are not set, and there is no cached value.
56026ac_x_includes=no ac_x_libraries=no
56027rm -f -r conftest.dir
56028if mkdir conftest.dir; then
56029  cd conftest.dir
56030  cat >Imakefile <<'_ACEOF'
56031incroot:
56032	@echo incroot='${INCROOT}'
56033usrlibdir:
56034	@echo usrlibdir='${USRLIBDIR}'
56035libdir:
56036	@echo libdir='${LIBDIR}'
56037_ACEOF
56038  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56039    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56040    for ac_var in incroot usrlibdir libdir; do
56041      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56042    done
56043    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56044    for ac_extension in a so sl dylib la dll; do
56045      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56046	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56047	ac_im_usrlibdir=$ac_im_libdir; break
56048      fi
56049    done
56050    # Screen out bogus values from the imake configuration.  They are
56051    # bogus both because they are the default anyway, and because
56052    # using them would break gcc on systems where it needs fixed includes.
56053    case $ac_im_incroot in
56054	/usr/include) ac_x_includes= ;;
56055	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56056    esac
56057    case $ac_im_usrlibdir in
56058	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56059	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56060    esac
56061  fi
56062  cd ..
56063  rm -f -r conftest.dir
56064fi
56065
56066# Standard set of common directories for X headers.
56067# Check X11 before X11Rn because it is often a symlink to the current release.
56068ac_x_header_dirs='
56069/usr/X11/include
56070/usr/X11R7/include
56071/usr/X11R6/include
56072/usr/X11R5/include
56073/usr/X11R4/include
56074
56075/usr/include/X11
56076/usr/include/X11R7
56077/usr/include/X11R6
56078/usr/include/X11R5
56079/usr/include/X11R4
56080
56081/usr/local/X11/include
56082/usr/local/X11R7/include
56083/usr/local/X11R6/include
56084/usr/local/X11R5/include
56085/usr/local/X11R4/include
56086
56087/usr/local/include/X11
56088/usr/local/include/X11R7
56089/usr/local/include/X11R6
56090/usr/local/include/X11R5
56091/usr/local/include/X11R4
56092
56093/usr/X386/include
56094/usr/x386/include
56095/usr/XFree86/include/X11
56096
56097/usr/include
56098/usr/local/include
56099/usr/unsupported/include
56100/usr/athena/include
56101/usr/local/x11r5/include
56102/usr/lpp/Xamples/include
56103
56104/usr/openwin/include
56105/usr/openwin/share/include'
56106
56107if test "$ac_x_includes" = no; then
56108  # Guess where to find include files, by looking for Xlib.h.
56109  # First, try using that file with no special directory specified.
56110  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56111/* end confdefs.h.  */
56112#include <X11/Xlib.h>
56113_ACEOF
56114if ac_fn_cxx_try_cpp "$LINENO"; then :
56115  # We can compile using X headers with no special include directory.
56116ac_x_includes=
56117else
56118  for ac_dir in $ac_x_header_dirs; do
56119  if test -r "$ac_dir/X11/Xlib.h"; then
56120    ac_x_includes=$ac_dir
56121    break
56122  fi
56123done
56124fi
56125rm -f conftest.err conftest.i conftest.$ac_ext
56126fi # $ac_x_includes = no
56127
56128if test "$ac_x_libraries" = no; then
56129  # Check for the libraries.
56130  # See if we find them without any special options.
56131  # Don't add to $LIBS permanently.
56132  ac_save_LIBS=$LIBS
56133  LIBS="-lX11 $LIBS"
56134  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56135/* end confdefs.h.  */
56136#include <X11/Xlib.h>
56137int
56138main ()
56139{
56140XrmInitialize ()
56141  ;
56142  return 0;
56143}
56144_ACEOF
56145if ac_fn_cxx_try_link "$LINENO"; then :
56146  LIBS=$ac_save_LIBS
56147# We can link X programs with no special library path.
56148ac_x_libraries=
56149else
56150  LIBS=$ac_save_LIBS
56151for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56152do
56153  # Don't even attempt the hair of trying to link an X program!
56154  for ac_extension in a so sl dylib la dll; do
56155    if test -r "$ac_dir/libX11.$ac_extension"; then
56156      ac_x_libraries=$ac_dir
56157      break 2
56158    fi
56159  done
56160done
56161fi
56162rm -f core conftest.err conftest.$ac_objext \
56163    conftest$ac_exeext conftest.$ac_ext
56164fi # $ac_x_libraries = no
56165
56166case $ac_x_includes,$ac_x_libraries in #(
56167  no,* | *,no | *\'*)
56168    # Didn't find X, or a directory has "'" in its name.
56169    ac_cv_have_x="have_x=no";; #(
56170  *)
56171    # Record where we found X for the cache.
56172    ac_cv_have_x="have_x=yes\
56173	ac_x_includes='$ac_x_includes'\
56174	ac_x_libraries='$ac_x_libraries'"
56175esac
56176fi
56177;; #(
56178    *) have_x=yes;;
56179  esac
56180  eval "$ac_cv_have_x"
56181fi # $with_x != no
56182
56183if test "$have_x" != yes; then
56184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56185$as_echo "$have_x" >&6; }
56186  no_x=yes
56187else
56188  # If each of the values was on the command line, it overrides each guess.
56189  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56190  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56191  # Update the cache value to reflect the command line values.
56192  ac_cv_have_x="have_x=yes\
56193	ac_x_includes='$x_includes'\
56194	ac_x_libraries='$x_libraries'"
56195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56196$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56197fi
56198
56199    if test "$no_x" = yes; then
56200  # Not all programs may use this symbol, but it does not hurt to define it.
56201
56202$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56203
56204  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56205else
56206  if test -n "$x_includes"; then
56207    X_CFLAGS="$X_CFLAGS -I$x_includes"
56208  fi
56209
56210  # It would also be nice to do this for all -L options, not just this one.
56211  if test -n "$x_libraries"; then
56212    X_LIBS="$X_LIBS -L$x_libraries"
56213    # For Solaris; some versions of Sun CC require a space after -R and
56214    # others require no space.  Words are not sufficient . . . .
56215    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56216$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56217    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56218    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56219    ac_cxx_werror_flag=yes
56220    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56221/* end confdefs.h.  */
56222
56223int
56224main ()
56225{
56226
56227  ;
56228  return 0;
56229}
56230_ACEOF
56231if ac_fn_cxx_try_link "$LINENO"; then :
56232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56233$as_echo "no" >&6; }
56234       X_LIBS="$X_LIBS -R$x_libraries"
56235else
56236  LIBS="$ac_xsave_LIBS -R $x_libraries"
56237       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56238/* end confdefs.h.  */
56239
56240int
56241main ()
56242{
56243
56244  ;
56245  return 0;
56246}
56247_ACEOF
56248if ac_fn_cxx_try_link "$LINENO"; then :
56249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56250$as_echo "yes" >&6; }
56251	  X_LIBS="$X_LIBS -R $x_libraries"
56252else
56253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56254$as_echo "neither works" >&6; }
56255fi
56256rm -f core conftest.err conftest.$ac_objext \
56257    conftest$ac_exeext conftest.$ac_ext
56258fi
56259rm -f core conftest.err conftest.$ac_objext \
56260    conftest$ac_exeext conftest.$ac_ext
56261    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56262    LIBS=$ac_xsave_LIBS
56263  fi
56264
56265  # Check for system-dependent libraries X programs must link with.
56266  # Do this before checking for the system-independent R6 libraries
56267  # (-lICE), since we may need -lsocket or whatever for X linking.
56268
56269  if test "$ISC" = yes; then
56270    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56271  else
56272    # Martyn Johnson says this is needed for Ultrix, if the X
56273    # libraries were built with DECnet support.  And Karl Berry says
56274    # the Alpha needs dnet_stub (dnet does not exist).
56275    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56276    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56277/* end confdefs.h.  */
56278
56279/* Override any GCC internal prototype to avoid an error.
56280   Use char because int might match the return type of a GCC
56281   builtin and then its argument prototype would still apply.  */
56282#ifdef __cplusplus
56283extern "C"
56284#endif
56285char XOpenDisplay ();
56286int
56287main ()
56288{
56289return XOpenDisplay ();
56290  ;
56291  return 0;
56292}
56293_ACEOF
56294if ac_fn_cxx_try_link "$LINENO"; then :
56295
56296else
56297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56298$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56299if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56300  $as_echo_n "(cached) " >&6
56301else
56302  ac_check_lib_save_LIBS=$LIBS
56303LIBS="-ldnet  $LIBS"
56304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56305/* end confdefs.h.  */
56306
56307/* Override any GCC internal prototype to avoid an error.
56308   Use char because int might match the return type of a GCC
56309   builtin and then its argument prototype would still apply.  */
56310#ifdef __cplusplus
56311extern "C"
56312#endif
56313char dnet_ntoa ();
56314int
56315main ()
56316{
56317return dnet_ntoa ();
56318  ;
56319  return 0;
56320}
56321_ACEOF
56322if ac_fn_cxx_try_link "$LINENO"; then :
56323  ac_cv_lib_dnet_dnet_ntoa=yes
56324else
56325  ac_cv_lib_dnet_dnet_ntoa=no
56326fi
56327rm -f core conftest.err conftest.$ac_objext \
56328    conftest$ac_exeext conftest.$ac_ext
56329LIBS=$ac_check_lib_save_LIBS
56330fi
56331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56332$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56333if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56334  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56335fi
56336
56337    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56338      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56339$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56340if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56341  $as_echo_n "(cached) " >&6
56342else
56343  ac_check_lib_save_LIBS=$LIBS
56344LIBS="-ldnet_stub  $LIBS"
56345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56346/* end confdefs.h.  */
56347
56348/* Override any GCC internal prototype to avoid an error.
56349   Use char because int might match the return type of a GCC
56350   builtin and then its argument prototype would still apply.  */
56351#ifdef __cplusplus
56352extern "C"
56353#endif
56354char dnet_ntoa ();
56355int
56356main ()
56357{
56358return dnet_ntoa ();
56359  ;
56360  return 0;
56361}
56362_ACEOF
56363if ac_fn_cxx_try_link "$LINENO"; then :
56364  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56365else
56366  ac_cv_lib_dnet_stub_dnet_ntoa=no
56367fi
56368rm -f core conftest.err conftest.$ac_objext \
56369    conftest$ac_exeext conftest.$ac_ext
56370LIBS=$ac_check_lib_save_LIBS
56371fi
56372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56373$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56374if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56375  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56376fi
56377
56378    fi
56379fi
56380rm -f core conftest.err conftest.$ac_objext \
56381    conftest$ac_exeext conftest.$ac_ext
56382    LIBS="$ac_xsave_LIBS"
56383
56384    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56385    # to get the SysV transport functions.
56386    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56387    # needs -lnsl.
56388    # The nsl library prevents programs from opening the X display
56389    # on Irix 5.2, according to T.E. Dickey.
56390    # The functions gethostbyname, getservbyname, and inet_addr are
56391    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56392    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56393if test "x$ac_cv_func_gethostbyname" = xyes; then :
56394
56395fi
56396
56397    if test $ac_cv_func_gethostbyname = no; then
56398      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56399$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56400if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56401  $as_echo_n "(cached) " >&6
56402else
56403  ac_check_lib_save_LIBS=$LIBS
56404LIBS="-lnsl  $LIBS"
56405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56406/* end confdefs.h.  */
56407
56408/* Override any GCC internal prototype to avoid an error.
56409   Use char because int might match the return type of a GCC
56410   builtin and then its argument prototype would still apply.  */
56411#ifdef __cplusplus
56412extern "C"
56413#endif
56414char gethostbyname ();
56415int
56416main ()
56417{
56418return gethostbyname ();
56419  ;
56420  return 0;
56421}
56422_ACEOF
56423if ac_fn_cxx_try_link "$LINENO"; then :
56424  ac_cv_lib_nsl_gethostbyname=yes
56425else
56426  ac_cv_lib_nsl_gethostbyname=no
56427fi
56428rm -f core conftest.err conftest.$ac_objext \
56429    conftest$ac_exeext conftest.$ac_ext
56430LIBS=$ac_check_lib_save_LIBS
56431fi
56432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56433$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56434if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56435  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56436fi
56437
56438      if test $ac_cv_lib_nsl_gethostbyname = no; then
56439	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56440$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56441if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56442  $as_echo_n "(cached) " >&6
56443else
56444  ac_check_lib_save_LIBS=$LIBS
56445LIBS="-lbsd  $LIBS"
56446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56447/* end confdefs.h.  */
56448
56449/* Override any GCC internal prototype to avoid an error.
56450   Use char because int might match the return type of a GCC
56451   builtin and then its argument prototype would still apply.  */
56452#ifdef __cplusplus
56453extern "C"
56454#endif
56455char gethostbyname ();
56456int
56457main ()
56458{
56459return gethostbyname ();
56460  ;
56461  return 0;
56462}
56463_ACEOF
56464if ac_fn_cxx_try_link "$LINENO"; then :
56465  ac_cv_lib_bsd_gethostbyname=yes
56466else
56467  ac_cv_lib_bsd_gethostbyname=no
56468fi
56469rm -f core conftest.err conftest.$ac_objext \
56470    conftest$ac_exeext conftest.$ac_ext
56471LIBS=$ac_check_lib_save_LIBS
56472fi
56473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56474$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56475if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56476  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56477fi
56478
56479      fi
56480    fi
56481
56482    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56483    # socket/setsockopt and other routines are undefined under SCO ODT
56484    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56485    # on later versions), says Simon Leinen: it contains gethostby*
56486    # variants that don't use the name server (or something).  -lsocket
56487    # must be given before -lnsl if both are needed.  We assume that
56488    # if connect needs -lnsl, so does gethostbyname.
56489    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56490if test "x$ac_cv_func_connect" = xyes; then :
56491
56492fi
56493
56494    if test $ac_cv_func_connect = no; then
56495      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56496$as_echo_n "checking for connect in -lsocket... " >&6; }
56497if ${ac_cv_lib_socket_connect+:} false; then :
56498  $as_echo_n "(cached) " >&6
56499else
56500  ac_check_lib_save_LIBS=$LIBS
56501LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56503/* end confdefs.h.  */
56504
56505/* Override any GCC internal prototype to avoid an error.
56506   Use char because int might match the return type of a GCC
56507   builtin and then its argument prototype would still apply.  */
56508#ifdef __cplusplus
56509extern "C"
56510#endif
56511char connect ();
56512int
56513main ()
56514{
56515return connect ();
56516  ;
56517  return 0;
56518}
56519_ACEOF
56520if ac_fn_cxx_try_link "$LINENO"; then :
56521  ac_cv_lib_socket_connect=yes
56522else
56523  ac_cv_lib_socket_connect=no
56524fi
56525rm -f core conftest.err conftest.$ac_objext \
56526    conftest$ac_exeext conftest.$ac_ext
56527LIBS=$ac_check_lib_save_LIBS
56528fi
56529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56530$as_echo "$ac_cv_lib_socket_connect" >&6; }
56531if test "x$ac_cv_lib_socket_connect" = xyes; then :
56532  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56533fi
56534
56535    fi
56536
56537    # Guillermo Gomez says -lposix is necessary on A/UX.
56538    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56539if test "x$ac_cv_func_remove" = xyes; then :
56540
56541fi
56542
56543    if test $ac_cv_func_remove = no; then
56544      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56545$as_echo_n "checking for remove in -lposix... " >&6; }
56546if ${ac_cv_lib_posix_remove+:} false; then :
56547  $as_echo_n "(cached) " >&6
56548else
56549  ac_check_lib_save_LIBS=$LIBS
56550LIBS="-lposix  $LIBS"
56551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56552/* end confdefs.h.  */
56553
56554/* Override any GCC internal prototype to avoid an error.
56555   Use char because int might match the return type of a GCC
56556   builtin and then its argument prototype would still apply.  */
56557#ifdef __cplusplus
56558extern "C"
56559#endif
56560char remove ();
56561int
56562main ()
56563{
56564return remove ();
56565  ;
56566  return 0;
56567}
56568_ACEOF
56569if ac_fn_cxx_try_link "$LINENO"; then :
56570  ac_cv_lib_posix_remove=yes
56571else
56572  ac_cv_lib_posix_remove=no
56573fi
56574rm -f core conftest.err conftest.$ac_objext \
56575    conftest$ac_exeext conftest.$ac_ext
56576LIBS=$ac_check_lib_save_LIBS
56577fi
56578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56579$as_echo "$ac_cv_lib_posix_remove" >&6; }
56580if test "x$ac_cv_lib_posix_remove" = xyes; then :
56581  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56582fi
56583
56584    fi
56585
56586    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56587    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56588if test "x$ac_cv_func_shmat" = xyes; then :
56589
56590fi
56591
56592    if test $ac_cv_func_shmat = no; then
56593      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56594$as_echo_n "checking for shmat in -lipc... " >&6; }
56595if ${ac_cv_lib_ipc_shmat+:} false; then :
56596  $as_echo_n "(cached) " >&6
56597else
56598  ac_check_lib_save_LIBS=$LIBS
56599LIBS="-lipc  $LIBS"
56600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56601/* end confdefs.h.  */
56602
56603/* Override any GCC internal prototype to avoid an error.
56604   Use char because int might match the return type of a GCC
56605   builtin and then its argument prototype would still apply.  */
56606#ifdef __cplusplus
56607extern "C"
56608#endif
56609char shmat ();
56610int
56611main ()
56612{
56613return shmat ();
56614  ;
56615  return 0;
56616}
56617_ACEOF
56618if ac_fn_cxx_try_link "$LINENO"; then :
56619  ac_cv_lib_ipc_shmat=yes
56620else
56621  ac_cv_lib_ipc_shmat=no
56622fi
56623rm -f core conftest.err conftest.$ac_objext \
56624    conftest$ac_exeext conftest.$ac_ext
56625LIBS=$ac_check_lib_save_LIBS
56626fi
56627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56628$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56629if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56630  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56631fi
56632
56633    fi
56634  fi
56635
56636  # Check for libraries that X11R6 Xt/Xaw programs need.
56637  ac_save_LDFLAGS=$LDFLAGS
56638  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56639  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56640  # check for ICE first), but we must link in the order -lSM -lICE or
56641  # we get undefined symbols.  So assume we have SM if we have ICE.
56642  # These have to be linked with before -lX11, unlike the other
56643  # libraries we check for below, so use a different variable.
56644  # John Interrante, Karl Berry
56645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56646$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56647if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56648  $as_echo_n "(cached) " >&6
56649else
56650  ac_check_lib_save_LIBS=$LIBS
56651LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56653/* end confdefs.h.  */
56654
56655/* Override any GCC internal prototype to avoid an error.
56656   Use char because int might match the return type of a GCC
56657   builtin and then its argument prototype would still apply.  */
56658#ifdef __cplusplus
56659extern "C"
56660#endif
56661char IceConnectionNumber ();
56662int
56663main ()
56664{
56665return IceConnectionNumber ();
56666  ;
56667  return 0;
56668}
56669_ACEOF
56670if ac_fn_cxx_try_link "$LINENO"; then :
56671  ac_cv_lib_ICE_IceConnectionNumber=yes
56672else
56673  ac_cv_lib_ICE_IceConnectionNumber=no
56674fi
56675rm -f core conftest.err conftest.$ac_objext \
56676    conftest$ac_exeext conftest.$ac_ext
56677LIBS=$ac_check_lib_save_LIBS
56678fi
56679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56680$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56681if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56682  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56683fi
56684
56685  LDFLAGS=$ac_save_LDFLAGS
56686
56687fi
56688
56689
56690    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56691    # this doesn't make sense so we remove it.
56692    if test "x$COMPILE_TYPE" = xcross; then
56693      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56694    fi
56695
56696    if test "x$no_x" = xyes; then
56697
56698  # Print a helpful message on how to acquire the necessary build dependency.
56699  # x11 is the help tag: freetype, cups, alsa etc
56700  MISSING_DEPENDENCY=x11
56701
56702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56703    cygwin_help $MISSING_DEPENDENCY
56704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56705    msys_help $MISSING_DEPENDENCY
56706  else
56707    PKGHANDLER_COMMAND=
56708
56709    case $PKGHANDLER in
56710      apt-get)
56711        apt_help     $MISSING_DEPENDENCY ;;
56712      yum)
56713        yum_help     $MISSING_DEPENDENCY ;;
56714      port)
56715        port_help    $MISSING_DEPENDENCY ;;
56716      pkgutil)
56717        pkgutil_help $MISSING_DEPENDENCY ;;
56718      pkgadd)
56719        pkgadd_help  $MISSING_DEPENDENCY ;;
56720    esac
56721
56722    if test "x$PKGHANDLER_COMMAND" != x; then
56723      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56724    fi
56725  fi
56726
56727      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56728    fi
56729
56730    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56731      OPENWIN_HOME="/usr/openwin"
56732      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56733      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56734          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56735          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56736          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56737    fi
56738
56739    ac_ext=c
56740ac_cpp='$CPP $CPPFLAGS'
56741ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56742ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56743ac_compiler_gnu=$ac_cv_c_compiler_gnu
56744
56745    OLD_CFLAGS="$CFLAGS"
56746    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56747
56748    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56749    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56750do :
56751  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56752ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56753          # include <X11/Xlib.h>
56754          # include <X11/Xutil.h>
56755
56756
56757"
56758if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56759  cat >>confdefs.h <<_ACEOF
56760#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56761_ACEOF
56762 X11_HEADERS_OK=yes
56763else
56764  X11_HEADERS_OK=no; break
56765fi
56766
56767done
56768
56769
56770    if test "x$X11_HEADERS_OK" = xno; then
56771
56772  # Print a helpful message on how to acquire the necessary build dependency.
56773  # x11 is the help tag: freetype, cups, alsa etc
56774  MISSING_DEPENDENCY=x11
56775
56776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56777    cygwin_help $MISSING_DEPENDENCY
56778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56779    msys_help $MISSING_DEPENDENCY
56780  else
56781    PKGHANDLER_COMMAND=
56782
56783    case $PKGHANDLER in
56784      apt-get)
56785        apt_help     $MISSING_DEPENDENCY ;;
56786      yum)
56787        yum_help     $MISSING_DEPENDENCY ;;
56788      port)
56789        port_help    $MISSING_DEPENDENCY ;;
56790      pkgutil)
56791        pkgutil_help $MISSING_DEPENDENCY ;;
56792      pkgadd)
56793        pkgadd_help  $MISSING_DEPENDENCY ;;
56794    esac
56795
56796    if test "x$PKGHANDLER_COMMAND" != x; then
56797      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56798    fi
56799  fi
56800
56801      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56802    fi
56803
56804    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56805    # defined in libawt_xawt.
56806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56807$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56808    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56809/* end confdefs.h.  */
56810#include <X11/extensions/Xrender.h>
56811int
56812main ()
56813{
56814XLinearGradient x;
56815  ;
56816  return 0;
56817}
56818_ACEOF
56819if ac_fn_c_try_compile "$LINENO"; then :
56820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56821$as_echo "yes" >&6; }
56822else
56823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56824$as_echo "no" >&6; }
56825         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56826fi
56827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56828
56829    CFLAGS="$OLD_CFLAGS"
56830    ac_ext=cpp
56831ac_cpp='$CXXCPP $CPPFLAGS'
56832ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56833ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56834ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56835
56836  fi # NEEDS_LIB_X11
56837
56838
56839
56840
56841
56842
56843# Check whether --with-cups was given.
56844if test "${with_cups+set}" = set; then :
56845  withval=$with_cups;
56846fi
56847
56848
56849# Check whether --with-cups-include was given.
56850if test "${with_cups_include+set}" = set; then :
56851  withval=$with_cups_include;
56852fi
56853
56854
56855  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56856    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56857        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56858      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56859$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56860    fi
56861    CUPS_CFLAGS=
56862  else
56863    CUPS_FOUND=no
56864
56865    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56866      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56867    fi
56868
56869    if test "x${with_cups}" != x; then
56870      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56871$as_echo_n "checking for cups headers... " >&6; }
56872      if test -s "${with_cups}/include/cups/cups.h"; then
56873        CUPS_CFLAGS="-I${with_cups}/include"
56874        CUPS_FOUND=yes
56875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56876$as_echo "$CUPS_FOUND" >&6; }
56877      else
56878        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56879      fi
56880    fi
56881    if test "x${with_cups_include}" != x; then
56882      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56883$as_echo_n "checking for cups headers... " >&6; }
56884      if test -s "${with_cups_include}/cups/cups.h"; then
56885        CUPS_CFLAGS="-I${with_cups_include}"
56886        CUPS_FOUND=yes
56887        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56888$as_echo "$CUPS_FOUND" >&6; }
56889      else
56890        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56891      fi
56892    fi
56893    if test "x$CUPS_FOUND" = xno; then
56894      # Are the cups headers installed in the default /usr/include location?
56895      for ac_header in cups/cups.h cups/ppd.h
56896do :
56897  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56898ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56899if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56900  cat >>confdefs.h <<_ACEOF
56901#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56902_ACEOF
56903
56904          CUPS_FOUND=yes
56905          CUPS_CFLAGS=
56906          DEFAULT_CUPS=yes
56907
56908fi
56909
56910done
56911
56912    fi
56913    if test "x$CUPS_FOUND" = xno; then
56914
56915  # Print a helpful message on how to acquire the necessary build dependency.
56916  # cups is the help tag: freetype, cups, alsa etc
56917  MISSING_DEPENDENCY=cups
56918
56919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56920    cygwin_help $MISSING_DEPENDENCY
56921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56922    msys_help $MISSING_DEPENDENCY
56923  else
56924    PKGHANDLER_COMMAND=
56925
56926    case $PKGHANDLER in
56927      apt-get)
56928        apt_help     $MISSING_DEPENDENCY ;;
56929      yum)
56930        yum_help     $MISSING_DEPENDENCY ;;
56931      port)
56932        port_help    $MISSING_DEPENDENCY ;;
56933      pkgutil)
56934        pkgutil_help $MISSING_DEPENDENCY ;;
56935      pkgadd)
56936        pkgadd_help  $MISSING_DEPENDENCY ;;
56937    esac
56938
56939    if test "x$PKGHANDLER_COMMAND" != x; then
56940      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56941    fi
56942  fi
56943
56944      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56945    fi
56946  fi
56947
56948
56949
56950
56951
56952# Check whether --with-freetype was given.
56953if test "${with_freetype+set}" = set; then :
56954  withval=$with_freetype;
56955fi
56956
56957
56958# Check whether --with-freetype-include was given.
56959if test "${with_freetype_include+set}" = set; then :
56960  withval=$with_freetype_include;
56961fi
56962
56963
56964# Check whether --with-freetype-lib was given.
56965if test "${with_freetype_lib+set}" = set; then :
56966  withval=$with_freetype_lib;
56967fi
56968
56969
56970# Check whether --with-freetype-src was given.
56971if test "${with_freetype_src+set}" = set; then :
56972  withval=$with_freetype_src;
56973fi
56974
56975  # Check whether --enable-freetype-bundling was given.
56976if test "${enable_freetype_bundling+set}" = set; then :
56977  enableval=$enable_freetype_bundling;
56978fi
56979
56980
56981  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56982  FREETYPE_BASE_NAME=freetype
56983  FREETYPE_CFLAGS=
56984  FREETYPE_LIBS=
56985  FREETYPE_BUNDLE_LIB_PATH=
56986
56987  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56988    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56989        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56990        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56991        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56992      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56993$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56994    fi
56995    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56996      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56997$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56998    fi
56999  else
57000    # freetype is needed to build; go get it!
57001
57002    BUNDLE_FREETYPE="$enable_freetype_bundling"
57003
57004    if  test "x$with_freetype_src" != x; then
57005      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57006        # Try to build freetype if --with-freetype-src was given on Windows
57007
57008  FREETYPE_SRC_PATH="$with_freetype_src"
57009  BUILD_FREETYPE=yes
57010
57011  # Check if the freetype sources are acessible..
57012  if ! test -d $FREETYPE_SRC_PATH; then
57013    { $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
57014$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57015    BUILD_FREETYPE=no
57016  fi
57017  # ..and contain a vc2010 project file
57018  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57019  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57020    { $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
57021$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57022    BUILD_FREETYPE=no
57023  fi
57024  # Now check if configure found a version of 'msbuild.exe'
57025  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57026    { $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
57027$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;}
57028    BUILD_FREETYPE=no
57029  fi
57030
57031  # Ready to go..
57032  if test "x$BUILD_FREETYPE" = xyes; then
57033    # msbuild requires trailing slashes for output directories
57034    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57035    freetype_lib_path_unix="$freetype_lib_path"
57036    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57037
57038  unix_path="$vcxproj_path"
57039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57040    windows_path=`$CYGPATH -m "$unix_path"`
57041    vcxproj_path="$windows_path"
57042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57043    windows_path=`cmd //c echo $unix_path`
57044    vcxproj_path="$windows_path"
57045  fi
57046
57047
57048  unix_path="$freetype_lib_path"
57049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57050    windows_path=`$CYGPATH -m "$unix_path"`
57051    freetype_lib_path="$windows_path"
57052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57053    windows_path=`cmd //c echo $unix_path`
57054    freetype_lib_path="$windows_path"
57055  fi
57056
57057
57058  unix_path="$freetype_obj_path"
57059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57060    windows_path=`$CYGPATH -m "$unix_path"`
57061    freetype_obj_path="$windows_path"
57062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57063    windows_path=`cmd //c echo $unix_path`
57064    freetype_obj_path="$windows_path"
57065  fi
57066
57067    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57068      freetype_platform=x64
57069    else
57070      freetype_platform=win32
57071    fi
57072
57073    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57074    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57075    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57076    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57077    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57078$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57079
57080    # First we try to build the freetype.dll
57081    $ECHO -e "@echo off\n"\
57082        "$MSBUILD $vcxproj_path "\
57083        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57084        "/p:Configuration=\"Release Multithreaded\" "\
57085        "/p:Platform=$freetype_platform "\
57086        "/p:ConfigurationType=DynamicLibrary "\
57087        "/p:TargetName=freetype "\
57088        "/p:OutDir=\"$freetype_lib_path\" "\
57089        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57090    cmd /c freetype.bat
57091
57092    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57093      # If that succeeds we also build freetype.lib
57094      $ECHO -e "@echo off\n"\
57095          "$MSBUILD $vcxproj_path "\
57096          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57097          "/p:Configuration=\"Release Multithreaded\" "\
57098          "/p:Platform=$freetype_platform "\
57099          "/p:ConfigurationType=StaticLibrary "\
57100          "/p:TargetName=freetype "\
57101          "/p:OutDir=\"$freetype_lib_path\" "\
57102          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57103      cmd /c freetype.bat
57104
57105      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57106        # Once we build both, lib and dll, set freetype lib and include path appropriately
57107        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57108        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57109        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57110$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57111      else
57112        BUILD_FREETYPE=no
57113      fi
57114    else
57115      BUILD_FREETYPE=no
57116    fi
57117  fi
57118
57119        if test "x$BUILD_FREETYPE" = xyes; then
57120          # Okay, we built it. Check that it works.
57121
57122  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57123  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57124  METHOD="--with-freetype-src"
57125
57126  # Let's start with an optimistic view of the world :-)
57127  FOUND_FREETYPE=yes
57128
57129  # First look for the canonical freetype main include file ft2build.h.
57130  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57131    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57132    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57133    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57134      # Fail.
57135      FOUND_FREETYPE=no
57136    fi
57137  fi
57138
57139  if test "x$FOUND_FREETYPE" = xyes; then
57140    # Include file found, let's continue the sanity check.
57141    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57142$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57143
57144    # Reset to default value
57145    FREETYPE_BASE_NAME=freetype
57146    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57147    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57148      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57149          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57150        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57151        # for the .6 version explicitly.
57152        FREETYPE_BASE_NAME=freetype.6
57153        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57154        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57155$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57156      else
57157        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57158$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57159        FOUND_FREETYPE=no
57160      fi
57161    else
57162      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57163        # On Windows, we will need both .lib and .dll file.
57164        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57165          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57166$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57167          FOUND_FREETYPE=no
57168        fi
57169      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57170          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57171        # Found lib in isa dir, use that instead.
57172        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57173        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57174$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57175      fi
57176    fi
57177  fi
57178
57179  if test "x$FOUND_FREETYPE" = xyes; then
57180
57181  # Only process if variable expands to non-empty
57182
57183  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57185
57186  # Input might be given as Windows format, start by converting to
57187  # unix format.
57188  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57189  new_path=`$CYGPATH -u "$path"`
57190
57191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57194  # "foo.exe" is OK but "foo" is an error.
57195  #
57196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57197  # It is also a way to make sure we got the proper file name for the real test later on.
57198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57199  if test "x$test_shortpath" = x; then
57200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57201$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57202    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57203  fi
57204
57205  # Call helper function which possibly converts this using DOS-style short mode.
57206  # If so, the updated path is stored in $new_path.
57207
57208  input_path="$new_path"
57209  # Check if we need to convert this using DOS-style short mode. If the path
57210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57211  # take no chances and rewrite it.
57212  # Note: m4 eats our [], so we need to use [ and ] instead.
57213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57214  if test "x$has_forbidden_chars" != x; then
57215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57219      # Going to short mode and back again did indeed matter. Since short mode is
57220      # case insensitive, let's make it lowercase to improve readability.
57221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57222      # Now convert it back to Unix-style (cygpath)
57223      input_path=`$CYGPATH -u "$shortmode_path"`
57224      new_path="$input_path"
57225    fi
57226  fi
57227
57228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57229  if test "x$test_cygdrive_prefix" = x; then
57230    # As a simple fix, exclude /usr/bin since it's not a real path.
57231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57233      # a path prefixed by /cygdrive for fixpath to work.
57234      new_path="$CYGWIN_ROOT_PATH$input_path"
57235    fi
57236  fi
57237
57238
57239  if test "x$path" != "x$new_path"; then
57240    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57242$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57243  fi
57244
57245    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57246
57247  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57248  has_colon=`$ECHO $path | $GREP ^.:`
57249  new_path="$path"
57250  if test "x$has_colon" = x; then
57251    # Not in mixed or Windows style, start by that.
57252    new_path=`cmd //c echo $path`
57253  fi
57254
57255
57256  input_path="$new_path"
57257  # Check if we need to convert this using DOS-style short mode. If the path
57258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57259  # take no chances and rewrite it.
57260  # Note: m4 eats our [], so we need to use [ and ] instead.
57261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57262  if test "x$has_forbidden_chars" != x; then
57263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57265  fi
57266
57267
57268  windows_path="$new_path"
57269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57270    unix_path=`$CYGPATH -u "$windows_path"`
57271    new_path="$unix_path"
57272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57274    new_path="$unix_path"
57275  fi
57276
57277  if test "x$path" != "x$new_path"; then
57278    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57280$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57281  fi
57282
57283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57285
57286    else
57287      # We're on a unix platform. Hooray! :)
57288      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57289      has_space=`$ECHO "$path" | $GREP " "`
57290      if test "x$has_space" != x; then
57291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57292$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57293        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57294      fi
57295
57296      # Use eval to expand a potential ~
57297      eval path="$path"
57298      if test ! -f "$path" && test ! -d "$path"; then
57299        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57300      fi
57301
57302      if test -d "$path"; then
57303        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57304      else
57305        dir="`$DIRNAME "$path"`"
57306        base="`$BASENAME "$path"`"
57307        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57308      fi
57309    fi
57310  fi
57311
57312
57313  # Only process if variable expands to non-empty
57314
57315  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57317
57318  # Input might be given as Windows format, start by converting to
57319  # unix format.
57320  path="$POTENTIAL_FREETYPE_LIB_PATH"
57321  new_path=`$CYGPATH -u "$path"`
57322
57323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57326  # "foo.exe" is OK but "foo" is an error.
57327  #
57328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57329  # It is also a way to make sure we got the proper file name for the real test later on.
57330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57331  if test "x$test_shortpath" = x; then
57332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57333$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57334    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57335  fi
57336
57337  # Call helper function which possibly converts this using DOS-style short mode.
57338  # If so, the updated path is stored in $new_path.
57339
57340  input_path="$new_path"
57341  # Check if we need to convert this using DOS-style short mode. If the path
57342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57343  # take no chances and rewrite it.
57344  # Note: m4 eats our [], so we need to use [ and ] instead.
57345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57346  if test "x$has_forbidden_chars" != x; then
57347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57351      # Going to short mode and back again did indeed matter. Since short mode is
57352      # case insensitive, let's make it lowercase to improve readability.
57353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57354      # Now convert it back to Unix-style (cygpath)
57355      input_path=`$CYGPATH -u "$shortmode_path"`
57356      new_path="$input_path"
57357    fi
57358  fi
57359
57360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57361  if test "x$test_cygdrive_prefix" = x; then
57362    # As a simple fix, exclude /usr/bin since it's not a real path.
57363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57365      # a path prefixed by /cygdrive for fixpath to work.
57366      new_path="$CYGWIN_ROOT_PATH$input_path"
57367    fi
57368  fi
57369
57370
57371  if test "x$path" != "x$new_path"; then
57372    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57374$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57375  fi
57376
57377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57378
57379  path="$POTENTIAL_FREETYPE_LIB_PATH"
57380  has_colon=`$ECHO $path | $GREP ^.:`
57381  new_path="$path"
57382  if test "x$has_colon" = x; then
57383    # Not in mixed or Windows style, start by that.
57384    new_path=`cmd //c echo $path`
57385  fi
57386
57387
57388  input_path="$new_path"
57389  # Check if we need to convert this using DOS-style short mode. If the path
57390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57391  # take no chances and rewrite it.
57392  # Note: m4 eats our [], so we need to use [ and ] instead.
57393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57394  if test "x$has_forbidden_chars" != x; then
57395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57397  fi
57398
57399
57400  windows_path="$new_path"
57401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57402    unix_path=`$CYGPATH -u "$windows_path"`
57403    new_path="$unix_path"
57404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57406    new_path="$unix_path"
57407  fi
57408
57409  if test "x$path" != "x$new_path"; then
57410    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57412$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57413  fi
57414
57415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57417
57418    else
57419      # We're on a unix platform. Hooray! :)
57420      path="$POTENTIAL_FREETYPE_LIB_PATH"
57421      has_space=`$ECHO "$path" | $GREP " "`
57422      if test "x$has_space" != x; then
57423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57424$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57425        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57426      fi
57427
57428      # Use eval to expand a potential ~
57429      eval path="$path"
57430      if test ! -f "$path" && test ! -d "$path"; then
57431        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57432      fi
57433
57434      if test -d "$path"; then
57435        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57436      else
57437        dir="`$DIRNAME "$path"`"
57438        base="`$BASENAME "$path"`"
57439        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57440      fi
57441    fi
57442  fi
57443
57444
57445    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57447$as_echo_n "checking for freetype includes... " >&6; }
57448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57449$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57450    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57451    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57452$as_echo_n "checking for freetype libraries... " >&6; }
57453    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57454$as_echo "$FREETYPE_LIB_PATH" >&6; }
57455  fi
57456
57457          if test "x$FOUND_FREETYPE" != xyes; then
57458            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57459          fi
57460        else
57461          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57462$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57463          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57464        fi
57465      else
57466        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57467$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57468      fi
57469    fi
57470
57471    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57472      # User has specified settings
57473
57474      if test "x$BUNDLE_FREETYPE" = x; then
57475        # If not specified, default is to bundle freetype
57476        BUNDLE_FREETYPE=yes
57477      fi
57478
57479      if test "x$with_freetype" != x; then
57480        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57481        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57482      fi
57483
57484      # Allow --with-freetype-lib and --with-freetype-include to override
57485      if test "x$with_freetype_include" != x; then
57486        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57487      fi
57488      if test "x$with_freetype_lib" != x; then
57489        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57490      fi
57491
57492      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57493        # Okay, we got it. Check that it works.
57494
57495  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57496  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57497  METHOD="--with-freetype"
57498
57499  # Let's start with an optimistic view of the world :-)
57500  FOUND_FREETYPE=yes
57501
57502  # First look for the canonical freetype main include file ft2build.h.
57503  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57504    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57505    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57506    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57507      # Fail.
57508      FOUND_FREETYPE=no
57509    fi
57510  fi
57511
57512  if test "x$FOUND_FREETYPE" = xyes; then
57513    # Include file found, let's continue the sanity check.
57514    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57515$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57516
57517    # Reset to default value
57518    FREETYPE_BASE_NAME=freetype
57519    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57520    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57521      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57522          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57523        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57524        # for the .6 version explicitly.
57525        FREETYPE_BASE_NAME=freetype.6
57526        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57527        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57528$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57529      else
57530        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57531$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57532        FOUND_FREETYPE=no
57533      fi
57534    else
57535      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57536        # On Windows, we will need both .lib and .dll file.
57537        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57538          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57539$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57540          FOUND_FREETYPE=no
57541        fi
57542      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57543          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57544        # Found lib in isa dir, use that instead.
57545        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57546        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57547$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57548      fi
57549    fi
57550  fi
57551
57552  if test "x$FOUND_FREETYPE" = xyes; then
57553
57554  # Only process if variable expands to non-empty
57555
57556  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57557    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57558
57559  # Input might be given as Windows format, start by converting to
57560  # unix format.
57561  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57562  new_path=`$CYGPATH -u "$path"`
57563
57564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57567  # "foo.exe" is OK but "foo" is an error.
57568  #
57569  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57570  # It is also a way to make sure we got the proper file name for the real test later on.
57571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57572  if test "x$test_shortpath" = x; then
57573    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57574$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57575    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57576  fi
57577
57578  # Call helper function which possibly converts this using DOS-style short mode.
57579  # If so, the updated path is stored in $new_path.
57580
57581  input_path="$new_path"
57582  # Check if we need to convert this using DOS-style short mode. If the path
57583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57584  # take no chances and rewrite it.
57585  # Note: m4 eats our [], so we need to use [ and ] instead.
57586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57587  if test "x$has_forbidden_chars" != x; then
57588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57592      # Going to short mode and back again did indeed matter. Since short mode is
57593      # case insensitive, let's make it lowercase to improve readability.
57594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57595      # Now convert it back to Unix-style (cygpath)
57596      input_path=`$CYGPATH -u "$shortmode_path"`
57597      new_path="$input_path"
57598    fi
57599  fi
57600
57601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57602  if test "x$test_cygdrive_prefix" = x; then
57603    # As a simple fix, exclude /usr/bin since it's not a real path.
57604    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57606      # a path prefixed by /cygdrive for fixpath to work.
57607      new_path="$CYGWIN_ROOT_PATH$input_path"
57608    fi
57609  fi
57610
57611
57612  if test "x$path" != "x$new_path"; then
57613    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57615$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57616  fi
57617
57618    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57619
57620  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57621  has_colon=`$ECHO $path | $GREP ^.:`
57622  new_path="$path"
57623  if test "x$has_colon" = x; then
57624    # Not in mixed or Windows style, start by that.
57625    new_path=`cmd //c echo $path`
57626  fi
57627
57628
57629  input_path="$new_path"
57630  # Check if we need to convert this using DOS-style short mode. If the path
57631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57632  # take no chances and rewrite it.
57633  # Note: m4 eats our [], so we need to use [ and ] instead.
57634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57635  if test "x$has_forbidden_chars" != x; then
57636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57638  fi
57639
57640
57641  windows_path="$new_path"
57642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57643    unix_path=`$CYGPATH -u "$windows_path"`
57644    new_path="$unix_path"
57645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57647    new_path="$unix_path"
57648  fi
57649
57650  if test "x$path" != "x$new_path"; then
57651    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57653$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57654  fi
57655
57656  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57657  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57658
57659    else
57660      # We're on a unix platform. Hooray! :)
57661      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57662      has_space=`$ECHO "$path" | $GREP " "`
57663      if test "x$has_space" != x; then
57664        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57665$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57666        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57667      fi
57668
57669      # Use eval to expand a potential ~
57670      eval path="$path"
57671      if test ! -f "$path" && test ! -d "$path"; then
57672        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57673      fi
57674
57675      if test -d "$path"; then
57676        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57677      else
57678        dir="`$DIRNAME "$path"`"
57679        base="`$BASENAME "$path"`"
57680        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57681      fi
57682    fi
57683  fi
57684
57685
57686  # Only process if variable expands to non-empty
57687
57688  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57689    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57690
57691  # Input might be given as Windows format, start by converting to
57692  # unix format.
57693  path="$POTENTIAL_FREETYPE_LIB_PATH"
57694  new_path=`$CYGPATH -u "$path"`
57695
57696  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57697  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57698  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57699  # "foo.exe" is OK but "foo" is an error.
57700  #
57701  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57702  # It is also a way to make sure we got the proper file name for the real test later on.
57703  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57704  if test "x$test_shortpath" = x; then
57705    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57706$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57707    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57708  fi
57709
57710  # Call helper function which possibly converts this using DOS-style short mode.
57711  # If so, the updated path is stored in $new_path.
57712
57713  input_path="$new_path"
57714  # Check if we need to convert this using DOS-style short mode. If the path
57715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57716  # take no chances and rewrite it.
57717  # Note: m4 eats our [], so we need to use [ and ] instead.
57718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57719  if test "x$has_forbidden_chars" != x; then
57720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57724      # Going to short mode and back again did indeed matter. Since short mode is
57725      # case insensitive, let's make it lowercase to improve readability.
57726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57727      # Now convert it back to Unix-style (cygpath)
57728      input_path=`$CYGPATH -u "$shortmode_path"`
57729      new_path="$input_path"
57730    fi
57731  fi
57732
57733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57734  if test "x$test_cygdrive_prefix" = x; then
57735    # As a simple fix, exclude /usr/bin since it's not a real path.
57736    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57738      # a path prefixed by /cygdrive for fixpath to work.
57739      new_path="$CYGWIN_ROOT_PATH$input_path"
57740    fi
57741  fi
57742
57743
57744  if test "x$path" != "x$new_path"; then
57745    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57747$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57748  fi
57749
57750    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57751
57752  path="$POTENTIAL_FREETYPE_LIB_PATH"
57753  has_colon=`$ECHO $path | $GREP ^.:`
57754  new_path="$path"
57755  if test "x$has_colon" = x; then
57756    # Not in mixed or Windows style, start by that.
57757    new_path=`cmd //c echo $path`
57758  fi
57759
57760
57761  input_path="$new_path"
57762  # Check if we need to convert this using DOS-style short mode. If the path
57763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57764  # take no chances and rewrite it.
57765  # Note: m4 eats our [], so we need to use [ and ] instead.
57766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57767  if test "x$has_forbidden_chars" != x; then
57768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57769    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57770  fi
57771
57772
57773  windows_path="$new_path"
57774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57775    unix_path=`$CYGPATH -u "$windows_path"`
57776    new_path="$unix_path"
57777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57779    new_path="$unix_path"
57780  fi
57781
57782  if test "x$path" != "x$new_path"; then
57783    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57785$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57786  fi
57787
57788  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57789  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57790
57791    else
57792      # We're on a unix platform. Hooray! :)
57793      path="$POTENTIAL_FREETYPE_LIB_PATH"
57794      has_space=`$ECHO "$path" | $GREP " "`
57795      if test "x$has_space" != x; then
57796        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57797$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57798        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57799      fi
57800
57801      # Use eval to expand a potential ~
57802      eval path="$path"
57803      if test ! -f "$path" && test ! -d "$path"; then
57804        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57805      fi
57806
57807      if test -d "$path"; then
57808        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57809      else
57810        dir="`$DIRNAME "$path"`"
57811        base="`$BASENAME "$path"`"
57812        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57813      fi
57814    fi
57815  fi
57816
57817
57818    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57820$as_echo_n "checking for freetype includes... " >&6; }
57821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57822$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57823    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57824    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57825$as_echo_n "checking for freetype libraries... " >&6; }
57826    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57827$as_echo "$FREETYPE_LIB_PATH" >&6; }
57828  fi
57829
57830        if test "x$FOUND_FREETYPE" != xyes; then
57831          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57832        fi
57833      else
57834        # User specified only one of lib or include. This is an error.
57835        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57836          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57837$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57838          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57839        else
57840          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57841$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57842          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57843        fi
57844      fi
57845    else
57846      # User did not specify settings, but we need freetype. Try to locate it.
57847
57848      if test "x$BUNDLE_FREETYPE" = x; then
57849        # If not specified, default is to bundle freetype only on windows
57850        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57851          BUNDLE_FREETYPE=yes
57852        else
57853          BUNDLE_FREETYPE=no
57854        fi
57855      fi
57856
57857      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57858      if test "x$SYSROOT" = x; then
57859        if test "x$FOUND_FREETYPE" != xyes; then
57860          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57861          if test "x$PKG_CONFIG" != x; then
57862
57863pkg_failed=no
57864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57865$as_echo_n "checking for FREETYPE... " >&6; }
57866
57867if test -n "$FREETYPE_CFLAGS"; then
57868    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57869 elif test -n "$PKG_CONFIG"; then
57870    if test -n "$PKG_CONFIG" && \
57871    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57872  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57873  ac_status=$?
57874  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57875  test $ac_status = 0; }; then
57876  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57877else
57878  pkg_failed=yes
57879fi
57880 else
57881    pkg_failed=untried
57882fi
57883if test -n "$FREETYPE_LIBS"; then
57884    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57885 elif test -n "$PKG_CONFIG"; then
57886    if test -n "$PKG_CONFIG" && \
57887    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57888  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57889  ac_status=$?
57890  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57891  test $ac_status = 0; }; then
57892  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57893else
57894  pkg_failed=yes
57895fi
57896 else
57897    pkg_failed=untried
57898fi
57899
57900
57901
57902if test $pkg_failed = yes; then
57903
57904if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57905        _pkg_short_errors_supported=yes
57906else
57907        _pkg_short_errors_supported=no
57908fi
57909        if test $_pkg_short_errors_supported = yes; then
57910	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57911        else
57912	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57913        fi
57914	# Put the nasty error message in config.log where it belongs
57915	echo "$FREETYPE_PKG_ERRORS" >&5
57916
57917	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57918$as_echo "no" >&6; }
57919                FOUND_FREETYPE=no
57920elif test $pkg_failed = untried; then
57921	FOUND_FREETYPE=no
57922else
57923	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57924	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57925        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57926$as_echo "yes" >&6; }
57927	FOUND_FREETYPE=yes
57928fi
57929            if test "x$FOUND_FREETYPE" = xyes; then
57930              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57931              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57932              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57933              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57934                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57935              fi
57936              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57937              if test "x$BUNDLE_FREETYPE" = xyes; then
57938                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57939$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57940                FOUND_FREETYPE=no
57941              else
57942                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57943$as_echo_n "checking for freetype... " >&6; }
57944                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57945$as_echo "yes (using pkg-config)" >&6; }
57946              fi
57947            fi
57948          fi
57949        fi
57950      fi
57951
57952      if test "x$FOUND_FREETYPE" != xyes; then
57953        # Check in well-known locations
57954        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57955          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57956
57957  windows_path="$FREETYPE_BASE_DIR"
57958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57959    unix_path=`$CYGPATH -u "$windows_path"`
57960    FREETYPE_BASE_DIR="$unix_path"
57961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57963    FREETYPE_BASE_DIR="$unix_path"
57964  fi
57965
57966
57967  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57968  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57969  METHOD="well-known location"
57970
57971  # Let's start with an optimistic view of the world :-)
57972  FOUND_FREETYPE=yes
57973
57974  # First look for the canonical freetype main include file ft2build.h.
57975  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57976    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57977    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57978    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57979      # Fail.
57980      FOUND_FREETYPE=no
57981    fi
57982  fi
57983
57984  if test "x$FOUND_FREETYPE" = xyes; then
57985    # Include file found, let's continue the sanity check.
57986    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57987$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57988
57989    # Reset to default value
57990    FREETYPE_BASE_NAME=freetype
57991    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57992    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57993      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57994          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57995        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57996        # for the .6 version explicitly.
57997        FREETYPE_BASE_NAME=freetype.6
57998        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57999        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58000$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58001      else
58002        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58003$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58004        FOUND_FREETYPE=no
58005      fi
58006    else
58007      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58008        # On Windows, we will need both .lib and .dll file.
58009        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58010          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58011$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58012          FOUND_FREETYPE=no
58013        fi
58014      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58015          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58016        # Found lib in isa dir, use that instead.
58017        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58018        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58019$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58020      fi
58021    fi
58022  fi
58023
58024  if test "x$FOUND_FREETYPE" = xyes; then
58025
58026  # Only process if variable expands to non-empty
58027
58028  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58029    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58030
58031  # Input might be given as Windows format, start by converting to
58032  # unix format.
58033  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58034  new_path=`$CYGPATH -u "$path"`
58035
58036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58039  # "foo.exe" is OK but "foo" is an error.
58040  #
58041  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58042  # It is also a way to make sure we got the proper file name for the real test later on.
58043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58044  if test "x$test_shortpath" = x; then
58045    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58046$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58047    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58048  fi
58049
58050  # Call helper function which possibly converts this using DOS-style short mode.
58051  # If so, the updated path is stored in $new_path.
58052
58053  input_path="$new_path"
58054  # Check if we need to convert this using DOS-style short mode. If the path
58055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58056  # take no chances and rewrite it.
58057  # Note: m4 eats our [], so we need to use [ and ] instead.
58058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58059  if test "x$has_forbidden_chars" != x; then
58060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58064      # Going to short mode and back again did indeed matter. Since short mode is
58065      # case insensitive, let's make it lowercase to improve readability.
58066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58067      # Now convert it back to Unix-style (cygpath)
58068      input_path=`$CYGPATH -u "$shortmode_path"`
58069      new_path="$input_path"
58070    fi
58071  fi
58072
58073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58074  if test "x$test_cygdrive_prefix" = x; then
58075    # As a simple fix, exclude /usr/bin since it's not a real path.
58076    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58078      # a path prefixed by /cygdrive for fixpath to work.
58079      new_path="$CYGWIN_ROOT_PATH$input_path"
58080    fi
58081  fi
58082
58083
58084  if test "x$path" != "x$new_path"; then
58085    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58087$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58088  fi
58089
58090    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58091
58092  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58093  has_colon=`$ECHO $path | $GREP ^.:`
58094  new_path="$path"
58095  if test "x$has_colon" = x; then
58096    # Not in mixed or Windows style, start by that.
58097    new_path=`cmd //c echo $path`
58098  fi
58099
58100
58101  input_path="$new_path"
58102  # Check if we need to convert this using DOS-style short mode. If the path
58103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58104  # take no chances and rewrite it.
58105  # Note: m4 eats our [], so we need to use [ and ] instead.
58106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58107  if test "x$has_forbidden_chars" != x; then
58108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58110  fi
58111
58112
58113  windows_path="$new_path"
58114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58115    unix_path=`$CYGPATH -u "$windows_path"`
58116    new_path="$unix_path"
58117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58119    new_path="$unix_path"
58120  fi
58121
58122  if test "x$path" != "x$new_path"; then
58123    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58125$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58126  fi
58127
58128  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58129  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58130
58131    else
58132      # We're on a unix platform. Hooray! :)
58133      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58134      has_space=`$ECHO "$path" | $GREP " "`
58135      if test "x$has_space" != x; then
58136        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58137$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58138        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58139      fi
58140
58141      # Use eval to expand a potential ~
58142      eval path="$path"
58143      if test ! -f "$path" && test ! -d "$path"; then
58144        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58145      fi
58146
58147      if test -d "$path"; then
58148        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58149      else
58150        dir="`$DIRNAME "$path"`"
58151        base="`$BASENAME "$path"`"
58152        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58153      fi
58154    fi
58155  fi
58156
58157
58158  # Only process if variable expands to non-empty
58159
58160  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58161    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58162
58163  # Input might be given as Windows format, start by converting to
58164  # unix format.
58165  path="$POTENTIAL_FREETYPE_LIB_PATH"
58166  new_path=`$CYGPATH -u "$path"`
58167
58168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58171  # "foo.exe" is OK but "foo" is an error.
58172  #
58173  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58174  # It is also a way to make sure we got the proper file name for the real test later on.
58175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58176  if test "x$test_shortpath" = x; then
58177    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58178$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58179    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58180  fi
58181
58182  # Call helper function which possibly converts this using DOS-style short mode.
58183  # If so, the updated path is stored in $new_path.
58184
58185  input_path="$new_path"
58186  # Check if we need to convert this using DOS-style short mode. If the path
58187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58188  # take no chances and rewrite it.
58189  # Note: m4 eats our [], so we need to use [ and ] instead.
58190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58191  if test "x$has_forbidden_chars" != x; then
58192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58196      # Going to short mode and back again did indeed matter. Since short mode is
58197      # case insensitive, let's make it lowercase to improve readability.
58198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58199      # Now convert it back to Unix-style (cygpath)
58200      input_path=`$CYGPATH -u "$shortmode_path"`
58201      new_path="$input_path"
58202    fi
58203  fi
58204
58205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58206  if test "x$test_cygdrive_prefix" = x; then
58207    # As a simple fix, exclude /usr/bin since it's not a real path.
58208    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58210      # a path prefixed by /cygdrive for fixpath to work.
58211      new_path="$CYGWIN_ROOT_PATH$input_path"
58212    fi
58213  fi
58214
58215
58216  if test "x$path" != "x$new_path"; then
58217    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58219$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58220  fi
58221
58222    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58223
58224  path="$POTENTIAL_FREETYPE_LIB_PATH"
58225  has_colon=`$ECHO $path | $GREP ^.:`
58226  new_path="$path"
58227  if test "x$has_colon" = x; then
58228    # Not in mixed or Windows style, start by that.
58229    new_path=`cmd //c echo $path`
58230  fi
58231
58232
58233  input_path="$new_path"
58234  # Check if we need to convert this using DOS-style short mode. If the path
58235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58236  # take no chances and rewrite it.
58237  # Note: m4 eats our [], so we need to use [ and ] instead.
58238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58239  if test "x$has_forbidden_chars" != x; then
58240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58242  fi
58243
58244
58245  windows_path="$new_path"
58246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58247    unix_path=`$CYGPATH -u "$windows_path"`
58248    new_path="$unix_path"
58249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58251    new_path="$unix_path"
58252  fi
58253
58254  if test "x$path" != "x$new_path"; then
58255    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58257$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58258  fi
58259
58260  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58261  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58262
58263    else
58264      # We're on a unix platform. Hooray! :)
58265      path="$POTENTIAL_FREETYPE_LIB_PATH"
58266      has_space=`$ECHO "$path" | $GREP " "`
58267      if test "x$has_space" != x; then
58268        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58269$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58270        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58271      fi
58272
58273      # Use eval to expand a potential ~
58274      eval path="$path"
58275      if test ! -f "$path" && test ! -d "$path"; then
58276        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58277      fi
58278
58279      if test -d "$path"; then
58280        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58281      else
58282        dir="`$DIRNAME "$path"`"
58283        base="`$BASENAME "$path"`"
58284        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58285      fi
58286    fi
58287  fi
58288
58289
58290    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58291    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58292$as_echo_n "checking for freetype includes... " >&6; }
58293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58294$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58295    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58296    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58297$as_echo_n "checking for freetype libraries... " >&6; }
58298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58299$as_echo "$FREETYPE_LIB_PATH" >&6; }
58300  fi
58301
58302          if test "x$FOUND_FREETYPE" != xyes; then
58303            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58304
58305  windows_path="$FREETYPE_BASE_DIR"
58306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58307    unix_path=`$CYGPATH -u "$windows_path"`
58308    FREETYPE_BASE_DIR="$unix_path"
58309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58311    FREETYPE_BASE_DIR="$unix_path"
58312  fi
58313
58314
58315  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58316  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58317  METHOD="well-known location"
58318
58319  # Let's start with an optimistic view of the world :-)
58320  FOUND_FREETYPE=yes
58321
58322  # First look for the canonical freetype main include file ft2build.h.
58323  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58324    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58325    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58326    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58327      # Fail.
58328      FOUND_FREETYPE=no
58329    fi
58330  fi
58331
58332  if test "x$FOUND_FREETYPE" = xyes; then
58333    # Include file found, let's continue the sanity check.
58334    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58335$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58336
58337    # Reset to default value
58338    FREETYPE_BASE_NAME=freetype
58339    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58340    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58341      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58342          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58343        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58344        # for the .6 version explicitly.
58345        FREETYPE_BASE_NAME=freetype.6
58346        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58347        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58348$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58349      else
58350        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58351$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58352        FOUND_FREETYPE=no
58353      fi
58354    else
58355      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58356        # On Windows, we will need both .lib and .dll file.
58357        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58358          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58359$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58360          FOUND_FREETYPE=no
58361        fi
58362      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58363          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58364        # Found lib in isa dir, use that instead.
58365        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58366        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58367$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58368      fi
58369    fi
58370  fi
58371
58372  if test "x$FOUND_FREETYPE" = xyes; then
58373
58374  # Only process if variable expands to non-empty
58375
58376  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58377    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58378
58379  # Input might be given as Windows format, start by converting to
58380  # unix format.
58381  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58382  new_path=`$CYGPATH -u "$path"`
58383
58384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58387  # "foo.exe" is OK but "foo" is an error.
58388  #
58389  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58390  # It is also a way to make sure we got the proper file name for the real test later on.
58391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58392  if test "x$test_shortpath" = x; then
58393    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58394$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58395    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58396  fi
58397
58398  # Call helper function which possibly converts this using DOS-style short mode.
58399  # If so, the updated path is stored in $new_path.
58400
58401  input_path="$new_path"
58402  # Check if we need to convert this using DOS-style short mode. If the path
58403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58404  # take no chances and rewrite it.
58405  # Note: m4 eats our [], so we need to use [ and ] instead.
58406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58407  if test "x$has_forbidden_chars" != x; then
58408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58409    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58410    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58411    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58412      # Going to short mode and back again did indeed matter. Since short mode is
58413      # case insensitive, let's make it lowercase to improve readability.
58414      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58415      # Now convert it back to Unix-style (cygpath)
58416      input_path=`$CYGPATH -u "$shortmode_path"`
58417      new_path="$input_path"
58418    fi
58419  fi
58420
58421  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58422  if test "x$test_cygdrive_prefix" = x; then
58423    # As a simple fix, exclude /usr/bin since it's not a real path.
58424    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58425      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58426      # a path prefixed by /cygdrive for fixpath to work.
58427      new_path="$CYGWIN_ROOT_PATH$input_path"
58428    fi
58429  fi
58430
58431
58432  if test "x$path" != "x$new_path"; then
58433    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58435$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58436  fi
58437
58438    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58439
58440  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58441  has_colon=`$ECHO $path | $GREP ^.:`
58442  new_path="$path"
58443  if test "x$has_colon" = x; then
58444    # Not in mixed or Windows style, start by that.
58445    new_path=`cmd //c echo $path`
58446  fi
58447
58448
58449  input_path="$new_path"
58450  # Check if we need to convert this using DOS-style short mode. If the path
58451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58452  # take no chances and rewrite it.
58453  # Note: m4 eats our [], so we need to use [ and ] instead.
58454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58455  if test "x$has_forbidden_chars" != x; then
58456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58457    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58458  fi
58459
58460
58461  windows_path="$new_path"
58462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58463    unix_path=`$CYGPATH -u "$windows_path"`
58464    new_path="$unix_path"
58465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58467    new_path="$unix_path"
58468  fi
58469
58470  if test "x$path" != "x$new_path"; then
58471    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58473$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58474  fi
58475
58476  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58477  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58478
58479    else
58480      # We're on a unix platform. Hooray! :)
58481      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58482      has_space=`$ECHO "$path" | $GREP " "`
58483      if test "x$has_space" != x; then
58484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58485$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58486        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58487      fi
58488
58489      # Use eval to expand a potential ~
58490      eval path="$path"
58491      if test ! -f "$path" && test ! -d "$path"; then
58492        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58493      fi
58494
58495      if test -d "$path"; then
58496        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58497      else
58498        dir="`$DIRNAME "$path"`"
58499        base="`$BASENAME "$path"`"
58500        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58501      fi
58502    fi
58503  fi
58504
58505
58506  # Only process if variable expands to non-empty
58507
58508  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58509    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58510
58511  # Input might be given as Windows format, start by converting to
58512  # unix format.
58513  path="$POTENTIAL_FREETYPE_LIB_PATH"
58514  new_path=`$CYGPATH -u "$path"`
58515
58516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58519  # "foo.exe" is OK but "foo" is an error.
58520  #
58521  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58522  # It is also a way to make sure we got the proper file name for the real test later on.
58523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58524  if test "x$test_shortpath" = x; then
58525    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58526$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58527    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58528  fi
58529
58530  # Call helper function which possibly converts this using DOS-style short mode.
58531  # If so, the updated path is stored in $new_path.
58532
58533  input_path="$new_path"
58534  # Check if we need to convert this using DOS-style short mode. If the path
58535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58536  # take no chances and rewrite it.
58537  # Note: m4 eats our [], so we need to use [ and ] instead.
58538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58539  if test "x$has_forbidden_chars" != x; then
58540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58541    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58542    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58543    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58544      # Going to short mode and back again did indeed matter. Since short mode is
58545      # case insensitive, let's make it lowercase to improve readability.
58546      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58547      # Now convert it back to Unix-style (cygpath)
58548      input_path=`$CYGPATH -u "$shortmode_path"`
58549      new_path="$input_path"
58550    fi
58551  fi
58552
58553  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58554  if test "x$test_cygdrive_prefix" = x; then
58555    # As a simple fix, exclude /usr/bin since it's not a real path.
58556    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58557      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58558      # a path prefixed by /cygdrive for fixpath to work.
58559      new_path="$CYGWIN_ROOT_PATH$input_path"
58560    fi
58561  fi
58562
58563
58564  if test "x$path" != "x$new_path"; then
58565    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58567$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58568  fi
58569
58570    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58571
58572  path="$POTENTIAL_FREETYPE_LIB_PATH"
58573  has_colon=`$ECHO $path | $GREP ^.:`
58574  new_path="$path"
58575  if test "x$has_colon" = x; then
58576    # Not in mixed or Windows style, start by that.
58577    new_path=`cmd //c echo $path`
58578  fi
58579
58580
58581  input_path="$new_path"
58582  # Check if we need to convert this using DOS-style short mode. If the path
58583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58584  # take no chances and rewrite it.
58585  # Note: m4 eats our [], so we need to use [ and ] instead.
58586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58587  if test "x$has_forbidden_chars" != x; then
58588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58590  fi
58591
58592
58593  windows_path="$new_path"
58594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58595    unix_path=`$CYGPATH -u "$windows_path"`
58596    new_path="$unix_path"
58597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58599    new_path="$unix_path"
58600  fi
58601
58602  if test "x$path" != "x$new_path"; then
58603    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58605$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58606  fi
58607
58608  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58609  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58610
58611    else
58612      # We're on a unix platform. Hooray! :)
58613      path="$POTENTIAL_FREETYPE_LIB_PATH"
58614      has_space=`$ECHO "$path" | $GREP " "`
58615      if test "x$has_space" != x; then
58616        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58617$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58618        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58619      fi
58620
58621      # Use eval to expand a potential ~
58622      eval path="$path"
58623      if test ! -f "$path" && test ! -d "$path"; then
58624        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58625      fi
58626
58627      if test -d "$path"; then
58628        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58629      else
58630        dir="`$DIRNAME "$path"`"
58631        base="`$BASENAME "$path"`"
58632        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58633      fi
58634    fi
58635  fi
58636
58637
58638    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58640$as_echo_n "checking for freetype includes... " >&6; }
58641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58642$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58643    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58645$as_echo_n "checking for freetype libraries... " >&6; }
58646    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58647$as_echo "$FREETYPE_LIB_PATH" >&6; }
58648  fi
58649
58650          fi
58651          if test "x$FOUND_FREETYPE" != xyes; then
58652            FREETYPE_BASE_DIR="$HOME/freetype"
58653
58654  windows_path="$FREETYPE_BASE_DIR"
58655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58656    unix_path=`$CYGPATH -u "$windows_path"`
58657    FREETYPE_BASE_DIR="$unix_path"
58658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58660    FREETYPE_BASE_DIR="$unix_path"
58661  fi
58662
58663            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58664
58665  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58666  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58667  METHOD="well-known location"
58668
58669  # Let's start with an optimistic view of the world :-)
58670  FOUND_FREETYPE=yes
58671
58672  # First look for the canonical freetype main include file ft2build.h.
58673  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58674    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58675    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58676    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58677      # Fail.
58678      FOUND_FREETYPE=no
58679    fi
58680  fi
58681
58682  if test "x$FOUND_FREETYPE" = xyes; then
58683    # Include file found, let's continue the sanity check.
58684    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58685$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58686
58687    # Reset to default value
58688    FREETYPE_BASE_NAME=freetype
58689    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58690    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58691      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58692          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58693        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58694        # for the .6 version explicitly.
58695        FREETYPE_BASE_NAME=freetype.6
58696        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58697        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58698$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58699      else
58700        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58701$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58702        FOUND_FREETYPE=no
58703      fi
58704    else
58705      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58706        # On Windows, we will need both .lib and .dll file.
58707        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58708          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58709$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58710          FOUND_FREETYPE=no
58711        fi
58712      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58713          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58714        # Found lib in isa dir, use that instead.
58715        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58716        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58717$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58718      fi
58719    fi
58720  fi
58721
58722  if test "x$FOUND_FREETYPE" = xyes; then
58723
58724  # Only process if variable expands to non-empty
58725
58726  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58727    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58728
58729  # Input might be given as Windows format, start by converting to
58730  # unix format.
58731  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58732  new_path=`$CYGPATH -u "$path"`
58733
58734  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58735  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58736  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58737  # "foo.exe" is OK but "foo" is an error.
58738  #
58739  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58740  # It is also a way to make sure we got the proper file name for the real test later on.
58741  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58742  if test "x$test_shortpath" = x; then
58743    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58744$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58745    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58746  fi
58747
58748  # Call helper function which possibly converts this using DOS-style short mode.
58749  # If so, the updated path is stored in $new_path.
58750
58751  input_path="$new_path"
58752  # Check if we need to convert this using DOS-style short mode. If the path
58753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58754  # take no chances and rewrite it.
58755  # Note: m4 eats our [], so we need to use [ and ] instead.
58756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58757  if test "x$has_forbidden_chars" != x; then
58758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58762      # Going to short mode and back again did indeed matter. Since short mode is
58763      # case insensitive, let's make it lowercase to improve readability.
58764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58765      # Now convert it back to Unix-style (cygpath)
58766      input_path=`$CYGPATH -u "$shortmode_path"`
58767      new_path="$input_path"
58768    fi
58769  fi
58770
58771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58772  if test "x$test_cygdrive_prefix" = x; then
58773    # As a simple fix, exclude /usr/bin since it's not a real path.
58774    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58776      # a path prefixed by /cygdrive for fixpath to work.
58777      new_path="$CYGWIN_ROOT_PATH$input_path"
58778    fi
58779  fi
58780
58781
58782  if test "x$path" != "x$new_path"; then
58783    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58785$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58786  fi
58787
58788    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58789
58790  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58791  has_colon=`$ECHO $path | $GREP ^.:`
58792  new_path="$path"
58793  if test "x$has_colon" = x; then
58794    # Not in mixed or Windows style, start by that.
58795    new_path=`cmd //c echo $path`
58796  fi
58797
58798
58799  input_path="$new_path"
58800  # Check if we need to convert this using DOS-style short mode. If the path
58801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58802  # take no chances and rewrite it.
58803  # Note: m4 eats our [], so we need to use [ and ] instead.
58804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58805  if test "x$has_forbidden_chars" != x; then
58806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58807    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58808  fi
58809
58810
58811  windows_path="$new_path"
58812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58813    unix_path=`$CYGPATH -u "$windows_path"`
58814    new_path="$unix_path"
58815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58817    new_path="$unix_path"
58818  fi
58819
58820  if test "x$path" != "x$new_path"; then
58821    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58823$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58824  fi
58825
58826  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58827  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58828
58829    else
58830      # We're on a unix platform. Hooray! :)
58831      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58832      has_space=`$ECHO "$path" | $GREP " "`
58833      if test "x$has_space" != x; then
58834        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58835$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58836        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58837      fi
58838
58839      # Use eval to expand a potential ~
58840      eval path="$path"
58841      if test ! -f "$path" && test ! -d "$path"; then
58842        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58843      fi
58844
58845      if test -d "$path"; then
58846        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58847      else
58848        dir="`$DIRNAME "$path"`"
58849        base="`$BASENAME "$path"`"
58850        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58851      fi
58852    fi
58853  fi
58854
58855
58856  # Only process if variable expands to non-empty
58857
58858  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58860
58861  # Input might be given as Windows format, start by converting to
58862  # unix format.
58863  path="$POTENTIAL_FREETYPE_LIB_PATH"
58864  new_path=`$CYGPATH -u "$path"`
58865
58866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58869  # "foo.exe" is OK but "foo" is an error.
58870  #
58871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58872  # It is also a way to make sure we got the proper file name for the real test later on.
58873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58874  if test "x$test_shortpath" = x; then
58875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58876$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58877    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58878  fi
58879
58880  # Call helper function which possibly converts this using DOS-style short mode.
58881  # If so, the updated path is stored in $new_path.
58882
58883  input_path="$new_path"
58884  # Check if we need to convert this using DOS-style short mode. If the path
58885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58886  # take no chances and rewrite it.
58887  # Note: m4 eats our [], so we need to use [ and ] instead.
58888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58889  if test "x$has_forbidden_chars" != x; then
58890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58894      # Going to short mode and back again did indeed matter. Since short mode is
58895      # case insensitive, let's make it lowercase to improve readability.
58896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58897      # Now convert it back to Unix-style (cygpath)
58898      input_path=`$CYGPATH -u "$shortmode_path"`
58899      new_path="$input_path"
58900    fi
58901  fi
58902
58903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58904  if test "x$test_cygdrive_prefix" = x; then
58905    # As a simple fix, exclude /usr/bin since it's not a real path.
58906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58908      # a path prefixed by /cygdrive for fixpath to work.
58909      new_path="$CYGWIN_ROOT_PATH$input_path"
58910    fi
58911  fi
58912
58913
58914  if test "x$path" != "x$new_path"; then
58915    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58917$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58918  fi
58919
58920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58921
58922  path="$POTENTIAL_FREETYPE_LIB_PATH"
58923  has_colon=`$ECHO $path | $GREP ^.:`
58924  new_path="$path"
58925  if test "x$has_colon" = x; then
58926    # Not in mixed or Windows style, start by that.
58927    new_path=`cmd //c echo $path`
58928  fi
58929
58930
58931  input_path="$new_path"
58932  # Check if we need to convert this using DOS-style short mode. If the path
58933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58934  # take no chances and rewrite it.
58935  # Note: m4 eats our [], so we need to use [ and ] instead.
58936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58937  if test "x$has_forbidden_chars" != x; then
58938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58940  fi
58941
58942
58943  windows_path="$new_path"
58944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58945    unix_path=`$CYGPATH -u "$windows_path"`
58946    new_path="$unix_path"
58947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58949    new_path="$unix_path"
58950  fi
58951
58952  if test "x$path" != "x$new_path"; then
58953    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58955$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58956  fi
58957
58958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58960
58961    else
58962      # We're on a unix platform. Hooray! :)
58963      path="$POTENTIAL_FREETYPE_LIB_PATH"
58964      has_space=`$ECHO "$path" | $GREP " "`
58965      if test "x$has_space" != x; then
58966        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58967$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58968        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58969      fi
58970
58971      # Use eval to expand a potential ~
58972      eval path="$path"
58973      if test ! -f "$path" && test ! -d "$path"; then
58974        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58975      fi
58976
58977      if test -d "$path"; then
58978        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58979      else
58980        dir="`$DIRNAME "$path"`"
58981        base="`$BASENAME "$path"`"
58982        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58983      fi
58984    fi
58985  fi
58986
58987
58988    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58989    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58990$as_echo_n "checking for freetype includes... " >&6; }
58991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58992$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58993    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58995$as_echo_n "checking for freetype libraries... " >&6; }
58996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58997$as_echo "$FREETYPE_LIB_PATH" >&6; }
58998  fi
58999
59000            else
59001
59002  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59003  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59004  METHOD="well-known location"
59005
59006  # Let's start with an optimistic view of the world :-)
59007  FOUND_FREETYPE=yes
59008
59009  # First look for the canonical freetype main include file ft2build.h.
59010  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59011    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59012    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59013    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59014      # Fail.
59015      FOUND_FREETYPE=no
59016    fi
59017  fi
59018
59019  if test "x$FOUND_FREETYPE" = xyes; then
59020    # Include file found, let's continue the sanity check.
59021    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59022$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59023
59024    # Reset to default value
59025    FREETYPE_BASE_NAME=freetype
59026    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59027    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59028      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59029          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59030        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59031        # for the .6 version explicitly.
59032        FREETYPE_BASE_NAME=freetype.6
59033        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59034        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59035$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59036      else
59037        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59038$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59039        FOUND_FREETYPE=no
59040      fi
59041    else
59042      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59043        # On Windows, we will need both .lib and .dll file.
59044        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59045          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59046$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59047          FOUND_FREETYPE=no
59048        fi
59049      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59050          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59051        # Found lib in isa dir, use that instead.
59052        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59053        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59054$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59055      fi
59056    fi
59057  fi
59058
59059  if test "x$FOUND_FREETYPE" = xyes; then
59060
59061  # Only process if variable expands to non-empty
59062
59063  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59065
59066  # Input might be given as Windows format, start by converting to
59067  # unix format.
59068  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59069  new_path=`$CYGPATH -u "$path"`
59070
59071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59074  # "foo.exe" is OK but "foo" is an error.
59075  #
59076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59077  # It is also a way to make sure we got the proper file name for the real test later on.
59078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59079  if test "x$test_shortpath" = x; then
59080    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59081$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59082    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59083  fi
59084
59085  # Call helper function which possibly converts this using DOS-style short mode.
59086  # If so, the updated path is stored in $new_path.
59087
59088  input_path="$new_path"
59089  # Check if we need to convert this using DOS-style short mode. If the path
59090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59091  # take no chances and rewrite it.
59092  # Note: m4 eats our [], so we need to use [ and ] instead.
59093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59094  if test "x$has_forbidden_chars" != x; then
59095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59099      # Going to short mode and back again did indeed matter. Since short mode is
59100      # case insensitive, let's make it lowercase to improve readability.
59101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59102      # Now convert it back to Unix-style (cygpath)
59103      input_path=`$CYGPATH -u "$shortmode_path"`
59104      new_path="$input_path"
59105    fi
59106  fi
59107
59108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59109  if test "x$test_cygdrive_prefix" = x; then
59110    # As a simple fix, exclude /usr/bin since it's not a real path.
59111    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59113      # a path prefixed by /cygdrive for fixpath to work.
59114      new_path="$CYGWIN_ROOT_PATH$input_path"
59115    fi
59116  fi
59117
59118
59119  if test "x$path" != "x$new_path"; then
59120    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59122$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59123  fi
59124
59125    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59126
59127  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59128  has_colon=`$ECHO $path | $GREP ^.:`
59129  new_path="$path"
59130  if test "x$has_colon" = x; then
59131    # Not in mixed or Windows style, start by that.
59132    new_path=`cmd //c echo $path`
59133  fi
59134
59135
59136  input_path="$new_path"
59137  # Check if we need to convert this using DOS-style short mode. If the path
59138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59139  # take no chances and rewrite it.
59140  # Note: m4 eats our [], so we need to use [ and ] instead.
59141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59142  if test "x$has_forbidden_chars" != x; then
59143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59145  fi
59146
59147
59148  windows_path="$new_path"
59149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59150    unix_path=`$CYGPATH -u "$windows_path"`
59151    new_path="$unix_path"
59152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59154    new_path="$unix_path"
59155  fi
59156
59157  if test "x$path" != "x$new_path"; then
59158    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59160$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59161  fi
59162
59163  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59164  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59165
59166    else
59167      # We're on a unix platform. Hooray! :)
59168      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59169      has_space=`$ECHO "$path" | $GREP " "`
59170      if test "x$has_space" != x; then
59171        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59172$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59173        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59174      fi
59175
59176      # Use eval to expand a potential ~
59177      eval path="$path"
59178      if test ! -f "$path" && test ! -d "$path"; then
59179        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59180      fi
59181
59182      if test -d "$path"; then
59183        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59184      else
59185        dir="`$DIRNAME "$path"`"
59186        base="`$BASENAME "$path"`"
59187        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59188      fi
59189    fi
59190  fi
59191
59192
59193  # Only process if variable expands to non-empty
59194
59195  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59197
59198  # Input might be given as Windows format, start by converting to
59199  # unix format.
59200  path="$POTENTIAL_FREETYPE_LIB_PATH"
59201  new_path=`$CYGPATH -u "$path"`
59202
59203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59206  # "foo.exe" is OK but "foo" is an error.
59207  #
59208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59209  # It is also a way to make sure we got the proper file name for the real test later on.
59210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59211  if test "x$test_shortpath" = x; then
59212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59213$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59214    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59215  fi
59216
59217  # Call helper function which possibly converts this using DOS-style short mode.
59218  # If so, the updated path is stored in $new_path.
59219
59220  input_path="$new_path"
59221  # Check if we need to convert this using DOS-style short mode. If the path
59222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59223  # take no chances and rewrite it.
59224  # Note: m4 eats our [], so we need to use [ and ] instead.
59225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59226  if test "x$has_forbidden_chars" != x; then
59227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59231      # Going to short mode and back again did indeed matter. Since short mode is
59232      # case insensitive, let's make it lowercase to improve readability.
59233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59234      # Now convert it back to Unix-style (cygpath)
59235      input_path=`$CYGPATH -u "$shortmode_path"`
59236      new_path="$input_path"
59237    fi
59238  fi
59239
59240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59241  if test "x$test_cygdrive_prefix" = x; then
59242    # As a simple fix, exclude /usr/bin since it's not a real path.
59243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59245      # a path prefixed by /cygdrive for fixpath to work.
59246      new_path="$CYGWIN_ROOT_PATH$input_path"
59247    fi
59248  fi
59249
59250
59251  if test "x$path" != "x$new_path"; then
59252    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59254$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59255  fi
59256
59257    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59258
59259  path="$POTENTIAL_FREETYPE_LIB_PATH"
59260  has_colon=`$ECHO $path | $GREP ^.:`
59261  new_path="$path"
59262  if test "x$has_colon" = x; then
59263    # Not in mixed or Windows style, start by that.
59264    new_path=`cmd //c echo $path`
59265  fi
59266
59267
59268  input_path="$new_path"
59269  # Check if we need to convert this using DOS-style short mode. If the path
59270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59271  # take no chances and rewrite it.
59272  # Note: m4 eats our [], so we need to use [ and ] instead.
59273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59274  if test "x$has_forbidden_chars" != x; then
59275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59277  fi
59278
59279
59280  windows_path="$new_path"
59281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59282    unix_path=`$CYGPATH -u "$windows_path"`
59283    new_path="$unix_path"
59284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59286    new_path="$unix_path"
59287  fi
59288
59289  if test "x$path" != "x$new_path"; then
59290    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59292$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59293  fi
59294
59295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59297
59298    else
59299      # We're on a unix platform. Hooray! :)
59300      path="$POTENTIAL_FREETYPE_LIB_PATH"
59301      has_space=`$ECHO "$path" | $GREP " "`
59302      if test "x$has_space" != x; then
59303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59304$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59305        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59306      fi
59307
59308      # Use eval to expand a potential ~
59309      eval path="$path"
59310      if test ! -f "$path" && test ! -d "$path"; then
59311        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59312      fi
59313
59314      if test -d "$path"; then
59315        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59316      else
59317        dir="`$DIRNAME "$path"`"
59318        base="`$BASENAME "$path"`"
59319        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59320      fi
59321    fi
59322  fi
59323
59324
59325    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59327$as_echo_n "checking for freetype includes... " >&6; }
59328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59329$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59330    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59332$as_echo_n "checking for freetype libraries... " >&6; }
59333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59334$as_echo "$FREETYPE_LIB_PATH" >&6; }
59335  fi
59336
59337            fi
59338            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59339                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59340              # Source is available, as a last resort try to build freetype in default location
59341
59342  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59343  BUILD_FREETYPE=yes
59344
59345  # Check if the freetype sources are acessible..
59346  if ! test -d $FREETYPE_SRC_PATH; then
59347    { $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
59348$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59349    BUILD_FREETYPE=no
59350  fi
59351  # ..and contain a vc2010 project file
59352  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59353  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59354    { $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
59355$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59356    BUILD_FREETYPE=no
59357  fi
59358  # Now check if configure found a version of 'msbuild.exe'
59359  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59360    { $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
59361$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;}
59362    BUILD_FREETYPE=no
59363  fi
59364
59365  # Ready to go..
59366  if test "x$BUILD_FREETYPE" = xyes; then
59367    # msbuild requires trailing slashes for output directories
59368    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59369    freetype_lib_path_unix="$freetype_lib_path"
59370    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59371
59372  unix_path="$vcxproj_path"
59373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59374    windows_path=`$CYGPATH -m "$unix_path"`
59375    vcxproj_path="$windows_path"
59376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59377    windows_path=`cmd //c echo $unix_path`
59378    vcxproj_path="$windows_path"
59379  fi
59380
59381
59382  unix_path="$freetype_lib_path"
59383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59384    windows_path=`$CYGPATH -m "$unix_path"`
59385    freetype_lib_path="$windows_path"
59386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59387    windows_path=`cmd //c echo $unix_path`
59388    freetype_lib_path="$windows_path"
59389  fi
59390
59391
59392  unix_path="$freetype_obj_path"
59393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59394    windows_path=`$CYGPATH -m "$unix_path"`
59395    freetype_obj_path="$windows_path"
59396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59397    windows_path=`cmd //c echo $unix_path`
59398    freetype_obj_path="$windows_path"
59399  fi
59400
59401    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59402      freetype_platform=x64
59403    else
59404      freetype_platform=win32
59405    fi
59406
59407    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59408    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59409    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59410    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59411    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59412$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59413
59414    # First we try to build the freetype.dll
59415    $ECHO -e "@echo off\n"\
59416        "$MSBUILD $vcxproj_path "\
59417        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59418        "/p:Configuration=\"Release Multithreaded\" "\
59419        "/p:Platform=$freetype_platform "\
59420        "/p:ConfigurationType=DynamicLibrary "\
59421        "/p:TargetName=freetype "\
59422        "/p:OutDir=\"$freetype_lib_path\" "\
59423        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59424    cmd /c freetype.bat
59425
59426    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59427      # If that succeeds we also build freetype.lib
59428      $ECHO -e "@echo off\n"\
59429          "$MSBUILD $vcxproj_path "\
59430          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59431          "/p:Configuration=\"Release Multithreaded\" "\
59432          "/p:Platform=$freetype_platform "\
59433          "/p:ConfigurationType=StaticLibrary "\
59434          "/p:TargetName=freetype "\
59435          "/p:OutDir=\"$freetype_lib_path\" "\
59436          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59437      cmd /c freetype.bat
59438
59439      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59440        # Once we build both, lib and dll, set freetype lib and include path appropriately
59441        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59442        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59443        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59444$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59445      else
59446        BUILD_FREETYPE=no
59447      fi
59448    else
59449      BUILD_FREETYPE=no
59450    fi
59451  fi
59452
59453              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59454
59455  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59456  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59457  METHOD="well-known location"
59458
59459  # Let's start with an optimistic view of the world :-)
59460  FOUND_FREETYPE=yes
59461
59462  # First look for the canonical freetype main include file ft2build.h.
59463  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59464    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59465    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59466    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59467      # Fail.
59468      FOUND_FREETYPE=no
59469    fi
59470  fi
59471
59472  if test "x$FOUND_FREETYPE" = xyes; then
59473    # Include file found, let's continue the sanity check.
59474    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59475$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59476
59477    # Reset to default value
59478    FREETYPE_BASE_NAME=freetype
59479    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59480    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59481      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59482          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59483        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59484        # for the .6 version explicitly.
59485        FREETYPE_BASE_NAME=freetype.6
59486        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59487        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59488$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59489      else
59490        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59491$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59492        FOUND_FREETYPE=no
59493      fi
59494    else
59495      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59496        # On Windows, we will need both .lib and .dll file.
59497        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59498          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59499$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59500          FOUND_FREETYPE=no
59501        fi
59502      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59503          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59504        # Found lib in isa dir, use that instead.
59505        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59506        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59507$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59508      fi
59509    fi
59510  fi
59511
59512  if test "x$FOUND_FREETYPE" = xyes; then
59513
59514  # Only process if variable expands to non-empty
59515
59516  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59517    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59518
59519  # Input might be given as Windows format, start by converting to
59520  # unix format.
59521  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59522  new_path=`$CYGPATH -u "$path"`
59523
59524  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59525  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59526  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59527  # "foo.exe" is OK but "foo" is an error.
59528  #
59529  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59530  # It is also a way to make sure we got the proper file name for the real test later on.
59531  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59532  if test "x$test_shortpath" = x; then
59533    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59534$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59535    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59536  fi
59537
59538  # Call helper function which possibly converts this using DOS-style short mode.
59539  # If so, the updated path is stored in $new_path.
59540
59541  input_path="$new_path"
59542  # Check if we need to convert this using DOS-style short mode. If the path
59543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59544  # take no chances and rewrite it.
59545  # Note: m4 eats our [], so we need to use [ and ] instead.
59546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59547  if test "x$has_forbidden_chars" != x; then
59548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59552      # Going to short mode and back again did indeed matter. Since short mode is
59553      # case insensitive, let's make it lowercase to improve readability.
59554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59555      # Now convert it back to Unix-style (cygpath)
59556      input_path=`$CYGPATH -u "$shortmode_path"`
59557      new_path="$input_path"
59558    fi
59559  fi
59560
59561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59562  if test "x$test_cygdrive_prefix" = x; then
59563    # As a simple fix, exclude /usr/bin since it's not a real path.
59564    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59566      # a path prefixed by /cygdrive for fixpath to work.
59567      new_path="$CYGWIN_ROOT_PATH$input_path"
59568    fi
59569  fi
59570
59571
59572  if test "x$path" != "x$new_path"; then
59573    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59575$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59576  fi
59577
59578    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59579
59580  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59581  has_colon=`$ECHO $path | $GREP ^.:`
59582  new_path="$path"
59583  if test "x$has_colon" = x; then
59584    # Not in mixed or Windows style, start by that.
59585    new_path=`cmd //c echo $path`
59586  fi
59587
59588
59589  input_path="$new_path"
59590  # Check if we need to convert this using DOS-style short mode. If the path
59591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59592  # take no chances and rewrite it.
59593  # Note: m4 eats our [], so we need to use [ and ] instead.
59594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59595  if test "x$has_forbidden_chars" != x; then
59596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59597    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59598  fi
59599
59600
59601  windows_path="$new_path"
59602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59603    unix_path=`$CYGPATH -u "$windows_path"`
59604    new_path="$unix_path"
59605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59607    new_path="$unix_path"
59608  fi
59609
59610  if test "x$path" != "x$new_path"; then
59611    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59613$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59614  fi
59615
59616  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59617  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59618
59619    else
59620      # We're on a unix platform. Hooray! :)
59621      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59622      has_space=`$ECHO "$path" | $GREP " "`
59623      if test "x$has_space" != x; then
59624        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59625$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59626        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59627      fi
59628
59629      # Use eval to expand a potential ~
59630      eval path="$path"
59631      if test ! -f "$path" && test ! -d "$path"; then
59632        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59633      fi
59634
59635      if test -d "$path"; then
59636        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59637      else
59638        dir="`$DIRNAME "$path"`"
59639        base="`$BASENAME "$path"`"
59640        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59641      fi
59642    fi
59643  fi
59644
59645
59646  # Only process if variable expands to non-empty
59647
59648  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59649    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59650
59651  # Input might be given as Windows format, start by converting to
59652  # unix format.
59653  path="$POTENTIAL_FREETYPE_LIB_PATH"
59654  new_path=`$CYGPATH -u "$path"`
59655
59656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59659  # "foo.exe" is OK but "foo" is an error.
59660  #
59661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59662  # It is also a way to make sure we got the proper file name for the real test later on.
59663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59664  if test "x$test_shortpath" = x; then
59665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59666$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59667    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59668  fi
59669
59670  # Call helper function which possibly converts this using DOS-style short mode.
59671  # If so, the updated path is stored in $new_path.
59672
59673  input_path="$new_path"
59674  # Check if we need to convert this using DOS-style short mode. If the path
59675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59676  # take no chances and rewrite it.
59677  # Note: m4 eats our [], so we need to use [ and ] instead.
59678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59679  if test "x$has_forbidden_chars" != x; then
59680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59684      # Going to short mode and back again did indeed matter. Since short mode is
59685      # case insensitive, let's make it lowercase to improve readability.
59686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59687      # Now convert it back to Unix-style (cygpath)
59688      input_path=`$CYGPATH -u "$shortmode_path"`
59689      new_path="$input_path"
59690    fi
59691  fi
59692
59693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59694  if test "x$test_cygdrive_prefix" = x; then
59695    # As a simple fix, exclude /usr/bin since it's not a real path.
59696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59698      # a path prefixed by /cygdrive for fixpath to work.
59699      new_path="$CYGWIN_ROOT_PATH$input_path"
59700    fi
59701  fi
59702
59703
59704  if test "x$path" != "x$new_path"; then
59705    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59707$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59708  fi
59709
59710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59711
59712  path="$POTENTIAL_FREETYPE_LIB_PATH"
59713  has_colon=`$ECHO $path | $GREP ^.:`
59714  new_path="$path"
59715  if test "x$has_colon" = x; then
59716    # Not in mixed or Windows style, start by that.
59717    new_path=`cmd //c echo $path`
59718  fi
59719
59720
59721  input_path="$new_path"
59722  # Check if we need to convert this using DOS-style short mode. If the path
59723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59724  # take no chances and rewrite it.
59725  # Note: m4 eats our [], so we need to use [ and ] instead.
59726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59727  if test "x$has_forbidden_chars" != x; then
59728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59730  fi
59731
59732
59733  windows_path="$new_path"
59734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59735    unix_path=`$CYGPATH -u "$windows_path"`
59736    new_path="$unix_path"
59737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59739    new_path="$unix_path"
59740  fi
59741
59742  if test "x$path" != "x$new_path"; then
59743    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59745$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59746  fi
59747
59748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59750
59751    else
59752      # We're on a unix platform. Hooray! :)
59753      path="$POTENTIAL_FREETYPE_LIB_PATH"
59754      has_space=`$ECHO "$path" | $GREP " "`
59755      if test "x$has_space" != x; then
59756        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59757$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59758        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59759      fi
59760
59761      # Use eval to expand a potential ~
59762      eval path="$path"
59763      if test ! -f "$path" && test ! -d "$path"; then
59764        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59765      fi
59766
59767      if test -d "$path"; then
59768        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59769      else
59770        dir="`$DIRNAME "$path"`"
59771        base="`$BASENAME "$path"`"
59772        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59773      fi
59774    fi
59775  fi
59776
59777
59778    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59779    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59780$as_echo_n "checking for freetype includes... " >&6; }
59781    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59782$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59783    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59785$as_echo_n "checking for freetype libraries... " >&6; }
59786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59787$as_echo "$FREETYPE_LIB_PATH" >&6; }
59788  fi
59789
59790              else
59791
59792  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59793  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59794  METHOD="well-known location"
59795
59796  # Let's start with an optimistic view of the world :-)
59797  FOUND_FREETYPE=yes
59798
59799  # First look for the canonical freetype main include file ft2build.h.
59800  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59801    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59802    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59803    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59804      # Fail.
59805      FOUND_FREETYPE=no
59806    fi
59807  fi
59808
59809  if test "x$FOUND_FREETYPE" = xyes; then
59810    # Include file found, let's continue the sanity check.
59811    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59812$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59813
59814    # Reset to default value
59815    FREETYPE_BASE_NAME=freetype
59816    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59817    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59818      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59819          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59820        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59821        # for the .6 version explicitly.
59822        FREETYPE_BASE_NAME=freetype.6
59823        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59824        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59825$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59826      else
59827        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59828$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59829        FOUND_FREETYPE=no
59830      fi
59831    else
59832      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59833        # On Windows, we will need both .lib and .dll file.
59834        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59835          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59836$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59837          FOUND_FREETYPE=no
59838        fi
59839      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59840          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59841        # Found lib in isa dir, use that instead.
59842        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59843        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59844$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59845      fi
59846    fi
59847  fi
59848
59849  if test "x$FOUND_FREETYPE" = xyes; then
59850
59851  # Only process if variable expands to non-empty
59852
59853  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59854    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59855
59856  # Input might be given as Windows format, start by converting to
59857  # unix format.
59858  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59859  new_path=`$CYGPATH -u "$path"`
59860
59861  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59862  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59863  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59864  # "foo.exe" is OK but "foo" is an error.
59865  #
59866  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59867  # It is also a way to make sure we got the proper file name for the real test later on.
59868  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59869  if test "x$test_shortpath" = x; then
59870    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59871$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59872    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59873  fi
59874
59875  # Call helper function which possibly converts this using DOS-style short mode.
59876  # If so, the updated path is stored in $new_path.
59877
59878  input_path="$new_path"
59879  # Check if we need to convert this using DOS-style short mode. If the path
59880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59881  # take no chances and rewrite it.
59882  # Note: m4 eats our [], so we need to use [ and ] instead.
59883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59884  if test "x$has_forbidden_chars" != x; then
59885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59889      # Going to short mode and back again did indeed matter. Since short mode is
59890      # case insensitive, let's make it lowercase to improve readability.
59891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59892      # Now convert it back to Unix-style (cygpath)
59893      input_path=`$CYGPATH -u "$shortmode_path"`
59894      new_path="$input_path"
59895    fi
59896  fi
59897
59898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59899  if test "x$test_cygdrive_prefix" = x; then
59900    # As a simple fix, exclude /usr/bin since it's not a real path.
59901    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59903      # a path prefixed by /cygdrive for fixpath to work.
59904      new_path="$CYGWIN_ROOT_PATH$input_path"
59905    fi
59906  fi
59907
59908
59909  if test "x$path" != "x$new_path"; then
59910    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59912$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59913  fi
59914
59915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59916
59917  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59918  has_colon=`$ECHO $path | $GREP ^.:`
59919  new_path="$path"
59920  if test "x$has_colon" = x; then
59921    # Not in mixed or Windows style, start by that.
59922    new_path=`cmd //c echo $path`
59923  fi
59924
59925
59926  input_path="$new_path"
59927  # Check if we need to convert this using DOS-style short mode. If the path
59928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59929  # take no chances and rewrite it.
59930  # Note: m4 eats our [], so we need to use [ and ] instead.
59931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59932  if test "x$has_forbidden_chars" != x; then
59933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59935  fi
59936
59937
59938  windows_path="$new_path"
59939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59940    unix_path=`$CYGPATH -u "$windows_path"`
59941    new_path="$unix_path"
59942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59944    new_path="$unix_path"
59945  fi
59946
59947  if test "x$path" != "x$new_path"; then
59948    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59950$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59951  fi
59952
59953  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59954  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59955
59956    else
59957      # We're on a unix platform. Hooray! :)
59958      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59959      has_space=`$ECHO "$path" | $GREP " "`
59960      if test "x$has_space" != x; then
59961        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59962$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59963        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59964      fi
59965
59966      # Use eval to expand a potential ~
59967      eval path="$path"
59968      if test ! -f "$path" && test ! -d "$path"; then
59969        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59970      fi
59971
59972      if test -d "$path"; then
59973        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59974      else
59975        dir="`$DIRNAME "$path"`"
59976        base="`$BASENAME "$path"`"
59977        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59978      fi
59979    fi
59980  fi
59981
59982
59983  # Only process if variable expands to non-empty
59984
59985  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59986    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59987
59988  # Input might be given as Windows format, start by converting to
59989  # unix format.
59990  path="$POTENTIAL_FREETYPE_LIB_PATH"
59991  new_path=`$CYGPATH -u "$path"`
59992
59993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59996  # "foo.exe" is OK but "foo" is an error.
59997  #
59998  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59999  # It is also a way to make sure we got the proper file name for the real test later on.
60000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60001  if test "x$test_shortpath" = x; then
60002    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60003$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60004    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60005  fi
60006
60007  # Call helper function which possibly converts this using DOS-style short mode.
60008  # If so, the updated path is stored in $new_path.
60009
60010  input_path="$new_path"
60011  # Check if we need to convert this using DOS-style short mode. If the path
60012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60013  # take no chances and rewrite it.
60014  # Note: m4 eats our [], so we need to use [ and ] instead.
60015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60016  if test "x$has_forbidden_chars" != x; then
60017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60018    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60019    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60020    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60021      # Going to short mode and back again did indeed matter. Since short mode is
60022      # case insensitive, let's make it lowercase to improve readability.
60023      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60024      # Now convert it back to Unix-style (cygpath)
60025      input_path=`$CYGPATH -u "$shortmode_path"`
60026      new_path="$input_path"
60027    fi
60028  fi
60029
60030  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60031  if test "x$test_cygdrive_prefix" = x; then
60032    # As a simple fix, exclude /usr/bin since it's not a real path.
60033    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60034      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60035      # a path prefixed by /cygdrive for fixpath to work.
60036      new_path="$CYGWIN_ROOT_PATH$input_path"
60037    fi
60038  fi
60039
60040
60041  if test "x$path" != "x$new_path"; then
60042    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60044$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60045  fi
60046
60047    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60048
60049  path="$POTENTIAL_FREETYPE_LIB_PATH"
60050  has_colon=`$ECHO $path | $GREP ^.:`
60051  new_path="$path"
60052  if test "x$has_colon" = x; then
60053    # Not in mixed or Windows style, start by that.
60054    new_path=`cmd //c echo $path`
60055  fi
60056
60057
60058  input_path="$new_path"
60059  # Check if we need to convert this using DOS-style short mode. If the path
60060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60061  # take no chances and rewrite it.
60062  # Note: m4 eats our [], so we need to use [ and ] instead.
60063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60064  if test "x$has_forbidden_chars" != x; then
60065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60067  fi
60068
60069
60070  windows_path="$new_path"
60071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60072    unix_path=`$CYGPATH -u "$windows_path"`
60073    new_path="$unix_path"
60074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60076    new_path="$unix_path"
60077  fi
60078
60079  if test "x$path" != "x$new_path"; then
60080    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60082$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60083  fi
60084
60085  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60086  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60087
60088    else
60089      # We're on a unix platform. Hooray! :)
60090      path="$POTENTIAL_FREETYPE_LIB_PATH"
60091      has_space=`$ECHO "$path" | $GREP " "`
60092      if test "x$has_space" != x; then
60093        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60094$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60095        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60096      fi
60097
60098      # Use eval to expand a potential ~
60099      eval path="$path"
60100      if test ! -f "$path" && test ! -d "$path"; then
60101        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60102      fi
60103
60104      if test -d "$path"; then
60105        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60106      else
60107        dir="`$DIRNAME "$path"`"
60108        base="`$BASENAME "$path"`"
60109        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60110      fi
60111    fi
60112  fi
60113
60114
60115    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60117$as_echo_n "checking for freetype includes... " >&6; }
60118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60119$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60120    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60121    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60122$as_echo_n "checking for freetype libraries... " >&6; }
60123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60124$as_echo "$FREETYPE_LIB_PATH" >&6; }
60125  fi
60126
60127              fi
60128            fi
60129          fi
60130        else
60131          FREETYPE_BASE_DIR="$SYSROOT/usr"
60132
60133  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60134  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60135  METHOD="well-known location"
60136
60137  # Let's start with an optimistic view of the world :-)
60138  FOUND_FREETYPE=yes
60139
60140  # First look for the canonical freetype main include file ft2build.h.
60141  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60142    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60143    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60144    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60145      # Fail.
60146      FOUND_FREETYPE=no
60147    fi
60148  fi
60149
60150  if test "x$FOUND_FREETYPE" = xyes; then
60151    # Include file found, let's continue the sanity check.
60152    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60153$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60154
60155    # Reset to default value
60156    FREETYPE_BASE_NAME=freetype
60157    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60158    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60159      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60160          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60161        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60162        # for the .6 version explicitly.
60163        FREETYPE_BASE_NAME=freetype.6
60164        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60165        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60166$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60167      else
60168        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60169$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60170        FOUND_FREETYPE=no
60171      fi
60172    else
60173      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60174        # On Windows, we will need both .lib and .dll file.
60175        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60176          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60177$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60178          FOUND_FREETYPE=no
60179        fi
60180      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60181          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60182        # Found lib in isa dir, use that instead.
60183        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60184        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60185$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60186      fi
60187    fi
60188  fi
60189
60190  if test "x$FOUND_FREETYPE" = xyes; then
60191
60192  # Only process if variable expands to non-empty
60193
60194  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60196
60197  # Input might be given as Windows format, start by converting to
60198  # unix format.
60199  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60200  new_path=`$CYGPATH -u "$path"`
60201
60202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60205  # "foo.exe" is OK but "foo" is an error.
60206  #
60207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60208  # It is also a way to make sure we got the proper file name for the real test later on.
60209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60210  if test "x$test_shortpath" = x; then
60211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60212$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60213    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60214  fi
60215
60216  # Call helper function which possibly converts this using DOS-style short mode.
60217  # If so, the updated path is stored in $new_path.
60218
60219  input_path="$new_path"
60220  # Check if we need to convert this using DOS-style short mode. If the path
60221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60222  # take no chances and rewrite it.
60223  # Note: m4 eats our [], so we need to use [ and ] instead.
60224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60225  if test "x$has_forbidden_chars" != x; then
60226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60230      # Going to short mode and back again did indeed matter. Since short mode is
60231      # case insensitive, let's make it lowercase to improve readability.
60232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60233      # Now convert it back to Unix-style (cygpath)
60234      input_path=`$CYGPATH -u "$shortmode_path"`
60235      new_path="$input_path"
60236    fi
60237  fi
60238
60239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60240  if test "x$test_cygdrive_prefix" = x; then
60241    # As a simple fix, exclude /usr/bin since it's not a real path.
60242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60244      # a path prefixed by /cygdrive for fixpath to work.
60245      new_path="$CYGWIN_ROOT_PATH$input_path"
60246    fi
60247  fi
60248
60249
60250  if test "x$path" != "x$new_path"; then
60251    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60253$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60254  fi
60255
60256    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60257
60258  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60259  has_colon=`$ECHO $path | $GREP ^.:`
60260  new_path="$path"
60261  if test "x$has_colon" = x; then
60262    # Not in mixed or Windows style, start by that.
60263    new_path=`cmd //c echo $path`
60264  fi
60265
60266
60267  input_path="$new_path"
60268  # Check if we need to convert this using DOS-style short mode. If the path
60269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60270  # take no chances and rewrite it.
60271  # Note: m4 eats our [], so we need to use [ and ] instead.
60272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60273  if test "x$has_forbidden_chars" != x; then
60274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60276  fi
60277
60278
60279  windows_path="$new_path"
60280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60281    unix_path=`$CYGPATH -u "$windows_path"`
60282    new_path="$unix_path"
60283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60285    new_path="$unix_path"
60286  fi
60287
60288  if test "x$path" != "x$new_path"; then
60289    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60291$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60292  fi
60293
60294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60296
60297    else
60298      # We're on a unix platform. Hooray! :)
60299      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60300      has_space=`$ECHO "$path" | $GREP " "`
60301      if test "x$has_space" != x; then
60302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60303$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60304        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60305      fi
60306
60307      # Use eval to expand a potential ~
60308      eval path="$path"
60309      if test ! -f "$path" && test ! -d "$path"; then
60310        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60311      fi
60312
60313      if test -d "$path"; then
60314        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60315      else
60316        dir="`$DIRNAME "$path"`"
60317        base="`$BASENAME "$path"`"
60318        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60319      fi
60320    fi
60321  fi
60322
60323
60324  # Only process if variable expands to non-empty
60325
60326  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60327    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60328
60329  # Input might be given as Windows format, start by converting to
60330  # unix format.
60331  path="$POTENTIAL_FREETYPE_LIB_PATH"
60332  new_path=`$CYGPATH -u "$path"`
60333
60334  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60335  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60336  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60337  # "foo.exe" is OK but "foo" is an error.
60338  #
60339  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60340  # It is also a way to make sure we got the proper file name for the real test later on.
60341  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60342  if test "x$test_shortpath" = x; then
60343    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60344$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60345    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60346  fi
60347
60348  # Call helper function which possibly converts this using DOS-style short mode.
60349  # If so, the updated path is stored in $new_path.
60350
60351  input_path="$new_path"
60352  # Check if we need to convert this using DOS-style short mode. If the path
60353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60354  # take no chances and rewrite it.
60355  # Note: m4 eats our [], so we need to use [ and ] instead.
60356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60357  if test "x$has_forbidden_chars" != x; then
60358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60359    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60360    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60361    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60362      # Going to short mode and back again did indeed matter. Since short mode is
60363      # case insensitive, let's make it lowercase to improve readability.
60364      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60365      # Now convert it back to Unix-style (cygpath)
60366      input_path=`$CYGPATH -u "$shortmode_path"`
60367      new_path="$input_path"
60368    fi
60369  fi
60370
60371  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60372  if test "x$test_cygdrive_prefix" = x; then
60373    # As a simple fix, exclude /usr/bin since it's not a real path.
60374    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60375      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60376      # a path prefixed by /cygdrive for fixpath to work.
60377      new_path="$CYGWIN_ROOT_PATH$input_path"
60378    fi
60379  fi
60380
60381
60382  if test "x$path" != "x$new_path"; then
60383    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60385$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60386  fi
60387
60388    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60389
60390  path="$POTENTIAL_FREETYPE_LIB_PATH"
60391  has_colon=`$ECHO $path | $GREP ^.:`
60392  new_path="$path"
60393  if test "x$has_colon" = x; then
60394    # Not in mixed or Windows style, start by that.
60395    new_path=`cmd //c echo $path`
60396  fi
60397
60398
60399  input_path="$new_path"
60400  # Check if we need to convert this using DOS-style short mode. If the path
60401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60402  # take no chances and rewrite it.
60403  # Note: m4 eats our [], so we need to use [ and ] instead.
60404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60405  if test "x$has_forbidden_chars" != x; then
60406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60407    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60408  fi
60409
60410
60411  windows_path="$new_path"
60412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60413    unix_path=`$CYGPATH -u "$windows_path"`
60414    new_path="$unix_path"
60415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60417    new_path="$unix_path"
60418  fi
60419
60420  if test "x$path" != "x$new_path"; then
60421    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60423$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60424  fi
60425
60426  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60427  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60428
60429    else
60430      # We're on a unix platform. Hooray! :)
60431      path="$POTENTIAL_FREETYPE_LIB_PATH"
60432      has_space=`$ECHO "$path" | $GREP " "`
60433      if test "x$has_space" != x; then
60434        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60435$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60436        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60437      fi
60438
60439      # Use eval to expand a potential ~
60440      eval path="$path"
60441      if test ! -f "$path" && test ! -d "$path"; then
60442        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60443      fi
60444
60445      if test -d "$path"; then
60446        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60447      else
60448        dir="`$DIRNAME "$path"`"
60449        base="`$BASENAME "$path"`"
60450        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60451      fi
60452    fi
60453  fi
60454
60455
60456    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60457    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60458$as_echo_n "checking for freetype includes... " >&6; }
60459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60460$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60461    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60463$as_echo_n "checking for freetype libraries... " >&6; }
60464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60465$as_echo "$FREETYPE_LIB_PATH" >&6; }
60466  fi
60467
60468
60469          if test "x$FOUND_FREETYPE" != xyes; then
60470            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60471
60472  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60473  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60474  METHOD="well-known location"
60475
60476  # Let's start with an optimistic view of the world :-)
60477  FOUND_FREETYPE=yes
60478
60479  # First look for the canonical freetype main include file ft2build.h.
60480  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60481    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60482    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60483    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60484      # Fail.
60485      FOUND_FREETYPE=no
60486    fi
60487  fi
60488
60489  if test "x$FOUND_FREETYPE" = xyes; then
60490    # Include file found, let's continue the sanity check.
60491    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60492$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60493
60494    # Reset to default value
60495    FREETYPE_BASE_NAME=freetype
60496    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60497    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60498      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60499          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60500        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60501        # for the .6 version explicitly.
60502        FREETYPE_BASE_NAME=freetype.6
60503        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60504        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60505$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60506      else
60507        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60508$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60509        FOUND_FREETYPE=no
60510      fi
60511    else
60512      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60513        # On Windows, we will need both .lib and .dll file.
60514        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60515          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60516$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60517          FOUND_FREETYPE=no
60518        fi
60519      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60520          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60521        # Found lib in isa dir, use that instead.
60522        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60523        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60524$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60525      fi
60526    fi
60527  fi
60528
60529  if test "x$FOUND_FREETYPE" = xyes; then
60530
60531  # Only process if variable expands to non-empty
60532
60533  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60534    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60535
60536  # Input might be given as Windows format, start by converting to
60537  # unix format.
60538  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60539  new_path=`$CYGPATH -u "$path"`
60540
60541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60544  # "foo.exe" is OK but "foo" is an error.
60545  #
60546  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60547  # It is also a way to make sure we got the proper file name for the real test later on.
60548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60549  if test "x$test_shortpath" = x; then
60550    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60551$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60552    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60553  fi
60554
60555  # Call helper function which possibly converts this using DOS-style short mode.
60556  # If so, the updated path is stored in $new_path.
60557
60558  input_path="$new_path"
60559  # Check if we need to convert this using DOS-style short mode. If the path
60560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60561  # take no chances and rewrite it.
60562  # Note: m4 eats our [], so we need to use [ and ] instead.
60563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60564  if test "x$has_forbidden_chars" != x; then
60565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60569      # Going to short mode and back again did indeed matter. Since short mode is
60570      # case insensitive, let's make it lowercase to improve readability.
60571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60572      # Now convert it back to Unix-style (cygpath)
60573      input_path=`$CYGPATH -u "$shortmode_path"`
60574      new_path="$input_path"
60575    fi
60576  fi
60577
60578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60579  if test "x$test_cygdrive_prefix" = x; then
60580    # As a simple fix, exclude /usr/bin since it's not a real path.
60581    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60583      # a path prefixed by /cygdrive for fixpath to work.
60584      new_path="$CYGWIN_ROOT_PATH$input_path"
60585    fi
60586  fi
60587
60588
60589  if test "x$path" != "x$new_path"; then
60590    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60592$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60593  fi
60594
60595    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60596
60597  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60598  has_colon=`$ECHO $path | $GREP ^.:`
60599  new_path="$path"
60600  if test "x$has_colon" = x; then
60601    # Not in mixed or Windows style, start by that.
60602    new_path=`cmd //c echo $path`
60603  fi
60604
60605
60606  input_path="$new_path"
60607  # Check if we need to convert this using DOS-style short mode. If the path
60608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60609  # take no chances and rewrite it.
60610  # Note: m4 eats our [], so we need to use [ and ] instead.
60611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60612  if test "x$has_forbidden_chars" != x; then
60613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60615  fi
60616
60617
60618  windows_path="$new_path"
60619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60620    unix_path=`$CYGPATH -u "$windows_path"`
60621    new_path="$unix_path"
60622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60624    new_path="$unix_path"
60625  fi
60626
60627  if test "x$path" != "x$new_path"; then
60628    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60630$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60631  fi
60632
60633  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60634  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60635
60636    else
60637      # We're on a unix platform. Hooray! :)
60638      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60639      has_space=`$ECHO "$path" | $GREP " "`
60640      if test "x$has_space" != x; then
60641        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60642$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60643        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60644      fi
60645
60646      # Use eval to expand a potential ~
60647      eval path="$path"
60648      if test ! -f "$path" && test ! -d "$path"; then
60649        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60650      fi
60651
60652      if test -d "$path"; then
60653        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60654      else
60655        dir="`$DIRNAME "$path"`"
60656        base="`$BASENAME "$path"`"
60657        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60658      fi
60659    fi
60660  fi
60661
60662
60663  # Only process if variable expands to non-empty
60664
60665  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60666    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60667
60668  # Input might be given as Windows format, start by converting to
60669  # unix format.
60670  path="$POTENTIAL_FREETYPE_LIB_PATH"
60671  new_path=`$CYGPATH -u "$path"`
60672
60673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60676  # "foo.exe" is OK but "foo" is an error.
60677  #
60678  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60679  # It is also a way to make sure we got the proper file name for the real test later on.
60680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60681  if test "x$test_shortpath" = x; then
60682    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60683$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60684    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60685  fi
60686
60687  # Call helper function which possibly converts this using DOS-style short mode.
60688  # If so, the updated path is stored in $new_path.
60689
60690  input_path="$new_path"
60691  # Check if we need to convert this using DOS-style short mode. If the path
60692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60693  # take no chances and rewrite it.
60694  # Note: m4 eats our [], so we need to use [ and ] instead.
60695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60696  if test "x$has_forbidden_chars" != x; then
60697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60698    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60699    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60700    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60701      # Going to short mode and back again did indeed matter. Since short mode is
60702      # case insensitive, let's make it lowercase to improve readability.
60703      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60704      # Now convert it back to Unix-style (cygpath)
60705      input_path=`$CYGPATH -u "$shortmode_path"`
60706      new_path="$input_path"
60707    fi
60708  fi
60709
60710  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60711  if test "x$test_cygdrive_prefix" = x; then
60712    # As a simple fix, exclude /usr/bin since it's not a real path.
60713    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60714      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60715      # a path prefixed by /cygdrive for fixpath to work.
60716      new_path="$CYGWIN_ROOT_PATH$input_path"
60717    fi
60718  fi
60719
60720
60721  if test "x$path" != "x$new_path"; then
60722    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60724$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60725  fi
60726
60727    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60728
60729  path="$POTENTIAL_FREETYPE_LIB_PATH"
60730  has_colon=`$ECHO $path | $GREP ^.:`
60731  new_path="$path"
60732  if test "x$has_colon" = x; then
60733    # Not in mixed or Windows style, start by that.
60734    new_path=`cmd //c echo $path`
60735  fi
60736
60737
60738  input_path="$new_path"
60739  # Check if we need to convert this using DOS-style short mode. If the path
60740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60741  # take no chances and rewrite it.
60742  # Note: m4 eats our [], so we need to use [ and ] instead.
60743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60744  if test "x$has_forbidden_chars" != x; then
60745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60746    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60747  fi
60748
60749
60750  windows_path="$new_path"
60751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60752    unix_path=`$CYGPATH -u "$windows_path"`
60753    new_path="$unix_path"
60754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60756    new_path="$unix_path"
60757  fi
60758
60759  if test "x$path" != "x$new_path"; then
60760    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60762$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60763  fi
60764
60765  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60766  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60767
60768    else
60769      # We're on a unix platform. Hooray! :)
60770      path="$POTENTIAL_FREETYPE_LIB_PATH"
60771      has_space=`$ECHO "$path" | $GREP " "`
60772      if test "x$has_space" != x; then
60773        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60774$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60775        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60776      fi
60777
60778      # Use eval to expand a potential ~
60779      eval path="$path"
60780      if test ! -f "$path" && test ! -d "$path"; then
60781        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60782      fi
60783
60784      if test -d "$path"; then
60785        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60786      else
60787        dir="`$DIRNAME "$path"`"
60788        base="`$BASENAME "$path"`"
60789        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60790      fi
60791    fi
60792  fi
60793
60794
60795    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60797$as_echo_n "checking for freetype includes... " >&6; }
60798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60799$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60800    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60802$as_echo_n "checking for freetype libraries... " >&6; }
60803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60804$as_echo "$FREETYPE_LIB_PATH" >&6; }
60805  fi
60806
60807          fi
60808
60809          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60810            if test "x$FOUND_FREETYPE" != xyes; then
60811              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60812              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60813
60814  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60815  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60816  METHOD="well-known location"
60817
60818  # Let's start with an optimistic view of the world :-)
60819  FOUND_FREETYPE=yes
60820
60821  # First look for the canonical freetype main include file ft2build.h.
60822  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60823    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60824    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60825    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60826      # Fail.
60827      FOUND_FREETYPE=no
60828    fi
60829  fi
60830
60831  if test "x$FOUND_FREETYPE" = xyes; then
60832    # Include file found, let's continue the sanity check.
60833    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60834$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60835
60836    # Reset to default value
60837    FREETYPE_BASE_NAME=freetype
60838    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60839    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60840      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60841          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60842        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60843        # for the .6 version explicitly.
60844        FREETYPE_BASE_NAME=freetype.6
60845        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60846        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60847$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60848      else
60849        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60850$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60851        FOUND_FREETYPE=no
60852      fi
60853    else
60854      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60855        # On Windows, we will need both .lib and .dll file.
60856        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60857          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60858$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60859          FOUND_FREETYPE=no
60860        fi
60861      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60862          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60863        # Found lib in isa dir, use that instead.
60864        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60865        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60866$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60867      fi
60868    fi
60869  fi
60870
60871  if test "x$FOUND_FREETYPE" = xyes; then
60872
60873  # Only process if variable expands to non-empty
60874
60875  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60876    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60877
60878  # Input might be given as Windows format, start by converting to
60879  # unix format.
60880  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60881  new_path=`$CYGPATH -u "$path"`
60882
60883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60886  # "foo.exe" is OK but "foo" is an error.
60887  #
60888  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60889  # It is also a way to make sure we got the proper file name for the real test later on.
60890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60891  if test "x$test_shortpath" = x; then
60892    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60893$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60894    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60895  fi
60896
60897  # Call helper function which possibly converts this using DOS-style short mode.
60898  # If so, the updated path is stored in $new_path.
60899
60900  input_path="$new_path"
60901  # Check if we need to convert this using DOS-style short mode. If the path
60902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60903  # take no chances and rewrite it.
60904  # Note: m4 eats our [], so we need to use [ and ] instead.
60905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60906  if test "x$has_forbidden_chars" != x; then
60907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60911      # Going to short mode and back again did indeed matter. Since short mode is
60912      # case insensitive, let's make it lowercase to improve readability.
60913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60914      # Now convert it back to Unix-style (cygpath)
60915      input_path=`$CYGPATH -u "$shortmode_path"`
60916      new_path="$input_path"
60917    fi
60918  fi
60919
60920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60921  if test "x$test_cygdrive_prefix" = x; then
60922    # As a simple fix, exclude /usr/bin since it's not a real path.
60923    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60925      # a path prefixed by /cygdrive for fixpath to work.
60926      new_path="$CYGWIN_ROOT_PATH$input_path"
60927    fi
60928  fi
60929
60930
60931  if test "x$path" != "x$new_path"; then
60932    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60934$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60935  fi
60936
60937    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60938
60939  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60940  has_colon=`$ECHO $path | $GREP ^.:`
60941  new_path="$path"
60942  if test "x$has_colon" = x; then
60943    # Not in mixed or Windows style, start by that.
60944    new_path=`cmd //c echo $path`
60945  fi
60946
60947
60948  input_path="$new_path"
60949  # Check if we need to convert this using DOS-style short mode. If the path
60950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60951  # take no chances and rewrite it.
60952  # Note: m4 eats our [], so we need to use [ and ] instead.
60953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60954  if test "x$has_forbidden_chars" != x; then
60955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60957  fi
60958
60959
60960  windows_path="$new_path"
60961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60962    unix_path=`$CYGPATH -u "$windows_path"`
60963    new_path="$unix_path"
60964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60966    new_path="$unix_path"
60967  fi
60968
60969  if test "x$path" != "x$new_path"; then
60970    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60972$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60973  fi
60974
60975  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60976  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60977
60978    else
60979      # We're on a unix platform. Hooray! :)
60980      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60981      has_space=`$ECHO "$path" | $GREP " "`
60982      if test "x$has_space" != x; then
60983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60984$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60985        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60986      fi
60987
60988      # Use eval to expand a potential ~
60989      eval path="$path"
60990      if test ! -f "$path" && test ! -d "$path"; then
60991        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60992      fi
60993
60994      if test -d "$path"; then
60995        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60996      else
60997        dir="`$DIRNAME "$path"`"
60998        base="`$BASENAME "$path"`"
60999        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61000      fi
61001    fi
61002  fi
61003
61004
61005  # Only process if variable expands to non-empty
61006
61007  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61008    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61009
61010  # Input might be given as Windows format, start by converting to
61011  # unix format.
61012  path="$POTENTIAL_FREETYPE_LIB_PATH"
61013  new_path=`$CYGPATH -u "$path"`
61014
61015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61018  # "foo.exe" is OK but "foo" is an error.
61019  #
61020  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61021  # It is also a way to make sure we got the proper file name for the real test later on.
61022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61023  if test "x$test_shortpath" = x; then
61024    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61025$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61026    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61027  fi
61028
61029  # Call helper function which possibly converts this using DOS-style short mode.
61030  # If so, the updated path is stored in $new_path.
61031
61032  input_path="$new_path"
61033  # Check if we need to convert this using DOS-style short mode. If the path
61034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61035  # take no chances and rewrite it.
61036  # Note: m4 eats our [], so we need to use [ and ] instead.
61037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61038  if test "x$has_forbidden_chars" != x; then
61039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61043      # Going to short mode and back again did indeed matter. Since short mode is
61044      # case insensitive, let's make it lowercase to improve readability.
61045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61046      # Now convert it back to Unix-style (cygpath)
61047      input_path=`$CYGPATH -u "$shortmode_path"`
61048      new_path="$input_path"
61049    fi
61050  fi
61051
61052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61053  if test "x$test_cygdrive_prefix" = x; then
61054    # As a simple fix, exclude /usr/bin since it's not a real path.
61055    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61057      # a path prefixed by /cygdrive for fixpath to work.
61058      new_path="$CYGWIN_ROOT_PATH$input_path"
61059    fi
61060  fi
61061
61062
61063  if test "x$path" != "x$new_path"; then
61064    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61066$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61067  fi
61068
61069    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61070
61071  path="$POTENTIAL_FREETYPE_LIB_PATH"
61072  has_colon=`$ECHO $path | $GREP ^.:`
61073  new_path="$path"
61074  if test "x$has_colon" = x; then
61075    # Not in mixed or Windows style, start by that.
61076    new_path=`cmd //c echo $path`
61077  fi
61078
61079
61080  input_path="$new_path"
61081  # Check if we need to convert this using DOS-style short mode. If the path
61082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61083  # take no chances and rewrite it.
61084  # Note: m4 eats our [], so we need to use [ and ] instead.
61085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61086  if test "x$has_forbidden_chars" != x; then
61087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61089  fi
61090
61091
61092  windows_path="$new_path"
61093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61094    unix_path=`$CYGPATH -u "$windows_path"`
61095    new_path="$unix_path"
61096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61098    new_path="$unix_path"
61099  fi
61100
61101  if test "x$path" != "x$new_path"; then
61102    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61104$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61105  fi
61106
61107  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61108  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61109
61110    else
61111      # We're on a unix platform. Hooray! :)
61112      path="$POTENTIAL_FREETYPE_LIB_PATH"
61113      has_space=`$ECHO "$path" | $GREP " "`
61114      if test "x$has_space" != x; then
61115        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61116$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61117        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61118      fi
61119
61120      # Use eval to expand a potential ~
61121      eval path="$path"
61122      if test ! -f "$path" && test ! -d "$path"; then
61123        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61124      fi
61125
61126      if test -d "$path"; then
61127        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61128      else
61129        dir="`$DIRNAME "$path"`"
61130        base="`$BASENAME "$path"`"
61131        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61132      fi
61133    fi
61134  fi
61135
61136
61137    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61139$as_echo_n "checking for freetype includes... " >&6; }
61140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61141$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61142    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61144$as_echo_n "checking for freetype libraries... " >&6; }
61145    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61146$as_echo "$FREETYPE_LIB_PATH" >&6; }
61147  fi
61148
61149            fi
61150          fi
61151
61152          if test "x$FOUND_FREETYPE" != xyes; then
61153            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
61154
61155  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61156  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61157  METHOD="well-known location"
61158
61159  # Let's start with an optimistic view of the world :-)
61160  FOUND_FREETYPE=yes
61161
61162  # First look for the canonical freetype main include file ft2build.h.
61163  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61164    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61165    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61166    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61167      # Fail.
61168      FOUND_FREETYPE=no
61169    fi
61170  fi
61171
61172  if test "x$FOUND_FREETYPE" = xyes; then
61173    # Include file found, let's continue the sanity check.
61174    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61175$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61176
61177    # Reset to default value
61178    FREETYPE_BASE_NAME=freetype
61179    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61180    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61181      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61182          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61183        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61184        # for the .6 version explicitly.
61185        FREETYPE_BASE_NAME=freetype.6
61186        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61187        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61188$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61189      else
61190        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61191$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61192        FOUND_FREETYPE=no
61193      fi
61194    else
61195      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61196        # On Windows, we will need both .lib and .dll file.
61197        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61198          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61199$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61200          FOUND_FREETYPE=no
61201        fi
61202      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61203          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61204        # Found lib in isa dir, use that instead.
61205        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61206        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61207$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61208      fi
61209    fi
61210  fi
61211
61212  if test "x$FOUND_FREETYPE" = xyes; then
61213
61214  # Only process if variable expands to non-empty
61215
61216  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61218
61219  # Input might be given as Windows format, start by converting to
61220  # unix format.
61221  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61222  new_path=`$CYGPATH -u "$path"`
61223
61224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61227  # "foo.exe" is OK but "foo" is an error.
61228  #
61229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61230  # It is also a way to make sure we got the proper file name for the real test later on.
61231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61232  if test "x$test_shortpath" = x; then
61233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61234$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61235    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61236  fi
61237
61238  # Call helper function which possibly converts this using DOS-style short mode.
61239  # If so, the updated path is stored in $new_path.
61240
61241  input_path="$new_path"
61242  # Check if we need to convert this using DOS-style short mode. If the path
61243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61244  # take no chances and rewrite it.
61245  # Note: m4 eats our [], so we need to use [ and ] instead.
61246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61247  if test "x$has_forbidden_chars" != x; then
61248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61252      # Going to short mode and back again did indeed matter. Since short mode is
61253      # case insensitive, let's make it lowercase to improve readability.
61254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61255      # Now convert it back to Unix-style (cygpath)
61256      input_path=`$CYGPATH -u "$shortmode_path"`
61257      new_path="$input_path"
61258    fi
61259  fi
61260
61261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61262  if test "x$test_cygdrive_prefix" = x; then
61263    # As a simple fix, exclude /usr/bin since it's not a real path.
61264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61266      # a path prefixed by /cygdrive for fixpath to work.
61267      new_path="$CYGWIN_ROOT_PATH$input_path"
61268    fi
61269  fi
61270
61271
61272  if test "x$path" != "x$new_path"; then
61273    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61275$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61276  fi
61277
61278    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61279
61280  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61281  has_colon=`$ECHO $path | $GREP ^.:`
61282  new_path="$path"
61283  if test "x$has_colon" = x; then
61284    # Not in mixed or Windows style, start by that.
61285    new_path=`cmd //c echo $path`
61286  fi
61287
61288
61289  input_path="$new_path"
61290  # Check if we need to convert this using DOS-style short mode. If the path
61291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61292  # take no chances and rewrite it.
61293  # Note: m4 eats our [], so we need to use [ and ] instead.
61294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61295  if test "x$has_forbidden_chars" != x; then
61296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61298  fi
61299
61300
61301  windows_path="$new_path"
61302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61303    unix_path=`$CYGPATH -u "$windows_path"`
61304    new_path="$unix_path"
61305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61307    new_path="$unix_path"
61308  fi
61309
61310  if test "x$path" != "x$new_path"; then
61311    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61313$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61314  fi
61315
61316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61318
61319    else
61320      # We're on a unix platform. Hooray! :)
61321      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61322      has_space=`$ECHO "$path" | $GREP " "`
61323      if test "x$has_space" != x; then
61324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61325$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61326        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61327      fi
61328
61329      # Use eval to expand a potential ~
61330      eval path="$path"
61331      if test ! -f "$path" && test ! -d "$path"; then
61332        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61333      fi
61334
61335      if test -d "$path"; then
61336        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61337      else
61338        dir="`$DIRNAME "$path"`"
61339        base="`$BASENAME "$path"`"
61340        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61341      fi
61342    fi
61343  fi
61344
61345
61346  # Only process if variable expands to non-empty
61347
61348  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61350
61351  # Input might be given as Windows format, start by converting to
61352  # unix format.
61353  path="$POTENTIAL_FREETYPE_LIB_PATH"
61354  new_path=`$CYGPATH -u "$path"`
61355
61356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61359  # "foo.exe" is OK but "foo" is an error.
61360  #
61361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61362  # It is also a way to make sure we got the proper file name for the real test later on.
61363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61364  if test "x$test_shortpath" = x; then
61365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61366$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61367    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61368  fi
61369
61370  # Call helper function which possibly converts this using DOS-style short mode.
61371  # If so, the updated path is stored in $new_path.
61372
61373  input_path="$new_path"
61374  # Check if we need to convert this using DOS-style short mode. If the path
61375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61376  # take no chances and rewrite it.
61377  # Note: m4 eats our [], so we need to use [ and ] instead.
61378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61379  if test "x$has_forbidden_chars" != x; then
61380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61384      # Going to short mode and back again did indeed matter. Since short mode is
61385      # case insensitive, let's make it lowercase to improve readability.
61386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61387      # Now convert it back to Unix-style (cygpath)
61388      input_path=`$CYGPATH -u "$shortmode_path"`
61389      new_path="$input_path"
61390    fi
61391  fi
61392
61393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61394  if test "x$test_cygdrive_prefix" = x; then
61395    # As a simple fix, exclude /usr/bin since it's not a real path.
61396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61398      # a path prefixed by /cygdrive for fixpath to work.
61399      new_path="$CYGWIN_ROOT_PATH$input_path"
61400    fi
61401  fi
61402
61403
61404  if test "x$path" != "x$new_path"; then
61405    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61407$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61408  fi
61409
61410    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61411
61412  path="$POTENTIAL_FREETYPE_LIB_PATH"
61413  has_colon=`$ECHO $path | $GREP ^.:`
61414  new_path="$path"
61415  if test "x$has_colon" = x; then
61416    # Not in mixed or Windows style, start by that.
61417    new_path=`cmd //c echo $path`
61418  fi
61419
61420
61421  input_path="$new_path"
61422  # Check if we need to convert this using DOS-style short mode. If the path
61423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61424  # take no chances and rewrite it.
61425  # Note: m4 eats our [], so we need to use [ and ] instead.
61426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61427  if test "x$has_forbidden_chars" != x; then
61428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61430  fi
61431
61432
61433  windows_path="$new_path"
61434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61435    unix_path=`$CYGPATH -u "$windows_path"`
61436    new_path="$unix_path"
61437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61439    new_path="$unix_path"
61440  fi
61441
61442  if test "x$path" != "x$new_path"; then
61443    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61445$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61446  fi
61447
61448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61450
61451    else
61452      # We're on a unix platform. Hooray! :)
61453      path="$POTENTIAL_FREETYPE_LIB_PATH"
61454      has_space=`$ECHO "$path" | $GREP " "`
61455      if test "x$has_space" != x; then
61456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61457$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61458        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61459      fi
61460
61461      # Use eval to expand a potential ~
61462      eval path="$path"
61463      if test ! -f "$path" && test ! -d "$path"; then
61464        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61465      fi
61466
61467      if test -d "$path"; then
61468        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61469      else
61470        dir="`$DIRNAME "$path"`"
61471        base="`$BASENAME "$path"`"
61472        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61473      fi
61474    fi
61475  fi
61476
61477
61478    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61479    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61480$as_echo_n "checking for freetype includes... " >&6; }
61481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61482$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61483    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61484    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61485$as_echo_n "checking for freetype libraries... " >&6; }
61486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61487$as_echo "$FREETYPE_LIB_PATH" >&6; }
61488  fi
61489
61490          fi
61491
61492          if test "x$FOUND_FREETYPE" != xyes; then
61493            FREETYPE_BASE_DIR="$SYSROOT/usr"
61494            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61495
61496  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61497  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61498  METHOD="well-known location"
61499
61500  # Let's start with an optimistic view of the world :-)
61501  FOUND_FREETYPE=yes
61502
61503  # First look for the canonical freetype main include file ft2build.h.
61504  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61505    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61506    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61507    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61508      # Fail.
61509      FOUND_FREETYPE=no
61510    fi
61511  fi
61512
61513  if test "x$FOUND_FREETYPE" = xyes; then
61514    # Include file found, let's continue the sanity check.
61515    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61516$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61517
61518    # Reset to default value
61519    FREETYPE_BASE_NAME=freetype
61520    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61521    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61522      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61523          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61524        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61525        # for the .6 version explicitly.
61526        FREETYPE_BASE_NAME=freetype.6
61527        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61528        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61529$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61530      else
61531        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61532$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61533        FOUND_FREETYPE=no
61534      fi
61535    else
61536      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61537        # On Windows, we will need both .lib and .dll file.
61538        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61539          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61540$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61541          FOUND_FREETYPE=no
61542        fi
61543      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61544          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61545        # Found lib in isa dir, use that instead.
61546        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61547        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61548$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61549      fi
61550    fi
61551  fi
61552
61553  if test "x$FOUND_FREETYPE" = xyes; then
61554
61555  # Only process if variable expands to non-empty
61556
61557  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61559
61560  # Input might be given as Windows format, start by converting to
61561  # unix format.
61562  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61563  new_path=`$CYGPATH -u "$path"`
61564
61565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61568  # "foo.exe" is OK but "foo" is an error.
61569  #
61570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61571  # It is also a way to make sure we got the proper file name for the real test later on.
61572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61573  if test "x$test_shortpath" = x; then
61574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61575$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61576    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61577  fi
61578
61579  # Call helper function which possibly converts this using DOS-style short mode.
61580  # If so, the updated path is stored in $new_path.
61581
61582  input_path="$new_path"
61583  # Check if we need to convert this using DOS-style short mode. If the path
61584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61585  # take no chances and rewrite it.
61586  # Note: m4 eats our [], so we need to use [ and ] instead.
61587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61588  if test "x$has_forbidden_chars" != x; then
61589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61593      # Going to short mode and back again did indeed matter. Since short mode is
61594      # case insensitive, let's make it lowercase to improve readability.
61595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61596      # Now convert it back to Unix-style (cygpath)
61597      input_path=`$CYGPATH -u "$shortmode_path"`
61598      new_path="$input_path"
61599    fi
61600  fi
61601
61602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61603  if test "x$test_cygdrive_prefix" = x; then
61604    # As a simple fix, exclude /usr/bin since it's not a real path.
61605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61607      # a path prefixed by /cygdrive for fixpath to work.
61608      new_path="$CYGWIN_ROOT_PATH$input_path"
61609    fi
61610  fi
61611
61612
61613  if test "x$path" != "x$new_path"; then
61614    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61616$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61617  fi
61618
61619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61620
61621  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61622  has_colon=`$ECHO $path | $GREP ^.:`
61623  new_path="$path"
61624  if test "x$has_colon" = x; then
61625    # Not in mixed or Windows style, start by that.
61626    new_path=`cmd //c echo $path`
61627  fi
61628
61629
61630  input_path="$new_path"
61631  # Check if we need to convert this using DOS-style short mode. If the path
61632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61633  # take no chances and rewrite it.
61634  # Note: m4 eats our [], so we need to use [ and ] instead.
61635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61636  if test "x$has_forbidden_chars" != x; then
61637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61639  fi
61640
61641
61642  windows_path="$new_path"
61643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61644    unix_path=`$CYGPATH -u "$windows_path"`
61645    new_path="$unix_path"
61646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61648    new_path="$unix_path"
61649  fi
61650
61651  if test "x$path" != "x$new_path"; then
61652    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61654$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61655  fi
61656
61657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61659
61660    else
61661      # We're on a unix platform. Hooray! :)
61662      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61663      has_space=`$ECHO "$path" | $GREP " "`
61664      if test "x$has_space" != x; then
61665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61666$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61668      fi
61669
61670      # Use eval to expand a potential ~
61671      eval path="$path"
61672      if test ! -f "$path" && test ! -d "$path"; then
61673        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61674      fi
61675
61676      if test -d "$path"; then
61677        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61678      else
61679        dir="`$DIRNAME "$path"`"
61680        base="`$BASENAME "$path"`"
61681        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61682      fi
61683    fi
61684  fi
61685
61686
61687  # Only process if variable expands to non-empty
61688
61689  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61690    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61691
61692  # Input might be given as Windows format, start by converting to
61693  # unix format.
61694  path="$POTENTIAL_FREETYPE_LIB_PATH"
61695  new_path=`$CYGPATH -u "$path"`
61696
61697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61700  # "foo.exe" is OK but "foo" is an error.
61701  #
61702  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61703  # It is also a way to make sure we got the proper file name for the real test later on.
61704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61705  if test "x$test_shortpath" = x; then
61706    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61707$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61708    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61709  fi
61710
61711  # Call helper function which possibly converts this using DOS-style short mode.
61712  # If so, the updated path is stored in $new_path.
61713
61714  input_path="$new_path"
61715  # Check if we need to convert this using DOS-style short mode. If the path
61716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61717  # take no chances and rewrite it.
61718  # Note: m4 eats our [], so we need to use [ and ] instead.
61719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61720  if test "x$has_forbidden_chars" != x; then
61721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61725      # Going to short mode and back again did indeed matter. Since short mode is
61726      # case insensitive, let's make it lowercase to improve readability.
61727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61728      # Now convert it back to Unix-style (cygpath)
61729      input_path=`$CYGPATH -u "$shortmode_path"`
61730      new_path="$input_path"
61731    fi
61732  fi
61733
61734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61735  if test "x$test_cygdrive_prefix" = x; then
61736    # As a simple fix, exclude /usr/bin since it's not a real path.
61737    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61739      # a path prefixed by /cygdrive for fixpath to work.
61740      new_path="$CYGWIN_ROOT_PATH$input_path"
61741    fi
61742  fi
61743
61744
61745  if test "x$path" != "x$new_path"; then
61746    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61748$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61749  fi
61750
61751    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61752
61753  path="$POTENTIAL_FREETYPE_LIB_PATH"
61754  has_colon=`$ECHO $path | $GREP ^.:`
61755  new_path="$path"
61756  if test "x$has_colon" = x; then
61757    # Not in mixed or Windows style, start by that.
61758    new_path=`cmd //c echo $path`
61759  fi
61760
61761
61762  input_path="$new_path"
61763  # Check if we need to convert this using DOS-style short mode. If the path
61764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61765  # take no chances and rewrite it.
61766  # Note: m4 eats our [], so we need to use [ and ] instead.
61767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61768  if test "x$has_forbidden_chars" != x; then
61769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61770    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61771  fi
61772
61773
61774  windows_path="$new_path"
61775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61776    unix_path=`$CYGPATH -u "$windows_path"`
61777    new_path="$unix_path"
61778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61780    new_path="$unix_path"
61781  fi
61782
61783  if test "x$path" != "x$new_path"; then
61784    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61786$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61787  fi
61788
61789  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61790  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61791
61792    else
61793      # We're on a unix platform. Hooray! :)
61794      path="$POTENTIAL_FREETYPE_LIB_PATH"
61795      has_space=`$ECHO "$path" | $GREP " "`
61796      if test "x$has_space" != x; then
61797        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61798$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61799        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61800      fi
61801
61802      # Use eval to expand a potential ~
61803      eval path="$path"
61804      if test ! -f "$path" && test ! -d "$path"; then
61805        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61806      fi
61807
61808      if test -d "$path"; then
61809        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61810      else
61811        dir="`$DIRNAME "$path"`"
61812        base="`$BASENAME "$path"`"
61813        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61814      fi
61815    fi
61816  fi
61817
61818
61819    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61820    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61821$as_echo_n "checking for freetype includes... " >&6; }
61822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61823$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61824    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61826$as_echo_n "checking for freetype libraries... " >&6; }
61827    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61828$as_echo "$FREETYPE_LIB_PATH" >&6; }
61829  fi
61830
61831            else
61832
61833  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61834  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61835  METHOD="well-known location"
61836
61837  # Let's start with an optimistic view of the world :-)
61838  FOUND_FREETYPE=yes
61839
61840  # First look for the canonical freetype main include file ft2build.h.
61841  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61842    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61843    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61844    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61845      # Fail.
61846      FOUND_FREETYPE=no
61847    fi
61848  fi
61849
61850  if test "x$FOUND_FREETYPE" = xyes; then
61851    # Include file found, let's continue the sanity check.
61852    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61853$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61854
61855    # Reset to default value
61856    FREETYPE_BASE_NAME=freetype
61857    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61858    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61859      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61860          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61861        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61862        # for the .6 version explicitly.
61863        FREETYPE_BASE_NAME=freetype.6
61864        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61865        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61866$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61867      else
61868        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61869$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61870        FOUND_FREETYPE=no
61871      fi
61872    else
61873      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61874        # On Windows, we will need both .lib and .dll file.
61875        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61876          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61877$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61878          FOUND_FREETYPE=no
61879        fi
61880      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61881          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61882        # Found lib in isa dir, use that instead.
61883        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61884        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61885$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61886      fi
61887    fi
61888  fi
61889
61890  if test "x$FOUND_FREETYPE" = xyes; then
61891
61892  # Only process if variable expands to non-empty
61893
61894  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61895    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61896
61897  # Input might be given as Windows format, start by converting to
61898  # unix format.
61899  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61900  new_path=`$CYGPATH -u "$path"`
61901
61902  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61903  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61904  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61905  # "foo.exe" is OK but "foo" is an error.
61906  #
61907  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61908  # It is also a way to make sure we got the proper file name for the real test later on.
61909  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61910  if test "x$test_shortpath" = x; then
61911    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61912$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61913    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61914  fi
61915
61916  # Call helper function which possibly converts this using DOS-style short mode.
61917  # If so, the updated path is stored in $new_path.
61918
61919  input_path="$new_path"
61920  # Check if we need to convert this using DOS-style short mode. If the path
61921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61922  # take no chances and rewrite it.
61923  # Note: m4 eats our [], so we need to use [ and ] instead.
61924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61925  if test "x$has_forbidden_chars" != x; then
61926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61930      # Going to short mode and back again did indeed matter. Since short mode is
61931      # case insensitive, let's make it lowercase to improve readability.
61932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61933      # Now convert it back to Unix-style (cygpath)
61934      input_path=`$CYGPATH -u "$shortmode_path"`
61935      new_path="$input_path"
61936    fi
61937  fi
61938
61939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61940  if test "x$test_cygdrive_prefix" = x; then
61941    # As a simple fix, exclude /usr/bin since it's not a real path.
61942    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61944      # a path prefixed by /cygdrive for fixpath to work.
61945      new_path="$CYGWIN_ROOT_PATH$input_path"
61946    fi
61947  fi
61948
61949
61950  if test "x$path" != "x$new_path"; then
61951    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61953$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61954  fi
61955
61956    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61957
61958  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61959  has_colon=`$ECHO $path | $GREP ^.:`
61960  new_path="$path"
61961  if test "x$has_colon" = x; then
61962    # Not in mixed or Windows style, start by that.
61963    new_path=`cmd //c echo $path`
61964  fi
61965
61966
61967  input_path="$new_path"
61968  # Check if we need to convert this using DOS-style short mode. If the path
61969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61970  # take no chances and rewrite it.
61971  # Note: m4 eats our [], so we need to use [ and ] instead.
61972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61973  if test "x$has_forbidden_chars" != x; then
61974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61976  fi
61977
61978
61979  windows_path="$new_path"
61980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61981    unix_path=`$CYGPATH -u "$windows_path"`
61982    new_path="$unix_path"
61983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61985    new_path="$unix_path"
61986  fi
61987
61988  if test "x$path" != "x$new_path"; then
61989    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61991$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61992  fi
61993
61994  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61995  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61996
61997    else
61998      # We're on a unix platform. Hooray! :)
61999      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62000      has_space=`$ECHO "$path" | $GREP " "`
62001      if test "x$has_space" != x; then
62002        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62003$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62004        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62005      fi
62006
62007      # Use eval to expand a potential ~
62008      eval path="$path"
62009      if test ! -f "$path" && test ! -d "$path"; then
62010        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62011      fi
62012
62013      if test -d "$path"; then
62014        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62015      else
62016        dir="`$DIRNAME "$path"`"
62017        base="`$BASENAME "$path"`"
62018        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62019      fi
62020    fi
62021  fi
62022
62023
62024  # Only process if variable expands to non-empty
62025
62026  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62027    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62028
62029  # Input might be given as Windows format, start by converting to
62030  # unix format.
62031  path="$POTENTIAL_FREETYPE_LIB_PATH"
62032  new_path=`$CYGPATH -u "$path"`
62033
62034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62037  # "foo.exe" is OK but "foo" is an error.
62038  #
62039  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62040  # It is also a way to make sure we got the proper file name for the real test later on.
62041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62042  if test "x$test_shortpath" = x; then
62043    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62044$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62045    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62046  fi
62047
62048  # Call helper function which possibly converts this using DOS-style short mode.
62049  # If so, the updated path is stored in $new_path.
62050
62051  input_path="$new_path"
62052  # Check if we need to convert this using DOS-style short mode. If the path
62053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62054  # take no chances and rewrite it.
62055  # Note: m4 eats our [], so we need to use [ and ] instead.
62056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62057  if test "x$has_forbidden_chars" != x; then
62058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62062      # Going to short mode and back again did indeed matter. Since short mode is
62063      # case insensitive, let's make it lowercase to improve readability.
62064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62065      # Now convert it back to Unix-style (cygpath)
62066      input_path=`$CYGPATH -u "$shortmode_path"`
62067      new_path="$input_path"
62068    fi
62069  fi
62070
62071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62072  if test "x$test_cygdrive_prefix" = x; then
62073    # As a simple fix, exclude /usr/bin since it's not a real path.
62074    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62076      # a path prefixed by /cygdrive for fixpath to work.
62077      new_path="$CYGWIN_ROOT_PATH$input_path"
62078    fi
62079  fi
62080
62081
62082  if test "x$path" != "x$new_path"; then
62083    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62085$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62086  fi
62087
62088    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62089
62090  path="$POTENTIAL_FREETYPE_LIB_PATH"
62091  has_colon=`$ECHO $path | $GREP ^.:`
62092  new_path="$path"
62093  if test "x$has_colon" = x; then
62094    # Not in mixed or Windows style, start by that.
62095    new_path=`cmd //c echo $path`
62096  fi
62097
62098
62099  input_path="$new_path"
62100  # Check if we need to convert this using DOS-style short mode. If the path
62101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62102  # take no chances and rewrite it.
62103  # Note: m4 eats our [], so we need to use [ and ] instead.
62104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62105  if test "x$has_forbidden_chars" != x; then
62106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62108  fi
62109
62110
62111  windows_path="$new_path"
62112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62113    unix_path=`$CYGPATH -u "$windows_path"`
62114    new_path="$unix_path"
62115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62117    new_path="$unix_path"
62118  fi
62119
62120  if test "x$path" != "x$new_path"; then
62121    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62123$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62124  fi
62125
62126  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62127  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62128
62129    else
62130      # We're on a unix platform. Hooray! :)
62131      path="$POTENTIAL_FREETYPE_LIB_PATH"
62132      has_space=`$ECHO "$path" | $GREP " "`
62133      if test "x$has_space" != x; then
62134        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62135$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62136        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62137      fi
62138
62139      # Use eval to expand a potential ~
62140      eval path="$path"
62141      if test ! -f "$path" && test ! -d "$path"; then
62142        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62143      fi
62144
62145      if test -d "$path"; then
62146        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62147      else
62148        dir="`$DIRNAME "$path"`"
62149        base="`$BASENAME "$path"`"
62150        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62151      fi
62152    fi
62153  fi
62154
62155
62156    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62158$as_echo_n "checking for freetype includes... " >&6; }
62159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62160$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62161    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62163$as_echo_n "checking for freetype libraries... " >&6; }
62164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62165$as_echo "$FREETYPE_LIB_PATH" >&6; }
62166  fi
62167
62168              if test "x$FOUND_FREETYPE" != xyes; then
62169
62170  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62171  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62172  METHOD="well-known location"
62173
62174  # Let's start with an optimistic view of the world :-)
62175  FOUND_FREETYPE=yes
62176
62177  # First look for the canonical freetype main include file ft2build.h.
62178  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62179    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62180    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62181    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62182      # Fail.
62183      FOUND_FREETYPE=no
62184    fi
62185  fi
62186
62187  if test "x$FOUND_FREETYPE" = xyes; then
62188    # Include file found, let's continue the sanity check.
62189    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62190$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62191
62192    # Reset to default value
62193    FREETYPE_BASE_NAME=freetype
62194    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62195    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62196      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62197          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62198        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62199        # for the .6 version explicitly.
62200        FREETYPE_BASE_NAME=freetype.6
62201        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62202        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62203$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62204      else
62205        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62206$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62207        FOUND_FREETYPE=no
62208      fi
62209    else
62210      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62211        # On Windows, we will need both .lib and .dll file.
62212        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62213          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62214$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62215          FOUND_FREETYPE=no
62216        fi
62217      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62218          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62219        # Found lib in isa dir, use that instead.
62220        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62221        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62222$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62223      fi
62224    fi
62225  fi
62226
62227  if test "x$FOUND_FREETYPE" = xyes; then
62228
62229  # Only process if variable expands to non-empty
62230
62231  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62232    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62233
62234  # Input might be given as Windows format, start by converting to
62235  # unix format.
62236  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62237  new_path=`$CYGPATH -u "$path"`
62238
62239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62242  # "foo.exe" is OK but "foo" is an error.
62243  #
62244  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62245  # It is also a way to make sure we got the proper file name for the real test later on.
62246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62247  if test "x$test_shortpath" = x; then
62248    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62249$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62250    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62251  fi
62252
62253  # Call helper function which possibly converts this using DOS-style short mode.
62254  # If so, the updated path is stored in $new_path.
62255
62256  input_path="$new_path"
62257  # Check if we need to convert this using DOS-style short mode. If the path
62258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62259  # take no chances and rewrite it.
62260  # Note: m4 eats our [], so we need to use [ and ] instead.
62261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62262  if test "x$has_forbidden_chars" != x; then
62263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62267      # Going to short mode and back again did indeed matter. Since short mode is
62268      # case insensitive, let's make it lowercase to improve readability.
62269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62270      # Now convert it back to Unix-style (cygpath)
62271      input_path=`$CYGPATH -u "$shortmode_path"`
62272      new_path="$input_path"
62273    fi
62274  fi
62275
62276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62277  if test "x$test_cygdrive_prefix" = x; then
62278    # As a simple fix, exclude /usr/bin since it's not a real path.
62279    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62281      # a path prefixed by /cygdrive for fixpath to work.
62282      new_path="$CYGWIN_ROOT_PATH$input_path"
62283    fi
62284  fi
62285
62286
62287  if test "x$path" != "x$new_path"; then
62288    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62290$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62291  fi
62292
62293    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62294
62295  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62296  has_colon=`$ECHO $path | $GREP ^.:`
62297  new_path="$path"
62298  if test "x$has_colon" = x; then
62299    # Not in mixed or Windows style, start by that.
62300    new_path=`cmd //c echo $path`
62301  fi
62302
62303
62304  input_path="$new_path"
62305  # Check if we need to convert this using DOS-style short mode. If the path
62306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62307  # take no chances and rewrite it.
62308  # Note: m4 eats our [], so we need to use [ and ] instead.
62309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62310  if test "x$has_forbidden_chars" != x; then
62311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62313  fi
62314
62315
62316  windows_path="$new_path"
62317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62318    unix_path=`$CYGPATH -u "$windows_path"`
62319    new_path="$unix_path"
62320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62322    new_path="$unix_path"
62323  fi
62324
62325  if test "x$path" != "x$new_path"; then
62326    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62328$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62329  fi
62330
62331  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62332  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62333
62334    else
62335      # We're on a unix platform. Hooray! :)
62336      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62337      has_space=`$ECHO "$path" | $GREP " "`
62338      if test "x$has_space" != x; then
62339        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62340$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62341        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62342      fi
62343
62344      # Use eval to expand a potential ~
62345      eval path="$path"
62346      if test ! -f "$path" && test ! -d "$path"; then
62347        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62348      fi
62349
62350      if test -d "$path"; then
62351        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62352      else
62353        dir="`$DIRNAME "$path"`"
62354        base="`$BASENAME "$path"`"
62355        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62356      fi
62357    fi
62358  fi
62359
62360
62361  # Only process if variable expands to non-empty
62362
62363  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62364    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62365
62366  # Input might be given as Windows format, start by converting to
62367  # unix format.
62368  path="$POTENTIAL_FREETYPE_LIB_PATH"
62369  new_path=`$CYGPATH -u "$path"`
62370
62371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62374  # "foo.exe" is OK but "foo" is an error.
62375  #
62376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62377  # It is also a way to make sure we got the proper file name for the real test later on.
62378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62379  if test "x$test_shortpath" = x; then
62380    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62381$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62382    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62383  fi
62384
62385  # Call helper function which possibly converts this using DOS-style short mode.
62386  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62399      # Going to short mode and back again did indeed matter. Since short mode is
62400      # case insensitive, let's make it lowercase to improve readability.
62401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62402      # Now convert it back to Unix-style (cygpath)
62403      input_path=`$CYGPATH -u "$shortmode_path"`
62404      new_path="$input_path"
62405    fi
62406  fi
62407
62408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62409  if test "x$test_cygdrive_prefix" = x; then
62410    # As a simple fix, exclude /usr/bin since it's not a real path.
62411    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62413      # a path prefixed by /cygdrive for fixpath to work.
62414      new_path="$CYGWIN_ROOT_PATH$input_path"
62415    fi
62416  fi
62417
62418
62419  if test "x$path" != "x$new_path"; then
62420    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62422$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62423  fi
62424
62425    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62426
62427  path="$POTENTIAL_FREETYPE_LIB_PATH"
62428  has_colon=`$ECHO $path | $GREP ^.:`
62429  new_path="$path"
62430  if test "x$has_colon" = x; then
62431    # Not in mixed or Windows style, start by that.
62432    new_path=`cmd //c echo $path`
62433  fi
62434
62435
62436  input_path="$new_path"
62437  # Check if we need to convert this using DOS-style short mode. If the path
62438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62439  # take no chances and rewrite it.
62440  # Note: m4 eats our [], so we need to use [ and ] instead.
62441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62442  if test "x$has_forbidden_chars" != x; then
62443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62445  fi
62446
62447
62448  windows_path="$new_path"
62449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62450    unix_path=`$CYGPATH -u "$windows_path"`
62451    new_path="$unix_path"
62452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62454    new_path="$unix_path"
62455  fi
62456
62457  if test "x$path" != "x$new_path"; then
62458    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62460$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62461  fi
62462
62463  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62464  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62465
62466    else
62467      # We're on a unix platform. Hooray! :)
62468      path="$POTENTIAL_FREETYPE_LIB_PATH"
62469      has_space=`$ECHO "$path" | $GREP " "`
62470      if test "x$has_space" != x; then
62471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62472$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62473        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62474      fi
62475
62476      # Use eval to expand a potential ~
62477      eval path="$path"
62478      if test ! -f "$path" && test ! -d "$path"; then
62479        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62480      fi
62481
62482      if test -d "$path"; then
62483        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62484      else
62485        dir="`$DIRNAME "$path"`"
62486        base="`$BASENAME "$path"`"
62487        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62488      fi
62489    fi
62490  fi
62491
62492
62493    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62494    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62495$as_echo_n "checking for freetype includes... " >&6; }
62496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62497$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62498    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62500$as_echo_n "checking for freetype libraries... " >&6; }
62501    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62502$as_echo "$FREETYPE_LIB_PATH" >&6; }
62503  fi
62504
62505              fi
62506            fi
62507          fi
62508        fi
62509      fi # end check in well-known locations
62510
62511      if test "x$FOUND_FREETYPE" != xyes; then
62512
62513  # Print a helpful message on how to acquire the necessary build dependency.
62514  # freetype is the help tag: freetype, cups, alsa etc
62515  MISSING_DEPENDENCY=freetype
62516
62517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62518    cygwin_help $MISSING_DEPENDENCY
62519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62520    msys_help $MISSING_DEPENDENCY
62521  else
62522    PKGHANDLER_COMMAND=
62523
62524    case $PKGHANDLER in
62525      apt-get)
62526        apt_help     $MISSING_DEPENDENCY ;;
62527      yum)
62528        yum_help     $MISSING_DEPENDENCY ;;
62529      port)
62530        port_help    $MISSING_DEPENDENCY ;;
62531      pkgutil)
62532        pkgutil_help $MISSING_DEPENDENCY ;;
62533      pkgadd)
62534        pkgadd_help  $MISSING_DEPENDENCY ;;
62535    esac
62536
62537    if test "x$PKGHANDLER_COMMAND" != x; then
62538      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62539    fi
62540  fi
62541
62542        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62543      fi
62544    fi # end user specified settings
62545
62546    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62547    if test "x$FREETYPE_CFLAGS" = x; then
62548
62549  # Only process if variable expands to non-empty
62550
62551  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62552    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62553
62554  # Input might be given as Windows format, start by converting to
62555  # unix format.
62556  path="$FREETYPE_INCLUDE_PATH"
62557  new_path=`$CYGPATH -u "$path"`
62558
62559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62562  # "foo.exe" is OK but "foo" is an error.
62563  #
62564  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62565  # It is also a way to make sure we got the proper file name for the real test later on.
62566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62567  if test "x$test_shortpath" = x; then
62568    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62569$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62570    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62571  fi
62572
62573  # Call helper function which possibly converts this using DOS-style short mode.
62574  # If so, the updated path is stored in $new_path.
62575
62576  input_path="$new_path"
62577  # Check if we need to convert this using DOS-style short mode. If the path
62578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62579  # take no chances and rewrite it.
62580  # Note: m4 eats our [], so we need to use [ and ] instead.
62581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62582  if test "x$has_forbidden_chars" != x; then
62583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62587      # Going to short mode and back again did indeed matter. Since short mode is
62588      # case insensitive, let's make it lowercase to improve readability.
62589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62590      # Now convert it back to Unix-style (cygpath)
62591      input_path=`$CYGPATH -u "$shortmode_path"`
62592      new_path="$input_path"
62593    fi
62594  fi
62595
62596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62597  if test "x$test_cygdrive_prefix" = x; then
62598    # As a simple fix, exclude /usr/bin since it's not a real path.
62599    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62601      # a path prefixed by /cygdrive for fixpath to work.
62602      new_path="$CYGWIN_ROOT_PATH$input_path"
62603    fi
62604  fi
62605
62606
62607  if test "x$path" != "x$new_path"; then
62608    FREETYPE_INCLUDE_PATH="$new_path"
62609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62610$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62611  fi
62612
62613    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62614
62615  path="$FREETYPE_INCLUDE_PATH"
62616  has_colon=`$ECHO $path | $GREP ^.:`
62617  new_path="$path"
62618  if test "x$has_colon" = x; then
62619    # Not in mixed or Windows style, start by that.
62620    new_path=`cmd //c echo $path`
62621  fi
62622
62623
62624  input_path="$new_path"
62625  # Check if we need to convert this using DOS-style short mode. If the path
62626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62627  # take no chances and rewrite it.
62628  # Note: m4 eats our [], so we need to use [ and ] instead.
62629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62630  if test "x$has_forbidden_chars" != x; then
62631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62633  fi
62634
62635
62636  windows_path="$new_path"
62637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62638    unix_path=`$CYGPATH -u "$windows_path"`
62639    new_path="$unix_path"
62640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62642    new_path="$unix_path"
62643  fi
62644
62645  if test "x$path" != "x$new_path"; then
62646    FREETYPE_INCLUDE_PATH="$new_path"
62647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62648$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62649  fi
62650
62651  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62652  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62653
62654    else
62655      # We're on a unix platform. Hooray! :)
62656      path="$FREETYPE_INCLUDE_PATH"
62657      has_space=`$ECHO "$path" | $GREP " "`
62658      if test "x$has_space" != x; then
62659        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62660$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62661        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62662      fi
62663
62664      # Use eval to expand a potential ~
62665      eval path="$path"
62666      if test ! -f "$path" && test ! -d "$path"; then
62667        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62668      fi
62669
62670      if test -d "$path"; then
62671        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62672      else
62673        dir="`$DIRNAME "$path"`"
62674        base="`$BASENAME "$path"`"
62675        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62676      fi
62677    fi
62678  fi
62679
62680      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62681        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62682      else
62683        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62684      fi
62685    fi
62686
62687    if test "x$FREETYPE_LIBS" = x; then
62688
62689  # Only process if variable expands to non-empty
62690
62691  if test "x$FREETYPE_LIB_PATH" != x; then
62692    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62693
62694  # Input might be given as Windows format, start by converting to
62695  # unix format.
62696  path="$FREETYPE_LIB_PATH"
62697  new_path=`$CYGPATH -u "$path"`
62698
62699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62702  # "foo.exe" is OK but "foo" is an error.
62703  #
62704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62705  # It is also a way to make sure we got the proper file name for the real test later on.
62706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62707  if test "x$test_shortpath" = x; then
62708    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62709$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62710    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62711  fi
62712
62713  # Call helper function which possibly converts this using DOS-style short mode.
62714  # If so, the updated path is stored in $new_path.
62715
62716  input_path="$new_path"
62717  # Check if we need to convert this using DOS-style short mode. If the path
62718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62719  # take no chances and rewrite it.
62720  # Note: m4 eats our [], so we need to use [ and ] instead.
62721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62722  if test "x$has_forbidden_chars" != x; then
62723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62727      # Going to short mode and back again did indeed matter. Since short mode is
62728      # case insensitive, let's make it lowercase to improve readability.
62729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62730      # Now convert it back to Unix-style (cygpath)
62731      input_path=`$CYGPATH -u "$shortmode_path"`
62732      new_path="$input_path"
62733    fi
62734  fi
62735
62736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62737  if test "x$test_cygdrive_prefix" = x; then
62738    # As a simple fix, exclude /usr/bin since it's not a real path.
62739    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62741      # a path prefixed by /cygdrive for fixpath to work.
62742      new_path="$CYGWIN_ROOT_PATH$input_path"
62743    fi
62744  fi
62745
62746
62747  if test "x$path" != "x$new_path"; then
62748    FREETYPE_LIB_PATH="$new_path"
62749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62750$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62751  fi
62752
62753    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62754
62755  path="$FREETYPE_LIB_PATH"
62756  has_colon=`$ECHO $path | $GREP ^.:`
62757  new_path="$path"
62758  if test "x$has_colon" = x; then
62759    # Not in mixed or Windows style, start by that.
62760    new_path=`cmd //c echo $path`
62761  fi
62762
62763
62764  input_path="$new_path"
62765  # Check if we need to convert this using DOS-style short mode. If the path
62766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62767  # take no chances and rewrite it.
62768  # Note: m4 eats our [], so we need to use [ and ] instead.
62769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62770  if test "x$has_forbidden_chars" != x; then
62771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62773  fi
62774
62775
62776  windows_path="$new_path"
62777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62778    unix_path=`$CYGPATH -u "$windows_path"`
62779    new_path="$unix_path"
62780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62782    new_path="$unix_path"
62783  fi
62784
62785  if test "x$path" != "x$new_path"; then
62786    FREETYPE_LIB_PATH="$new_path"
62787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62788$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62789  fi
62790
62791  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62792  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62793
62794    else
62795      # We're on a unix platform. Hooray! :)
62796      path="$FREETYPE_LIB_PATH"
62797      has_space=`$ECHO "$path" | $GREP " "`
62798      if test "x$has_space" != x; then
62799        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62800$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62801        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62802      fi
62803
62804      # Use eval to expand a potential ~
62805      eval path="$path"
62806      if test ! -f "$path" && test ! -d "$path"; then
62807        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62808      fi
62809
62810      if test -d "$path"; then
62811        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62812      else
62813        dir="`$DIRNAME "$path"`"
62814        base="`$BASENAME "$path"`"
62815        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62816      fi
62817    fi
62818  fi
62819
62820      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62821        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62822      else
62823        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62824      fi
62825    fi
62826
62827    # Try to compile it
62828    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62829$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62830    ac_ext=cpp
62831ac_cpp='$CXXCPP $CPPFLAGS'
62832ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62833ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62834ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62835
62836    PREV_CXXCFLAGS="$CXXFLAGS"
62837    PREV_LIBS="$LIBS"
62838    PREV_CXX="$CXX"
62839    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62840    LIBS="$LIBS $FREETYPE_LIBS"
62841    CXX="$FIXPATH $CXX"
62842    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62843/* end confdefs.h.  */
62844
62845          #include<ft2build.h>
62846          #include FT_FREETYPE_H
62847          int main () {
62848            FT_Init_FreeType(NULL);
62849            return 0;
62850          }
62851
62852_ACEOF
62853if ac_fn_cxx_try_link "$LINENO"; then :
62854
62855          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62856$as_echo "yes" >&6; }
62857
62858else
62859
62860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62861$as_echo "no" >&6; }
62862          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62863$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62864          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62865$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62866
62867
62868  # Print a helpful message on how to acquire the necessary build dependency.
62869  # freetype is the help tag: freetype, cups, alsa etc
62870  MISSING_DEPENDENCY=freetype
62871
62872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62873    cygwin_help $MISSING_DEPENDENCY
62874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62875    msys_help $MISSING_DEPENDENCY
62876  else
62877    PKGHANDLER_COMMAND=
62878
62879    case $PKGHANDLER in
62880      apt-get)
62881        apt_help     $MISSING_DEPENDENCY ;;
62882      yum)
62883        yum_help     $MISSING_DEPENDENCY ;;
62884      port)
62885        port_help    $MISSING_DEPENDENCY ;;
62886      pkgutil)
62887        pkgutil_help $MISSING_DEPENDENCY ;;
62888      pkgadd)
62889        pkgadd_help  $MISSING_DEPENDENCY ;;
62890    esac
62891
62892    if test "x$PKGHANDLER_COMMAND" != x; then
62893      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62894    fi
62895  fi
62896
62897
62898          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62899
62900
62901fi
62902rm -f core conftest.err conftest.$ac_objext \
62903    conftest$ac_exeext conftest.$ac_ext
62904    CXXCFLAGS="$PREV_CXXFLAGS"
62905    LIBS="$PREV_LIBS"
62906    CXX="$PREV_CXX"
62907    ac_ext=cpp
62908ac_cpp='$CXXCPP $CPPFLAGS'
62909ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62910ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62911ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62912
62913
62914    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62915$as_echo_n "checking if we should bundle freetype... " >&6; }
62916    if test "x$BUNDLE_FREETYPE" = xyes; then
62917      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62918    fi
62919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62920$as_echo "$BUNDLE_FREETYPE" >&6; }
62921
62922  fi # end freetype needed
62923
62924
62925
62926
62927
62928
62929
62930# Check whether --with-alsa was given.
62931if test "${with_alsa+set}" = set; then :
62932  withval=$with_alsa;
62933fi
62934
62935
62936# Check whether --with-alsa-include was given.
62937if test "${with_alsa_include+set}" = set; then :
62938  withval=$with_alsa_include;
62939fi
62940
62941
62942# Check whether --with-alsa-lib was given.
62943if test "${with_alsa_lib+set}" = set; then :
62944  withval=$with_alsa_lib;
62945fi
62946
62947
62948  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62949    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62950        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62951        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62952      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62953$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62954    fi
62955    ALSA_CFLAGS=
62956    ALSA_LIBS=
62957  else
62958    ALSA_FOUND=no
62959
62960    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62961      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62962    fi
62963
62964    if test "x${with_alsa}" != x; then
62965      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62966      ALSA_CFLAGS="-I${with_alsa}/include"
62967      ALSA_FOUND=yes
62968    fi
62969    if test "x${with_alsa_include}" != x; then
62970      ALSA_CFLAGS="-I${with_alsa_include}"
62971      ALSA_FOUND=yes
62972    fi
62973    if test "x${with_alsa_lib}" != x; then
62974      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62975      ALSA_FOUND=yes
62976    fi
62977    # Do not try pkg-config if we have a sysroot set.
62978    if test "x$SYSROOT" = x; then
62979      if test "x$ALSA_FOUND" = xno; then
62980
62981pkg_failed=no
62982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62983$as_echo_n "checking for ALSA... " >&6; }
62984
62985if test -n "$ALSA_CFLAGS"; then
62986    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62987 elif test -n "$PKG_CONFIG"; then
62988    if test -n "$PKG_CONFIG" && \
62989    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62990  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62991  ac_status=$?
62992  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62993  test $ac_status = 0; }; then
62994  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62995else
62996  pkg_failed=yes
62997fi
62998 else
62999    pkg_failed=untried
63000fi
63001if test -n "$ALSA_LIBS"; then
63002    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63003 elif test -n "$PKG_CONFIG"; then
63004    if test -n "$PKG_CONFIG" && \
63005    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63006  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63007  ac_status=$?
63008  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63009  test $ac_status = 0; }; then
63010  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63011else
63012  pkg_failed=yes
63013fi
63014 else
63015    pkg_failed=untried
63016fi
63017
63018
63019
63020if test $pkg_failed = yes; then
63021
63022if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63023        _pkg_short_errors_supported=yes
63024else
63025        _pkg_short_errors_supported=no
63026fi
63027        if test $_pkg_short_errors_supported = yes; then
63028	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63029        else
63030	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63031        fi
63032	# Put the nasty error message in config.log where it belongs
63033	echo "$ALSA_PKG_ERRORS" >&5
63034
63035	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63036$as_echo "no" >&6; }
63037                ALSA_FOUND=no
63038elif test $pkg_failed = untried; then
63039	ALSA_FOUND=no
63040else
63041	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63042	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63043        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63044$as_echo "yes" >&6; }
63045	ALSA_FOUND=yes
63046fi
63047      fi
63048    fi
63049    if test "x$ALSA_FOUND" = xno; then
63050      for ac_header in alsa/asoundlib.h
63051do :
63052  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63053if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63054  cat >>confdefs.h <<_ACEOF
63055#define HAVE_ALSA_ASOUNDLIB_H 1
63056_ACEOF
63057
63058            ALSA_FOUND=yes
63059            ALSA_CFLAGS=-Iignoreme
63060            ALSA_LIBS=-lasound
63061            DEFAULT_ALSA=yes
63062
63063else
63064  ALSA_FOUND=no
63065
63066fi
63067
63068done
63069
63070    fi
63071    if test "x$ALSA_FOUND" = xno; then
63072
63073  # Print a helpful message on how to acquire the necessary build dependency.
63074  # alsa is the help tag: freetype, cups, alsa etc
63075  MISSING_DEPENDENCY=alsa
63076
63077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63078    cygwin_help $MISSING_DEPENDENCY
63079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63080    msys_help $MISSING_DEPENDENCY
63081  else
63082    PKGHANDLER_COMMAND=
63083
63084    case $PKGHANDLER in
63085      apt-get)
63086        apt_help     $MISSING_DEPENDENCY ;;
63087      yum)
63088        yum_help     $MISSING_DEPENDENCY ;;
63089      port)
63090        port_help    $MISSING_DEPENDENCY ;;
63091      pkgutil)
63092        pkgutil_help $MISSING_DEPENDENCY ;;
63093      pkgadd)
63094        pkgadd_help  $MISSING_DEPENDENCY ;;
63095    esac
63096
63097    if test "x$PKGHANDLER_COMMAND" != x; then
63098      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63099    fi
63100  fi
63101
63102      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63103    fi
63104  fi
63105
63106
63107
63108
63109
63110
63111# Check whether --with-libffi was given.
63112if test "${with_libffi+set}" = set; then :
63113  withval=$with_libffi;
63114fi
63115
63116
63117# Check whether --with-libffi-include was given.
63118if test "${with_libffi_include+set}" = set; then :
63119  withval=$with_libffi_include;
63120fi
63121
63122
63123# Check whether --with-libffi-lib was given.
63124if test "${with_libffi_lib+set}" = set; then :
63125  withval=$with_libffi_lib;
63126fi
63127
63128
63129  if test "x$NEEDS_LIB_FFI" = xfalse; then
63130    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63131        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63132        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63133      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63134$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63135    fi
63136    LIBFFI_CFLAGS=
63137    LIBFFI_LIBS=
63138  else
63139    LIBFFI_FOUND=no
63140
63141    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63142      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63143    fi
63144
63145    if test "x${with_libffi}" != x; then
63146      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63147      LIBFFI_CFLAGS="-I${with_libffi}/include"
63148      LIBFFI_FOUND=yes
63149    fi
63150    if test "x${with_libffi_include}" != x; then
63151      LIBFFI_CFLAGS="-I${with_libffi_include}"
63152      LIBFFI_FOUND=yes
63153    fi
63154    if test "x${with_libffi_lib}" != x; then
63155      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63156      LIBFFI_FOUND=yes
63157    fi
63158    # Do not try pkg-config if we have a sysroot set.
63159    if test "x$SYSROOT" = x; then
63160      if test "x$LIBFFI_FOUND" = xno; then
63161        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63162
63163pkg_failed=no
63164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63165$as_echo_n "checking for LIBFFI... " >&6; }
63166
63167if test -n "$LIBFFI_CFLAGS"; then
63168    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63169 elif test -n "$PKG_CONFIG"; then
63170    if test -n "$PKG_CONFIG" && \
63171    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63172  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63173  ac_status=$?
63174  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63175  test $ac_status = 0; }; then
63176  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63177else
63178  pkg_failed=yes
63179fi
63180 else
63181    pkg_failed=untried
63182fi
63183if test -n "$LIBFFI_LIBS"; then
63184    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63185 elif test -n "$PKG_CONFIG"; then
63186    if test -n "$PKG_CONFIG" && \
63187    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63188  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63189  ac_status=$?
63190  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63191  test $ac_status = 0; }; then
63192  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63193else
63194  pkg_failed=yes
63195fi
63196 else
63197    pkg_failed=untried
63198fi
63199
63200
63201
63202if test $pkg_failed = yes; then
63203
63204if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63205        _pkg_short_errors_supported=yes
63206else
63207        _pkg_short_errors_supported=no
63208fi
63209        if test $_pkg_short_errors_supported = yes; then
63210	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63211        else
63212	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63213        fi
63214	# Put the nasty error message in config.log where it belongs
63215	echo "$LIBFFI_PKG_ERRORS" >&5
63216
63217	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63218$as_echo "no" >&6; }
63219                LIBFFI_FOUND=no
63220elif test $pkg_failed = untried; then
63221	LIBFFI_FOUND=no
63222else
63223	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63224	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63226$as_echo "yes" >&6; }
63227	LIBFFI_FOUND=yes
63228fi
63229      fi
63230    fi
63231    if test "x$LIBFFI_FOUND" = xno; then
63232      for ac_header in ffi.h
63233do :
63234  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63235if test "x$ac_cv_header_ffi_h" = xyes; then :
63236  cat >>confdefs.h <<_ACEOF
63237#define HAVE_FFI_H 1
63238_ACEOF
63239
63240            LIBFFI_FOUND=yes
63241            LIBFFI_CFLAGS=
63242            LIBFFI_LIBS=-lffi
63243
63244else
63245  LIBFFI_FOUND=no
63246
63247fi
63248
63249done
63250
63251    fi
63252    if test "x$LIBFFI_FOUND" = xno; then
63253
63254  # Print a helpful message on how to acquire the necessary build dependency.
63255  # ffi is the help tag: freetype, cups, alsa etc
63256  MISSING_DEPENDENCY=ffi
63257
63258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63259    cygwin_help $MISSING_DEPENDENCY
63260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63261    msys_help $MISSING_DEPENDENCY
63262  else
63263    PKGHANDLER_COMMAND=
63264
63265    case $PKGHANDLER in
63266      apt-get)
63267        apt_help     $MISSING_DEPENDENCY ;;
63268      yum)
63269        yum_help     $MISSING_DEPENDENCY ;;
63270      port)
63271        port_help    $MISSING_DEPENDENCY ;;
63272      pkgutil)
63273        pkgutil_help $MISSING_DEPENDENCY ;;
63274      pkgadd)
63275        pkgadd_help  $MISSING_DEPENDENCY ;;
63276    esac
63277
63278    if test "x$PKGHANDLER_COMMAND" != x; then
63279      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63280    fi
63281  fi
63282
63283      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63284    fi
63285
63286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63287$as_echo_n "checking if libffi works... " >&6; }
63288    ac_ext=c
63289ac_cpp='$CPP $CPPFLAGS'
63290ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63291ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63292ac_compiler_gnu=$ac_cv_c_compiler_gnu
63293
63294    OLD_CFLAGS="$CFLAGS"
63295    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63296    OLD_LIBS="$LIBS"
63297    LIBS="$LIBS $LIBFFI_LIBS"
63298    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63299/* end confdefs.h.  */
63300#include <ffi.h>
63301int
63302main ()
63303{
63304
63305          ffi_call(NULL, NULL, NULL, NULL);
63306          return 0;
63307
63308  ;
63309  return 0;
63310}
63311_ACEOF
63312if ac_fn_c_try_link "$LINENO"; then :
63313  LIBFFI_WORKS=yes
63314else
63315  LIBFFI_WORKS=no
63316
63317fi
63318rm -f core conftest.err conftest.$ac_objext \
63319    conftest$ac_exeext conftest.$ac_ext
63320    CFLAGS="$OLD_CFLAGS"
63321    LIBS="$OLD_LIBS"
63322    ac_ext=cpp
63323ac_cpp='$CXXCPP $CPPFLAGS'
63324ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63325ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63326ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63327
63328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63329$as_echo "$LIBFFI_WORKS" >&6; }
63330
63331    if test "x$LIBFFI_WORKS" = xno; then
63332
63333  # Print a helpful message on how to acquire the necessary build dependency.
63334  # ffi is the help tag: freetype, cups, alsa etc
63335  MISSING_DEPENDENCY=ffi
63336
63337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63338    cygwin_help $MISSING_DEPENDENCY
63339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63340    msys_help $MISSING_DEPENDENCY
63341  else
63342    PKGHANDLER_COMMAND=
63343
63344    case $PKGHANDLER in
63345      apt-get)
63346        apt_help     $MISSING_DEPENDENCY ;;
63347      yum)
63348        yum_help     $MISSING_DEPENDENCY ;;
63349      port)
63350        port_help    $MISSING_DEPENDENCY ;;
63351      pkgutil)
63352        pkgutil_help $MISSING_DEPENDENCY ;;
63353      pkgadd)
63354        pkgadd_help  $MISSING_DEPENDENCY ;;
63355    esac
63356
63357    if test "x$PKGHANDLER_COMMAND" != x; then
63358      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63359    fi
63360  fi
63361
63362      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63363    fi
63364  fi
63365
63366
63367
63368
63369
63370  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63371    # Extract the first word of "llvm-config", so it can be a program name with args.
63372set dummy llvm-config; ac_word=$2
63373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63374$as_echo_n "checking for $ac_word... " >&6; }
63375if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63376  $as_echo_n "(cached) " >&6
63377else
63378  if test -n "$LLVM_CONFIG"; then
63379  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63380else
63381as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63382for as_dir in $PATH
63383do
63384  IFS=$as_save_IFS
63385  test -z "$as_dir" && as_dir=.
63386    for ac_exec_ext in '' $ac_executable_extensions; do
63387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63388    ac_cv_prog_LLVM_CONFIG="llvm-config"
63389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63390    break 2
63391  fi
63392done
63393  done
63394IFS=$as_save_IFS
63395
63396fi
63397fi
63398LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63399if test -n "$LLVM_CONFIG"; then
63400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63401$as_echo "$LLVM_CONFIG" >&6; }
63402else
63403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63404$as_echo "no" >&6; }
63405fi
63406
63407
63408
63409    if test "x$LLVM_CONFIG" != xllvm-config; then
63410      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63411    fi
63412
63413    llvm_components="jit mcjit engine nativecodegen native"
63414    unset LLVM_CFLAGS
63415    for flag in $("$LLVM_CONFIG" --cxxflags); do
63416      if echo "${flag}" | grep -q '^-[ID]'; then
63417        if test "${flag}" != "-D_DEBUG" ; then
63418          if test "${LLVM_CFLAGS}" != "" ; then
63419            LLVM_CFLAGS="${LLVM_CFLAGS} "
63420          fi
63421          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63422        fi
63423      fi
63424    done
63425    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63426    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63427
63428    unset LLVM_LDFLAGS
63429    for flag in $("${LLVM_CONFIG}" --ldflags); do
63430      if echo "${flag}" | grep -q '^-L'; then
63431        if test "${LLVM_LDFLAGS}" != ""; then
63432          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63433        fi
63434        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63435      fi
63436    done
63437
63438    unset LLVM_LIBS
63439    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63440      if echo "${flag}" | grep -q '^-l'; then
63441        if test "${LLVM_LIBS}" != ""; then
63442          LLVM_LIBS="${LLVM_LIBS} "
63443        fi
63444        LLVM_LIBS="${LLVM_LIBS}${flag}"
63445      fi
63446    done
63447
63448    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63449    # always properly detect -ltinfo
63450    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63451
63452
63453
63454
63455  fi
63456
63457
63458
63459# Check whether --with-libjpeg was given.
63460if test "${with_libjpeg+set}" = set; then :
63461  withval=$with_libjpeg;
63462fi
63463
63464
63465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63466$as_echo_n "checking for which libjpeg to use... " >&6; }
63467  # default is bundled
63468  DEFAULT_LIBJPEG=bundled
63469  # if user didn't specify, use DEFAULT_LIBJPEG
63470  if test "x${with_libjpeg}" = "x"; then
63471    with_libjpeg=${DEFAULT_LIBJPEG}
63472  fi
63473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63474$as_echo "${with_libjpeg}" >&6; }
63475
63476  if test "x${with_libjpeg}" = "xbundled"; then
63477    USE_EXTERNAL_LIBJPEG=false
63478  elif test "x${with_libjpeg}" = "xsystem"; then
63479    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63480if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63481
63482else
63483   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63484fi
63485
63486
63487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63488$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63489if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63490  $as_echo_n "(cached) " >&6
63491else
63492  ac_check_lib_save_LIBS=$LIBS
63493LIBS="-ljpeg  $LIBS"
63494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63495/* end confdefs.h.  */
63496
63497/* Override any GCC internal prototype to avoid an error.
63498   Use char because int might match the return type of a GCC
63499   builtin and then its argument prototype would still apply.  */
63500#ifdef __cplusplus
63501extern "C"
63502#endif
63503char jpeg_CreateDecompress ();
63504int
63505main ()
63506{
63507return jpeg_CreateDecompress ();
63508  ;
63509  return 0;
63510}
63511_ACEOF
63512if ac_fn_cxx_try_link "$LINENO"; then :
63513  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63514else
63515  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63516fi
63517rm -f core conftest.err conftest.$ac_objext \
63518    conftest$ac_exeext conftest.$ac_ext
63519LIBS=$ac_check_lib_save_LIBS
63520fi
63521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63522$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63523if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63524  cat >>confdefs.h <<_ACEOF
63525#define HAVE_LIBJPEG 1
63526_ACEOF
63527
63528  LIBS="-ljpeg $LIBS"
63529
63530else
63531   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63532fi
63533
63534
63535    USE_EXTERNAL_LIBJPEG=true
63536  else
63537    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63538  fi
63539
63540
63541
63542
63543
63544# Check whether --with-giflib was given.
63545if test "${with_giflib+set}" = set; then :
63546  withval=$with_giflib;
63547fi
63548
63549
63550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63551$as_echo_n "checking for which giflib to use... " >&6; }
63552  # default is bundled
63553  DEFAULT_GIFLIB=bundled
63554  # if user didn't specify, use DEFAULT_GIFLIB
63555  if test "x${with_giflib}" = "x"; then
63556    with_giflib=${DEFAULT_GIFLIB}
63557  fi
63558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63559$as_echo "${with_giflib}" >&6; }
63560
63561  if test "x${with_giflib}" = "xbundled"; then
63562    USE_EXTERNAL_LIBGIF=false
63563  elif test "x${with_giflib}" = "xsystem"; then
63564    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63565if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63566
63567else
63568   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63569fi
63570
63571
63572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63573$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63574if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63575  $as_echo_n "(cached) " >&6
63576else
63577  ac_check_lib_save_LIBS=$LIBS
63578LIBS="-lgif  $LIBS"
63579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63580/* end confdefs.h.  */
63581
63582/* Override any GCC internal prototype to avoid an error.
63583   Use char because int might match the return type of a GCC
63584   builtin and then its argument prototype would still apply.  */
63585#ifdef __cplusplus
63586extern "C"
63587#endif
63588char DGifGetCode ();
63589int
63590main ()
63591{
63592return DGifGetCode ();
63593  ;
63594  return 0;
63595}
63596_ACEOF
63597if ac_fn_cxx_try_link "$LINENO"; then :
63598  ac_cv_lib_gif_DGifGetCode=yes
63599else
63600  ac_cv_lib_gif_DGifGetCode=no
63601fi
63602rm -f core conftest.err conftest.$ac_objext \
63603    conftest$ac_exeext conftest.$ac_ext
63604LIBS=$ac_check_lib_save_LIBS
63605fi
63606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63607$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63608if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63609  cat >>confdefs.h <<_ACEOF
63610#define HAVE_LIBGIF 1
63611_ACEOF
63612
63613  LIBS="-lgif $LIBS"
63614
63615else
63616   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63617fi
63618
63619
63620    USE_EXTERNAL_LIBGIF=true
63621  else
63622    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63623  fi
63624
63625
63626
63627
63628
63629# Check whether --with-libpng was given.
63630if test "${with_libpng+set}" = set; then :
63631  withval=$with_libpng;
63632fi
63633
63634
63635  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63636$as_echo_n "checking for which libpng to use... " >&6; }
63637
63638  # default is bundled
63639  DEFAULT_LIBPNG=bundled
63640  # if user didn't specify, use DEFAULT_LIBPNG
63641  if test "x${with_libpng}" = "x"; then
63642      with_libpng=${DEFAULT_LIBPNG}
63643  fi
63644
63645  if test "x${with_libpng}" = "xbundled"; then
63646      USE_EXTERNAL_LIBPNG=false
63647      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63648$as_echo "bundled" >&6; }
63649  elif test "x${with_libpng}" = "xsystem"; then
63650
63651pkg_failed=no
63652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63653$as_echo_n "checking for PNG... " >&6; }
63654
63655if test -n "$PNG_CFLAGS"; then
63656    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63657 elif test -n "$PKG_CONFIG"; then
63658    if test -n "$PKG_CONFIG" && \
63659    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63660  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63661  ac_status=$?
63662  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63663  test $ac_status = 0; }; then
63664  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63665else
63666  pkg_failed=yes
63667fi
63668 else
63669    pkg_failed=untried
63670fi
63671if test -n "$PNG_LIBS"; then
63672    pkg_cv_PNG_LIBS="$PNG_LIBS"
63673 elif test -n "$PKG_CONFIG"; then
63674    if test -n "$PKG_CONFIG" && \
63675    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63676  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63677  ac_status=$?
63678  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63679  test $ac_status = 0; }; then
63680  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63681else
63682  pkg_failed=yes
63683fi
63684 else
63685    pkg_failed=untried
63686fi
63687
63688
63689
63690if test $pkg_failed = yes; then
63691
63692if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63693        _pkg_short_errors_supported=yes
63694else
63695        _pkg_short_errors_supported=no
63696fi
63697        if test $_pkg_short_errors_supported = yes; then
63698	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63699        else
63700	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63701        fi
63702	# Put the nasty error message in config.log where it belongs
63703	echo "$PNG_PKG_ERRORS" >&5
63704
63705	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63706$as_echo "no" >&6; }
63707                 LIBPNG_FOUND=no
63708elif test $pkg_failed = untried; then
63709	 LIBPNG_FOUND=no
63710else
63711	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63712	PNG_LIBS=$pkg_cv_PNG_LIBS
63713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63714$as_echo "yes" >&6; }
63715	 LIBPNG_FOUND=yes
63716fi
63717      if test "x${LIBPNG_FOUND}" = "xyes"; then
63718          USE_EXTERNAL_LIBPNG=true
63719          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63720$as_echo "system" >&6; }
63721      else
63722          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63723$as_echo "system not found" >&6; }
63724          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63725      fi
63726  else
63727      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63728  fi
63729
63730
63731
63732
63733
63734# Check whether --with-zlib was given.
63735if test "${with_zlib+set}" = set; then :
63736  withval=$with_zlib;
63737fi
63738
63739
63740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63741$as_echo_n "checking for compress in -lz... " >&6; }
63742if ${ac_cv_lib_z_compress+:} false; then :
63743  $as_echo_n "(cached) " >&6
63744else
63745  ac_check_lib_save_LIBS=$LIBS
63746LIBS="-lz  $LIBS"
63747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63748/* end confdefs.h.  */
63749
63750/* Override any GCC internal prototype to avoid an error.
63751   Use char because int might match the return type of a GCC
63752   builtin and then its argument prototype would still apply.  */
63753#ifdef __cplusplus
63754extern "C"
63755#endif
63756char compress ();
63757int
63758main ()
63759{
63760return compress ();
63761  ;
63762  return 0;
63763}
63764_ACEOF
63765if ac_fn_cxx_try_link "$LINENO"; then :
63766  ac_cv_lib_z_compress=yes
63767else
63768  ac_cv_lib_z_compress=no
63769fi
63770rm -f core conftest.err conftest.$ac_objext \
63771    conftest$ac_exeext conftest.$ac_ext
63772LIBS=$ac_check_lib_save_LIBS
63773fi
63774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63775$as_echo "$ac_cv_lib_z_compress" >&6; }
63776if test "x$ac_cv_lib_z_compress" = xyes; then :
63777   ZLIB_FOUND=yes
63778else
63779   ZLIB_FOUND=no
63780fi
63781
63782
63783  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63784$as_echo_n "checking for which zlib to use... " >&6; }
63785
63786  DEFAULT_ZLIB=system
63787  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63788    # On windows default is bundled...on others default is system
63789    DEFAULT_ZLIB=bundled
63790  fi
63791
63792  if test "x${ZLIB_FOUND}" != "xyes"; then
63793    # If we don't find any system...set default to bundled
63794    DEFAULT_ZLIB=bundled
63795  fi
63796
63797  # If user didn't specify, use DEFAULT_ZLIB
63798  if test "x${with_zlib}" = "x"; then
63799    with_zlib=${DEFAULT_ZLIB}
63800  fi
63801
63802  if test "x${with_zlib}" = "xbundled"; then
63803    USE_EXTERNAL_LIBZ=false
63804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63805$as_echo "bundled" >&6; }
63806  elif test "x${with_zlib}" = "xsystem"; then
63807    if test "x${ZLIB_FOUND}" = "xyes"; then
63808      USE_EXTERNAL_LIBZ=true
63809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63810$as_echo "system" >&6; }
63811    else
63812      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63813$as_echo "system not found" >&6; }
63814      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63815    fi
63816  else
63817    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63818  fi
63819
63820
63821
63822
63823
63824# Check whether --with-lcms was given.
63825if test "${with_lcms+set}" = set; then :
63826  withval=$with_lcms;
63827fi
63828
63829
63830  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63831$as_echo_n "checking for which lcms to use... " >&6; }
63832
63833  DEFAULT_LCMS=bundled
63834  # If user didn't specify, use DEFAULT_LCMS
63835  if test "x${with_lcms}" = "x"; then
63836      with_lcms=${DEFAULT_LCMS}
63837  fi
63838
63839  if test "x${with_lcms}" = "xbundled"; then
63840    USE_EXTERNAL_LCMS=false
63841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63842$as_echo "bundled" >&6; }
63843  elif test "x${with_lcms}" = "xsystem"; then
63844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63845$as_echo "system" >&6; }
63846
63847pkg_failed=no
63848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63849$as_echo_n "checking for LCMS... " >&6; }
63850
63851if test -n "$LCMS_CFLAGS"; then
63852    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63853 elif test -n "$PKG_CONFIG"; then
63854    if test -n "$PKG_CONFIG" && \
63855    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63856  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63857  ac_status=$?
63858  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63859  test $ac_status = 0; }; then
63860  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63861else
63862  pkg_failed=yes
63863fi
63864 else
63865    pkg_failed=untried
63866fi
63867if test -n "$LCMS_LIBS"; then
63868    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63869 elif test -n "$PKG_CONFIG"; then
63870    if test -n "$PKG_CONFIG" && \
63871    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63872  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63873  ac_status=$?
63874  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63875  test $ac_status = 0; }; then
63876  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63877else
63878  pkg_failed=yes
63879fi
63880 else
63881    pkg_failed=untried
63882fi
63883
63884
63885
63886if test $pkg_failed = yes; then
63887
63888if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63889        _pkg_short_errors_supported=yes
63890else
63891        _pkg_short_errors_supported=no
63892fi
63893        if test $_pkg_short_errors_supported = yes; then
63894	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63895        else
63896	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63897        fi
63898	# Put the nasty error message in config.log where it belongs
63899	echo "$LCMS_PKG_ERRORS" >&5
63900
63901	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63902$as_echo "no" >&6; }
63903                LCMS_FOUND=no
63904elif test $pkg_failed = untried; then
63905	LCMS_FOUND=no
63906else
63907	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63908	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63910$as_echo "yes" >&6; }
63911	LCMS_FOUND=yes
63912fi
63913    if test "x${LCMS_FOUND}" = "xyes"; then
63914      USE_EXTERNAL_LCMS=true
63915    else
63916      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63917    fi
63918  else
63919    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63920  fi
63921
63922
63923
63924
63925
63926
63927
63928
63929
63930
63931
63932  # Setup libm (the maths library)
63933  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63935$as_echo_n "checking for cos in -lm... " >&6; }
63936if ${ac_cv_lib_m_cos+:} false; then :
63937  $as_echo_n "(cached) " >&6
63938else
63939  ac_check_lib_save_LIBS=$LIBS
63940LIBS="-lm  $LIBS"
63941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63942/* end confdefs.h.  */
63943
63944/* Override any GCC internal prototype to avoid an error.
63945   Use char because int might match the return type of a GCC
63946   builtin and then its argument prototype would still apply.  */
63947#ifdef __cplusplus
63948extern "C"
63949#endif
63950char cos ();
63951int
63952main ()
63953{
63954return cos ();
63955  ;
63956  return 0;
63957}
63958_ACEOF
63959if ac_fn_cxx_try_link "$LINENO"; then :
63960  ac_cv_lib_m_cos=yes
63961else
63962  ac_cv_lib_m_cos=no
63963fi
63964rm -f core conftest.err conftest.$ac_objext \
63965    conftest$ac_exeext conftest.$ac_ext
63966LIBS=$ac_check_lib_save_LIBS
63967fi
63968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63969$as_echo "$ac_cv_lib_m_cos" >&6; }
63970if test "x$ac_cv_lib_m_cos" = xyes; then :
63971  cat >>confdefs.h <<_ACEOF
63972#define HAVE_LIBM 1
63973_ACEOF
63974
63975  LIBS="-lm $LIBS"
63976
63977else
63978
63979        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63980$as_echo "$as_me: Maths library was not found" >&6;}
63981
63982fi
63983
63984    LIBM="-lm"
63985  else
63986    LIBM=""
63987  fi
63988
63989
63990  # Setup libdl (for dynamic library loading)
63991  save_LIBS="$LIBS"
63992  LIBS=""
63993  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63994$as_echo_n "checking for dlopen in -ldl... " >&6; }
63995if ${ac_cv_lib_dl_dlopen+:} false; then :
63996  $as_echo_n "(cached) " >&6
63997else
63998  ac_check_lib_save_LIBS=$LIBS
63999LIBS="-ldl  $LIBS"
64000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64001/* end confdefs.h.  */
64002
64003/* Override any GCC internal prototype to avoid an error.
64004   Use char because int might match the return type of a GCC
64005   builtin and then its argument prototype would still apply.  */
64006#ifdef __cplusplus
64007extern "C"
64008#endif
64009char dlopen ();
64010int
64011main ()
64012{
64013return dlopen ();
64014  ;
64015  return 0;
64016}
64017_ACEOF
64018if ac_fn_cxx_try_link "$LINENO"; then :
64019  ac_cv_lib_dl_dlopen=yes
64020else
64021  ac_cv_lib_dl_dlopen=no
64022fi
64023rm -f core conftest.err conftest.$ac_objext \
64024    conftest$ac_exeext conftest.$ac_ext
64025LIBS=$ac_check_lib_save_LIBS
64026fi
64027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64028$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64029if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64030  cat >>confdefs.h <<_ACEOF
64031#define HAVE_LIBDL 1
64032_ACEOF
64033
64034  LIBS="-ldl $LIBS"
64035
64036fi
64037
64038  LIBDL="$LIBS"
64039
64040  LIBS="$save_LIBS"
64041
64042  # Deprecated libraries, keep the flags for backwards compatibility
64043  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64044
64045
64046# Check whether --with-dxsdk was given.
64047if test "${with_dxsdk+set}" = set; then :
64048  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64049$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64050fi
64051
64052
64053
64054
64055# Check whether --with-dxsdk-lib was given.
64056if test "${with_dxsdk_lib+set}" = set; then :
64057  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64058$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64059fi
64060
64061
64062
64063
64064# Check whether --with-dxsdk-include was given.
64065if test "${with_dxsdk_include+set}" = set; then :
64066  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64067$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64068fi
64069
64070
64071  fi
64072
64073  # Control if libzip can use mmap. Available for purposes of overriding.
64074  LIBZIP_CAN_USE_MMAP=true
64075
64076
64077
64078  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64079    # Find the root of the Solaris Studio installation from the compiler path
64080    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64081    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64083$as_echo_n "checking for libstlport.so.1... " >&6; }
64084    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64085      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64086      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64087    fi
64088    if test -f "$STLPORT_LIB"; then
64089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64090$as_echo "yes, $STLPORT_LIB" >&6; }
64091
64092  # Only process if variable expands to non-empty
64093
64094  if test "x$STLPORT_LIB" != x; then
64095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64096
64097  # Input might be given as Windows format, start by converting to
64098  # unix format.
64099  path="$STLPORT_LIB"
64100  new_path=`$CYGPATH -u "$path"`
64101
64102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64105  # "foo.exe" is OK but "foo" is an error.
64106  #
64107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64108  # It is also a way to make sure we got the proper file name for the real test later on.
64109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64110  if test "x$test_shortpath" = x; then
64111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64112$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64113    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64114  fi
64115
64116  # Call helper function which possibly converts this using DOS-style short mode.
64117  # If so, the updated path is stored in $new_path.
64118
64119  input_path="$new_path"
64120  # Check if we need to convert this using DOS-style short mode. If the path
64121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64122  # take no chances and rewrite it.
64123  # Note: m4 eats our [], so we need to use [ and ] instead.
64124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64125  if test "x$has_forbidden_chars" != x; then
64126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64130      # Going to short mode and back again did indeed matter. Since short mode is
64131      # case insensitive, let's make it lowercase to improve readability.
64132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64133      # Now convert it back to Unix-style (cygpath)
64134      input_path=`$CYGPATH -u "$shortmode_path"`
64135      new_path="$input_path"
64136    fi
64137  fi
64138
64139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64140  if test "x$test_cygdrive_prefix" = x; then
64141    # As a simple fix, exclude /usr/bin since it's not a real path.
64142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64144      # a path prefixed by /cygdrive for fixpath to work.
64145      new_path="$CYGWIN_ROOT_PATH$input_path"
64146    fi
64147  fi
64148
64149
64150  if test "x$path" != "x$new_path"; then
64151    STLPORT_LIB="$new_path"
64152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64153$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64154  fi
64155
64156    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64157
64158  path="$STLPORT_LIB"
64159  has_colon=`$ECHO $path | $GREP ^.:`
64160  new_path="$path"
64161  if test "x$has_colon" = x; then
64162    # Not in mixed or Windows style, start by that.
64163    new_path=`cmd //c echo $path`
64164  fi
64165
64166
64167  input_path="$new_path"
64168  # Check if we need to convert this using DOS-style short mode. If the path
64169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64170  # take no chances and rewrite it.
64171  # Note: m4 eats our [], so we need to use [ and ] instead.
64172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64173  if test "x$has_forbidden_chars" != x; then
64174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64176  fi
64177
64178
64179  windows_path="$new_path"
64180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64181    unix_path=`$CYGPATH -u "$windows_path"`
64182    new_path="$unix_path"
64183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64185    new_path="$unix_path"
64186  fi
64187
64188  if test "x$path" != "x$new_path"; then
64189    STLPORT_LIB="$new_path"
64190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64191$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64192  fi
64193
64194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64196
64197    else
64198      # We're on a unix platform. Hooray! :)
64199      path="$STLPORT_LIB"
64200      has_space=`$ECHO "$path" | $GREP " "`
64201      if test "x$has_space" != x; then
64202        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64203$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64204        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64205      fi
64206
64207      # Use eval to expand a potential ~
64208      eval path="$path"
64209      if test ! -f "$path" && test ! -d "$path"; then
64210        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64211      fi
64212
64213      if test -d "$path"; then
64214        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64215      else
64216        dir="`$DIRNAME "$path"`"
64217        base="`$BASENAME "$path"`"
64218        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64219      fi
64220    fi
64221  fi
64222
64223    else
64224      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64225$as_echo "no, not found at $STLPORT_LIB" >&6; }
64226      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64227    fi
64228
64229  fi
64230
64231
64232
64233
64234
64235
64236
64237
64238
64239
64240
64241
64242
64243
64244###############################################################################
64245#
64246# We need to do some final tweaking, when everything else is done.
64247#
64248###############################################################################
64249
64250
64251  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64252$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64253
64254  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64255    ENABLE_INTREE_EC=yes
64256    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64257$as_echo "yes" >&6; }
64258  else
64259    ENABLE_INTREE_EC=no
64260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64261$as_echo "no" >&6; }
64262  fi
64263
64264
64265
64266
64267  # Check whether --enable-jtreg-failure-handler was given.
64268if test "${enable_jtreg_failure_handler+set}" = set; then :
64269  enableval=$enable_jtreg_failure_handler;
64270fi
64271
64272
64273  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64274$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64275
64276  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64277    if test "x$JT_HOME" = "x"; then
64278      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64279    else
64280      BUILD_FAILURE_HANDLER=true
64281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64282$as_echo "yes, forced" >&6; }
64283    fi
64284  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64285    BUILD_FAILURE_HANDLER=false
64286    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64287$as_echo "no, forced" >&6; }
64288  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64289      || test "x$enable_jtreg_failure_handler" = "x"; then
64290    if test "x$JT_HOME" = "x"; then
64291      BUILD_FAILURE_HANDLER=false
64292      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64293$as_echo "no, missing jtreg" >&6; }
64294    else
64295      BUILD_FAILURE_HANDLER=true
64296      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64297$as_echo "yes, jtreg present" >&6; }
64298    fi
64299  else
64300    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64301  fi
64302
64303
64304
64305
64306  # Check whether --enable-generate-classlist was given.
64307if test "${enable_generate_classlist+set}" = set; then :
64308  enableval=$enable_generate_classlist;
64309fi
64310
64311
64312  # Check if it's likely that it's possible to generate the classlist. Depending
64313  # on exact jvm configuration it could be possible anyway.
64314  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64315    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64316  else
64317    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64318  fi
64319
64320  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64321$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64322  if test "x$enable_generate_classlist" = "xyes"; then
64323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64324$as_echo "yes, forced" >&6; }
64325    ENABLE_GENERATE_CLASSLIST="true"
64326    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64327      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64328$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64329    fi
64330  elif test "x$enable_generate_classlist" = "xno"; then
64331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64332$as_echo "no, forced" >&6; }
64333    ENABLE_GENERATE_CLASSLIST="false"
64334  elif test "x$enable_generate_classlist" = "x"; then
64335    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64336      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64337$as_echo "yes" >&6; }
64338      ENABLE_GENERATE_CLASSLIST="true"
64339    else
64340      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64341$as_echo "no" >&6; }
64342      ENABLE_GENERATE_CLASSLIST="false"
64343    fi
64344  else
64345    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64346  fi
64347
64348
64349
64350
64351###############################################################################
64352#
64353# Configure parts of the build that only affect the build performance,
64354# not the result.
64355#
64356###############################################################################
64357
64358
64359  # How many cores do we have on this build system?
64360
64361# Check whether --with-num-cores was given.
64362if test "${with_num_cores+set}" = set; then :
64363  withval=$with_num_cores;
64364fi
64365
64366  if test "x$with_num_cores" = x; then
64367    # The number of cores were not specified, try to probe them.
64368
64369  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64370$as_echo_n "checking for number of cores... " >&6; }
64371  NUM_CORES=1
64372  FOUND_CORES=no
64373
64374  if test -f /proc/cpuinfo; then
64375    # Looks like a Linux (or cygwin) system
64376    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64377    FOUND_CORES=yes
64378  elif test -x /usr/sbin/psrinfo; then
64379    # Looks like a Solaris system
64380    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64381    FOUND_CORES=yes
64382  elif test -x /usr/sbin/sysctl; then
64383    # Looks like a MacOSX system
64384    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64385    FOUND_CORES=yes
64386  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64387    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64388    FOUND_CORES=yes
64389  elif test -n "$NUMBER_OF_PROCESSORS"; then
64390    # On windows, look in the env
64391    NUM_CORES=$NUMBER_OF_PROCESSORS
64392    FOUND_CORES=yes
64393  fi
64394
64395  if test "x$FOUND_CORES" = xyes; then
64396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64397$as_echo "$NUM_CORES" >&6; }
64398  else
64399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64400$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64401    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64402$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64403  fi
64404
64405  else
64406    NUM_CORES=$with_num_cores
64407  fi
64408
64409
64410
64411  # How much memory do we have on this build system?
64412
64413# Check whether --with-memory-size was given.
64414if test "${with_memory_size+set}" = set; then :
64415  withval=$with_memory_size;
64416fi
64417
64418  if test "x$with_memory_size" = x; then
64419    # The memory size was not specified, try to probe it.
64420
64421  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64422$as_echo_n "checking for memory size... " >&6; }
64423  # Default to 1024 MB
64424  MEMORY_SIZE=1024
64425  FOUND_MEM=no
64426
64427  if test -f /proc/meminfo; then
64428    # Looks like a Linux (or cygwin) system
64429    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64430    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64431    FOUND_MEM=yes
64432  elif test -x /usr/sbin/prtconf; then
64433    # Looks like a Solaris or AIX system
64434    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64435    FOUND_MEM=yes
64436  elif test -x /usr/sbin/sysctl; then
64437    # Looks like a MacOSX system
64438    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64439    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64440    FOUND_MEM=yes
64441  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64442    # Windows, but without cygwin
64443    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64444    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64445    FOUND_MEM=yes
64446  fi
64447
64448  if test "x$FOUND_MEM" = xyes; then
64449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64450$as_echo "$MEMORY_SIZE MB" >&6; }
64451  else
64452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64453$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64454    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64455$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64456  fi
64457
64458  else
64459    MEMORY_SIZE=$with_memory_size
64460  fi
64461
64462
64463
64464  # Provide a decent default number of parallel jobs for make depending on
64465  # number of cores, amount of memory and machine architecture.
64466
64467# Check whether --with-jobs was given.
64468if test "${with_jobs+set}" = set; then :
64469  withval=$with_jobs;
64470fi
64471
64472  if test "x$with_jobs" = x; then
64473    # Number of jobs was not specified, calculate.
64474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64475$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64476    # Approximate memory in GB.
64477    memory_gb=`expr $MEMORY_SIZE / 1024`
64478    # Pick the lowest of memory in gb and number of cores.
64479    if test "$memory_gb" -lt "$NUM_CORES"; then
64480      JOBS="$memory_gb"
64481    else
64482      JOBS="$NUM_CORES"
64483    fi
64484    if test "$JOBS" -eq "0"; then
64485      JOBS=1
64486    fi
64487    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64488$as_echo "$JOBS" >&6; }
64489  else
64490    JOBS=$with_jobs
64491  fi
64492
64493
64494
64495  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64496
64497# Check whether --with-test-jobs was given.
64498if test "${with_test_jobs+set}" = set; then :
64499  withval=$with_test_jobs;
64500fi
64501
64502  if test "x$with_test_jobs" = x; then
64503      TEST_JOBS=0
64504  else
64505      TEST_JOBS=$with_test_jobs
64506  fi
64507
64508
64509
64510# Setup arguments for the boot jdk (after cores and memory have been setup)
64511
64512  ##############################################################################
64513  #
64514  # Specify jvm options for anything that is run with the Boot JDK.
64515  # Not all JVM:s accept the same arguments on the command line.
64516  #
64517
64518# Check whether --with-boot-jdk-jvmargs was given.
64519if test "${with_boot_jdk_jvmargs+set}" = set; then :
64520  withval=$with_boot_jdk_jvmargs;
64521fi
64522
64523
64524  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64525$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64526
64527  # Disable special log output when a debug build is used as Boot JDK...
64528
64529  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64530  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64531  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64532  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64533  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64534  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64535    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64536    JVM_ARG_OK=true
64537  else
64538    $ECHO "Arg failed:" >&5
64539    $ECHO "$OUTPUT" >&5
64540    JVM_ARG_OK=false
64541  fi
64542
64543
64544  # Force en-US environment
64545
64546  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64547  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64548  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64549  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64550  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64551  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64552    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64553    JVM_ARG_OK=true
64554  else
64555    $ECHO "Arg failed:" >&5
64556    $ECHO "$OUTPUT" >&5
64557    JVM_ARG_OK=false
64558  fi
64559
64560
64561  # Apply user provided options.
64562
64563  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64564  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64565  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64566  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64567  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64568  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64569    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64570    JVM_ARG_OK=true
64571  else
64572    $ECHO "Arg failed:" >&5
64573    $ECHO "$OUTPUT" >&5
64574    JVM_ARG_OK=false
64575  fi
64576
64577
64578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64579$as_echo "$boot_jdk_jvmargs" >&6; }
64580
64581  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64582  JAVA_FLAGS=$boot_jdk_jvmargs
64583
64584
64585
64586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64587$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64588
64589  # Starting amount of heap memory.
64590
64591  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64592  $ECHO "Command: $JAVA -Xms64M -version" >&5
64593  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64594  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64595  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64596  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64597    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64598    JVM_ARG_OK=true
64599  else
64600    $ECHO "Arg failed:" >&5
64601    $ECHO "$OUTPUT" >&5
64602    JVM_ARG_OK=false
64603  fi
64604
64605  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64606
64607  # Maximum amount of heap memory and stack size.
64608  JVM_HEAP_LIMIT_32="1024"
64609  # Running a 64 bit JVM allows for and requires a bigger heap
64610  JVM_HEAP_LIMIT_64="1600"
64611  STACK_SIZE_32=768
64612  STACK_SIZE_64=1536
64613  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64614  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64615    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64616  fi
64617  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64618    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64619  fi
64620  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64621    JVM_HEAP_LIMIT_32=512
64622    JVM_HEAP_LIMIT_64=512
64623  fi
64624
64625  if test "x$BOOT_JDK_BITS" = "x32"; then
64626    STACK_SIZE=$STACK_SIZE_32
64627    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64628  else
64629    STACK_SIZE=$STACK_SIZE_64
64630    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64631  fi
64632
64633  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64634  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64635  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64636  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64637  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64638  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64639    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64640    JVM_ARG_OK=true
64641  else
64642    $ECHO "Arg failed:" >&5
64643    $ECHO "$OUTPUT" >&5
64644    JVM_ARG_OK=false
64645  fi
64646
64647
64648  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64649  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64650  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64651  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64652  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64653  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64654    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64655    JVM_ARG_OK=true
64656  else
64657    $ECHO "Arg failed:" >&5
64658    $ECHO "$OUTPUT" >&5
64659    JVM_ARG_OK=false
64660  fi
64661
64662
64663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64664$as_echo "$boot_jdk_jvmargs_big" >&6; }
64665
64666  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64667
64668
64669  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64670    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64671    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64672  else
64673    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64674    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64675  fi
64676  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64677  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64679$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64681$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64682
64683
64684  # By default, the main javac compilations use big
64685  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64686
64687
64688  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64689$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64690
64691  # Use serial gc for small short lived tools if possible
64692
64693  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64694  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64695  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64696  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64697  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64698  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64699    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64700    JVM_ARG_OK=true
64701  else
64702    $ECHO "Arg failed:" >&5
64703    $ECHO "$OUTPUT" >&5
64704    JVM_ARG_OK=false
64705  fi
64706
64707
64708  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64709  $ECHO "Command: $JAVA -Xms32M -version" >&5
64710  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64711  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64712  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64713  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64714    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64715    JVM_ARG_OK=true
64716  else
64717    $ECHO "Arg failed:" >&5
64718    $ECHO "$OUTPUT" >&5
64719    JVM_ARG_OK=false
64720  fi
64721
64722
64723  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64724  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64725  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64726  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64727  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64728  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64729    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64730    JVM_ARG_OK=true
64731  else
64732    $ECHO "Arg failed:" >&5
64733    $ECHO "$OUTPUT" >&5
64734    JVM_ARG_OK=false
64735  fi
64736
64737
64738  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64739  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64740  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64741  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64742  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64743  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64744    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64745    JVM_ARG_OK=true
64746  else
64747    $ECHO "Arg failed:" >&5
64748    $ECHO "$OUTPUT" >&5
64749    JVM_ARG_OK=false
64750  fi
64751
64752
64753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64754$as_echo "$boot_jdk_jvmargs_small" >&6; }
64755
64756  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64757
64758
64759  JAVA_TOOL_FLAGS_SMALL=""
64760  for f in $JAVA_FLAGS_SMALL; do
64761    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64762  done
64763
64764
64765
64766# Setup smart javac (after cores and memory have been setup)
64767
64768
64769# Check whether --with-sjavac-server-java was given.
64770if test "${with_sjavac_server_java+set}" = set; then :
64771  withval=$with_sjavac_server_java;
64772fi
64773
64774
64775  if test "x$with_sjavac_server_java" != x; then
64776    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64777    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64778    if test "x$FOUND_VERSION" = x; then
64779      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64780    fi
64781  else
64782    SJAVAC_SERVER_JAVA="$JAVA"
64783  fi
64784
64785
64786  if test "$MEMORY_SIZE" -gt "3000"; then
64787
64788  $ECHO "Check if jvm arg is ok: -d64" >&5
64789  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64790  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64791  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64792  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64793  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64794    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64795    JVM_ARG_OK=true
64796  else
64797    $ECHO "Arg failed:" >&5
64798    $ECHO "$OUTPUT" >&5
64799    JVM_ARG_OK=false
64800  fi
64801
64802    if test "$JVM_ARG_OK" = true; then
64803      JVM_64BIT=true
64804      JVM_ARG_OK=false
64805    fi
64806  fi
64807
64808  MX_VALUE=`expr $MEMORY_SIZE / 2`
64809  if test "$JVM_64BIT" = true; then
64810    # Set ms lower than mx since more than one instance of the server might
64811    # get launched at the same time before they figure out which instance won.
64812    MS_VALUE=512
64813    if test "$MX_VALUE" -gt "2048"; then
64814      MX_VALUE=2048
64815    fi
64816  else
64817    MS_VALUE=256
64818    if test "$MX_VALUE" -gt "1500"; then
64819      MX_VALUE=1500
64820    fi
64821  fi
64822  if test "$MX_VALUE" -lt "512"; then
64823    MX_VALUE=512
64824  fi
64825
64826  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64827  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64828  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64829  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64830  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64831  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64832    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64833    JVM_ARG_OK=true
64834  else
64835    $ECHO "Arg failed:" >&5
64836    $ECHO "$OUTPUT" >&5
64837    JVM_ARG_OK=false
64838  fi
64839
64840
64841
64842  # Check whether --enable-sjavac was given.
64843if test "${enable_sjavac+set}" = set; then :
64844  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64845else
64846  ENABLE_SJAVAC="no"
64847fi
64848
64849  if test "x$JVM_ARG_OK" = "xfalse"; then
64850    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64851$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64852    ENABLE_SJAVAC="no"
64853  fi
64854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64855$as_echo_n "checking whether to use sjavac... " >&6; }
64856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64857$as_echo "$ENABLE_SJAVAC" >&6; }
64858
64859
64860  # Check whether --enable-javac-server was given.
64861if test "${enable_javac_server+set}" = set; then :
64862  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64863else
64864  ENABLE_JAVAC_SERVER="yes"
64865fi
64866
64867  if test "x$JVM_ARG_OK" = "xfalse"; then
64868    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64869$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64870    ENABLE_JAVAC_SERVER="no"
64871  fi
64872  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64873$as_echo_n "checking whether to use javac server... " >&6; }
64874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64875$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64876
64877
64878  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64879    # When using a server javac, the small client instances do not need much
64880    # resources.
64881    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64882  fi
64883
64884
64885# Setup use of icecc if requested
64886
64887  # Check whether --enable-icecc was given.
64888if test "${enable_icecc+set}" = set; then :
64889  enableval=$enable_icecc;
64890fi
64891
64892
64893  if test "x${enable_icecc}" = "xyes"; then
64894
64895
64896
64897  # Publish this variable in the help.
64898
64899
64900  if [ -z "${ICECC_CMD+x}" ]; then
64901    # The variable is not set by user, try to locate tool using the code snippet
64902    for ac_prog in icecc
64903do
64904  # Extract the first word of "$ac_prog", so it can be a program name with args.
64905set dummy $ac_prog; ac_word=$2
64906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64907$as_echo_n "checking for $ac_word... " >&6; }
64908if ${ac_cv_path_ICECC_CMD+:} false; then :
64909  $as_echo_n "(cached) " >&6
64910else
64911  case $ICECC_CMD in
64912  [\\/]* | ?:[\\/]*)
64913  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64914  ;;
64915  *)
64916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64917for as_dir in $PATH
64918do
64919  IFS=$as_save_IFS
64920  test -z "$as_dir" && as_dir=.
64921    for ac_exec_ext in '' $ac_executable_extensions; do
64922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64923    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64925    break 2
64926  fi
64927done
64928  done
64929IFS=$as_save_IFS
64930
64931  ;;
64932esac
64933fi
64934ICECC_CMD=$ac_cv_path_ICECC_CMD
64935if test -n "$ICECC_CMD"; then
64936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64937$as_echo "$ICECC_CMD" >&6; }
64938else
64939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64940$as_echo "no" >&6; }
64941fi
64942
64943
64944  test -n "$ICECC_CMD" && break
64945done
64946
64947  else
64948    # The variable is set, but is it from the command line or the environment?
64949
64950    # Try to remove the string !ICECC_CMD! from our list.
64951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64953      # If it failed, the variable was not from the command line. Ignore it,
64954      # but warn the user (except for BASH, which is always set by the calling BASH).
64955      if test "xICECC_CMD" != xBASH; then
64956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64957$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64958      fi
64959      # Try to locate tool using the code snippet
64960      for ac_prog in icecc
64961do
64962  # Extract the first word of "$ac_prog", so it can be a program name with args.
64963set dummy $ac_prog; ac_word=$2
64964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64965$as_echo_n "checking for $ac_word... " >&6; }
64966if ${ac_cv_path_ICECC_CMD+:} false; then :
64967  $as_echo_n "(cached) " >&6
64968else
64969  case $ICECC_CMD in
64970  [\\/]* | ?:[\\/]*)
64971  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64972  ;;
64973  *)
64974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64975for as_dir in $PATH
64976do
64977  IFS=$as_save_IFS
64978  test -z "$as_dir" && as_dir=.
64979    for ac_exec_ext in '' $ac_executable_extensions; do
64980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64981    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64983    break 2
64984  fi
64985done
64986  done
64987IFS=$as_save_IFS
64988
64989  ;;
64990esac
64991fi
64992ICECC_CMD=$ac_cv_path_ICECC_CMD
64993if test -n "$ICECC_CMD"; then
64994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64995$as_echo "$ICECC_CMD" >&6; }
64996else
64997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64998$as_echo "no" >&6; }
64999fi
65000
65001
65002  test -n "$ICECC_CMD" && break
65003done
65004
65005    else
65006      # If it succeeded, then it was overridden by the user. We will use it
65007      # for the tool.
65008
65009      # First remove it from the list of overridden variables, so we can test
65010      # for unknown variables in the end.
65011      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65012
65013      # Check if we try to supply an empty value
65014      if test "x$ICECC_CMD" = x; then
65015        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65016$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65017        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65018$as_echo_n "checking for ICECC_CMD... " >&6; }
65019        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65020$as_echo "disabled" >&6; }
65021      else
65022        # Check if the provided tool contains a complete path.
65023        tool_specified="$ICECC_CMD"
65024        tool_basename="${tool_specified##*/}"
65025        if test "x$tool_basename" = "x$tool_specified"; then
65026          # A command without a complete path is provided, search $PATH.
65027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65028$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65029          # Extract the first word of "$tool_basename", so it can be a program name with args.
65030set dummy $tool_basename; ac_word=$2
65031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65032$as_echo_n "checking for $ac_word... " >&6; }
65033if ${ac_cv_path_ICECC_CMD+:} false; then :
65034  $as_echo_n "(cached) " >&6
65035else
65036  case $ICECC_CMD in
65037  [\\/]* | ?:[\\/]*)
65038  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65039  ;;
65040  *)
65041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65042for as_dir in $PATH
65043do
65044  IFS=$as_save_IFS
65045  test -z "$as_dir" && as_dir=.
65046    for ac_exec_ext in '' $ac_executable_extensions; do
65047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65048    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65050    break 2
65051  fi
65052done
65053  done
65054IFS=$as_save_IFS
65055
65056  ;;
65057esac
65058fi
65059ICECC_CMD=$ac_cv_path_ICECC_CMD
65060if test -n "$ICECC_CMD"; then
65061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65062$as_echo "$ICECC_CMD" >&6; }
65063else
65064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65065$as_echo "no" >&6; }
65066fi
65067
65068
65069          if test "x$ICECC_CMD" = x; then
65070            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65071          fi
65072        else
65073          # Otherwise we believe it is a complete path. Use it as it is.
65074          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65075$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65076          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65077$as_echo_n "checking for ICECC_CMD... " >&6; }
65078          if test ! -x "$tool_specified"; then
65079            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65080$as_echo "not found" >&6; }
65081            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65082          fi
65083          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65084$as_echo "$tool_specified" >&6; }
65085        fi
65086      fi
65087    fi
65088
65089  fi
65090
65091
65092
65093  if test "x$ICECC_CMD" = x; then
65094    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65095  fi
65096
65097
65098    old_path="$PATH"
65099
65100    # Look for icecc-create-env in some known places
65101    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65102
65103
65104
65105  # Publish this variable in the help.
65106
65107
65108  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65109    # The variable is not set by user, try to locate tool using the code snippet
65110    for ac_prog in icecc-create-env
65111do
65112  # Extract the first word of "$ac_prog", so it can be a program name with args.
65113set dummy $ac_prog; ac_word=$2
65114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65115$as_echo_n "checking for $ac_word... " >&6; }
65116if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65117  $as_echo_n "(cached) " >&6
65118else
65119  case $ICECC_CREATE_ENV in
65120  [\\/]* | ?:[\\/]*)
65121  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65122  ;;
65123  *)
65124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65125for as_dir in $PATH
65126do
65127  IFS=$as_save_IFS
65128  test -z "$as_dir" && as_dir=.
65129    for ac_exec_ext in '' $ac_executable_extensions; do
65130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65131    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65133    break 2
65134  fi
65135done
65136  done
65137IFS=$as_save_IFS
65138
65139  ;;
65140esac
65141fi
65142ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65143if test -n "$ICECC_CREATE_ENV"; then
65144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65145$as_echo "$ICECC_CREATE_ENV" >&6; }
65146else
65147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65148$as_echo "no" >&6; }
65149fi
65150
65151
65152  test -n "$ICECC_CREATE_ENV" && break
65153done
65154
65155  else
65156    # The variable is set, but is it from the command line or the environment?
65157
65158    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65159    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65160    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65161      # If it failed, the variable was not from the command line. Ignore it,
65162      # but warn the user (except for BASH, which is always set by the calling BASH).
65163      if test "xICECC_CREATE_ENV" != xBASH; then
65164        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65165$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65166      fi
65167      # Try to locate tool using the code snippet
65168      for ac_prog in icecc-create-env
65169do
65170  # Extract the first word of "$ac_prog", so it can be a program name with args.
65171set dummy $ac_prog; ac_word=$2
65172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65173$as_echo_n "checking for $ac_word... " >&6; }
65174if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65175  $as_echo_n "(cached) " >&6
65176else
65177  case $ICECC_CREATE_ENV in
65178  [\\/]* | ?:[\\/]*)
65179  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65180  ;;
65181  *)
65182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65183for as_dir in $PATH
65184do
65185  IFS=$as_save_IFS
65186  test -z "$as_dir" && as_dir=.
65187    for ac_exec_ext in '' $ac_executable_extensions; do
65188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65189    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65191    break 2
65192  fi
65193done
65194  done
65195IFS=$as_save_IFS
65196
65197  ;;
65198esac
65199fi
65200ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65201if test -n "$ICECC_CREATE_ENV"; then
65202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65203$as_echo "$ICECC_CREATE_ENV" >&6; }
65204else
65205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65206$as_echo "no" >&6; }
65207fi
65208
65209
65210  test -n "$ICECC_CREATE_ENV" && break
65211done
65212
65213    else
65214      # If it succeeded, then it was overridden by the user. We will use it
65215      # for the tool.
65216
65217      # First remove it from the list of overridden variables, so we can test
65218      # for unknown variables in the end.
65219      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65220
65221      # Check if we try to supply an empty value
65222      if test "x$ICECC_CREATE_ENV" = x; then
65223        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65224$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65225        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65226$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65227        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65228$as_echo "disabled" >&6; }
65229      else
65230        # Check if the provided tool contains a complete path.
65231        tool_specified="$ICECC_CREATE_ENV"
65232        tool_basename="${tool_specified##*/}"
65233        if test "x$tool_basename" = "x$tool_specified"; then
65234          # A command without a complete path is provided, search $PATH.
65235          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65236$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65237          # Extract the first word of "$tool_basename", so it can be a program name with args.
65238set dummy $tool_basename; ac_word=$2
65239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65240$as_echo_n "checking for $ac_word... " >&6; }
65241if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65242  $as_echo_n "(cached) " >&6
65243else
65244  case $ICECC_CREATE_ENV in
65245  [\\/]* | ?:[\\/]*)
65246  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65247  ;;
65248  *)
65249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65250for as_dir in $PATH
65251do
65252  IFS=$as_save_IFS
65253  test -z "$as_dir" && as_dir=.
65254    for ac_exec_ext in '' $ac_executable_extensions; do
65255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65256    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65258    break 2
65259  fi
65260done
65261  done
65262IFS=$as_save_IFS
65263
65264  ;;
65265esac
65266fi
65267ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65268if test -n "$ICECC_CREATE_ENV"; then
65269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65270$as_echo "$ICECC_CREATE_ENV" >&6; }
65271else
65272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65273$as_echo "no" >&6; }
65274fi
65275
65276
65277          if test "x$ICECC_CREATE_ENV" = x; then
65278            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65279          fi
65280        else
65281          # Otherwise we believe it is a complete path. Use it as it is.
65282          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65283$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65284          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65285$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65286          if test ! -x "$tool_specified"; then
65287            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65288$as_echo "not found" >&6; }
65289            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65290          fi
65291          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65292$as_echo "$tool_specified" >&6; }
65293        fi
65294      fi
65295    fi
65296
65297  fi
65298
65299
65300
65301  if test "x$ICECC_CREATE_ENV" = x; then
65302    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65303  fi
65304
65305
65306    # Use icecc-create-env to create a minimal compilation environment that can
65307    # be sent to the other hosts in the icecream cluster.
65308    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65309    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65310    # Older versions of icecc does not have the --gcc parameter
65311    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65312      icecc_gcc_arg="--gcc"
65313    fi
65314    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65315
65316  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65317      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65318          ${icecc_create_env_log} 2>&1 )
65319  if test "$?" != "0"; then
65320    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65321$as_echo "$as_me: icecc-create-env output:" >&6;}
65322    cat \
65323          ${icecc_create_env_log}
65324    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65325  fi
65326
65327    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65328      # For clang, the icecc compilerwrapper is needed. It usually resides next
65329      # to icecc-create-env.
65330
65331
65332
65333  # Publish this variable in the help.
65334
65335
65336  if [ -z "${ICECC_WRAPPER+x}" ]; then
65337    # The variable is not set by user, try to locate tool using the code snippet
65338    for ac_prog in compilerwrapper
65339do
65340  # Extract the first word of "$ac_prog", so it can be a program name with args.
65341set dummy $ac_prog; ac_word=$2
65342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65343$as_echo_n "checking for $ac_word... " >&6; }
65344if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65345  $as_echo_n "(cached) " >&6
65346else
65347  case $ICECC_WRAPPER in
65348  [\\/]* | ?:[\\/]*)
65349  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65350  ;;
65351  *)
65352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65353for as_dir in $PATH
65354do
65355  IFS=$as_save_IFS
65356  test -z "$as_dir" && as_dir=.
65357    for ac_exec_ext in '' $ac_executable_extensions; do
65358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65359    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65361    break 2
65362  fi
65363done
65364  done
65365IFS=$as_save_IFS
65366
65367  ;;
65368esac
65369fi
65370ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65371if test -n "$ICECC_WRAPPER"; then
65372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65373$as_echo "$ICECC_WRAPPER" >&6; }
65374else
65375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65376$as_echo "no" >&6; }
65377fi
65378
65379
65380  test -n "$ICECC_WRAPPER" && break
65381done
65382
65383  else
65384    # The variable is set, but is it from the command line or the environment?
65385
65386    # Try to remove the string !ICECC_WRAPPER! from our list.
65387    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65388    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65389      # If it failed, the variable was not from the command line. Ignore it,
65390      # but warn the user (except for BASH, which is always set by the calling BASH).
65391      if test "xICECC_WRAPPER" != xBASH; then
65392        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65393$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65394      fi
65395      # Try to locate tool using the code snippet
65396      for ac_prog in compilerwrapper
65397do
65398  # Extract the first word of "$ac_prog", so it can be a program name with args.
65399set dummy $ac_prog; ac_word=$2
65400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65401$as_echo_n "checking for $ac_word... " >&6; }
65402if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65403  $as_echo_n "(cached) " >&6
65404else
65405  case $ICECC_WRAPPER in
65406  [\\/]* | ?:[\\/]*)
65407  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65408  ;;
65409  *)
65410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65411for as_dir in $PATH
65412do
65413  IFS=$as_save_IFS
65414  test -z "$as_dir" && as_dir=.
65415    for ac_exec_ext in '' $ac_executable_extensions; do
65416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65417    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65419    break 2
65420  fi
65421done
65422  done
65423IFS=$as_save_IFS
65424
65425  ;;
65426esac
65427fi
65428ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65429if test -n "$ICECC_WRAPPER"; then
65430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65431$as_echo "$ICECC_WRAPPER" >&6; }
65432else
65433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65434$as_echo "no" >&6; }
65435fi
65436
65437
65438  test -n "$ICECC_WRAPPER" && break
65439done
65440
65441    else
65442      # If it succeeded, then it was overridden by the user. We will use it
65443      # for the tool.
65444
65445      # First remove it from the list of overridden variables, so we can test
65446      # for unknown variables in the end.
65447      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65448
65449      # Check if we try to supply an empty value
65450      if test "x$ICECC_WRAPPER" = x; then
65451        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65452$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65454$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65456$as_echo "disabled" >&6; }
65457      else
65458        # Check if the provided tool contains a complete path.
65459        tool_specified="$ICECC_WRAPPER"
65460        tool_basename="${tool_specified##*/}"
65461        if test "x$tool_basename" = "x$tool_specified"; then
65462          # A command without a complete path is provided, search $PATH.
65463          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65464$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65465          # Extract the first word of "$tool_basename", so it can be a program name with args.
65466set dummy $tool_basename; ac_word=$2
65467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65468$as_echo_n "checking for $ac_word... " >&6; }
65469if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65470  $as_echo_n "(cached) " >&6
65471else
65472  case $ICECC_WRAPPER in
65473  [\\/]* | ?:[\\/]*)
65474  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65475  ;;
65476  *)
65477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65478for as_dir in $PATH
65479do
65480  IFS=$as_save_IFS
65481  test -z "$as_dir" && as_dir=.
65482    for ac_exec_ext in '' $ac_executable_extensions; do
65483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65484    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65486    break 2
65487  fi
65488done
65489  done
65490IFS=$as_save_IFS
65491
65492  ;;
65493esac
65494fi
65495ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65496if test -n "$ICECC_WRAPPER"; then
65497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65498$as_echo "$ICECC_WRAPPER" >&6; }
65499else
65500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65501$as_echo "no" >&6; }
65502fi
65503
65504
65505          if test "x$ICECC_WRAPPER" = x; then
65506            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65507          fi
65508        else
65509          # Otherwise we believe it is a complete path. Use it as it is.
65510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65511$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65512          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65513$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65514          if test ! -x "$tool_specified"; then
65515            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65516$as_echo "not found" >&6; }
65517            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65518          fi
65519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65520$as_echo "$tool_specified" >&6; }
65521        fi
65522      fi
65523    fi
65524
65525  fi
65526
65527
65528
65529  if test "x$ICECC_WRAPPER" = x; then
65530    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65531  fi
65532
65533
65534
65535  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65536      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65537  if test "$?" != "0"; then
65538    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65539$as_echo "$as_me: icecc-create-env output:" >&6;}
65540    cat ${icecc_create_env_log}
65541    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65542  fi
65543
65544    else
65545      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65546    fi
65547    PATH="$old_path"
65548    # The bundle with the compiler gets a name based on checksums. Parse log file
65549    # to find it.
65550    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65551    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65552    if test ! -f ${ICECC_ENV_BUNDLE}; then
65553      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65554    fi
65555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65556$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65557    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65558$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65559    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65560
65561    if test "x${COMPILE_TYPE}" = "xcross"; then
65562      # If cross compiling, create a separate env package for the build compiler
65563      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65564      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65565      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65566
65567  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65568      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65569            ${icecc_create_env_log_build} 2>&1 )
65570  if test "$?" != "0"; then
65571    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65572$as_echo "$as_me: icecc-create-env output:" >&6;}
65573    cat \
65574            ${icecc_create_env_log_build}
65575    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65576  fi
65577
65578      elif test "x${BUILD_CC##*/}" = "xclang"; then
65579
65580  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65581      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65582  if test "$?" != "0"; then
65583    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65584$as_echo "$as_me: icecc-create-env output:" >&6;}
65585    cat ${icecc_create_env_log_build}
65586    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65587  fi
65588
65589      else
65590        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65591      fi
65592      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65593      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65594      if test ! -f ${ICECC_ENV_BUNDLE}; then
65595        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65596      fi
65597      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65598$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65599      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65600$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65601      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65602          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65603    else
65604      BUILD_ICECC="${ICECC}"
65605    fi
65606
65607
65608  fi
65609
65610
65611# Can the C/C++ compiler use precompiled headers?
65612
65613
65614  ###############################################################################
65615  #
65616  # Can the C/C++ compiler use precompiled headers?
65617  #
65618  # Check whether --enable-precompiled-headers was given.
65619if test "${enable_precompiled_headers+set}" = set; then :
65620  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65621else
65622  ENABLE_PRECOMPH=yes
65623fi
65624
65625
65626  USE_PRECOMPILED_HEADER=1
65627  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65628$as_echo_n "checking If precompiled header is enabled... " >&6; }
65629  if test "x$ENABLE_PRECOMPH" = xno; then
65630    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65631$as_echo "no, forced" >&6; }
65632    USE_PRECOMPILED_HEADER=0
65633  elif test "x$ICECC" != "x"; then
65634    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65635$as_echo "no, does not work effectively with icecc" >&6; }
65636    USE_PRECOMPILED_HEADER=0
65637  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65638    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65639$as_echo "no, does not work with Solaris Studio" >&6; }
65640    USE_PRECOMPILED_HEADER=0
65641  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65642    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65643$as_echo "no, does not work with xlc" >&6; }
65644    USE_PRECOMPILED_HEADER=0
65645  else
65646    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65647$as_echo "yes" >&6; }
65648  fi
65649
65650  if test "x$ENABLE_PRECOMPH" = xyes; then
65651    # Check that the compiler actually supports precomp headers.
65652    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65653      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65654$as_echo_n "checking that precompiled headers work... " >&6; }
65655      echo "int alfa();" > conftest.h
65656      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65657      if test ! -f conftest.hpp.gch; then
65658        USE_PRECOMPILED_HEADER=0
65659        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65660$as_echo "no" >&6; }
65661      else
65662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65663$as_echo "yes" >&6; }
65664      fi
65665      $RM conftest.h conftest.hpp.gch
65666    fi
65667  fi
65668
65669
65670
65671
65672# Setup use of ccache, if available
65673
65674  # Check whether --enable-ccache was given.
65675if test "${enable_ccache+set}" = set; then :
65676  enableval=$enable_ccache;
65677fi
65678
65679
65680  CCACHE=
65681  CCACHE_STATUS=
65682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65683$as_echo_n "checking is ccache enabled... " >&6; }
65684  if test "x$enable_ccache" = xyes; then
65685    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65686      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65687$as_echo "yes" >&6; }
65688      OLD_PATH="$PATH"
65689      if test "x$TOOLCHAIN_PATH" != x; then
65690        PATH=$TOOLCHAIN_PATH:$PATH
65691      fi
65692
65693
65694
65695  # Publish this variable in the help.
65696
65697
65698  if [ -z "${CCACHE+x}" ]; then
65699    # The variable is not set by user, try to locate tool using the code snippet
65700    for ac_prog in ccache
65701do
65702  # Extract the first word of "$ac_prog", so it can be a program name with args.
65703set dummy $ac_prog; ac_word=$2
65704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65705$as_echo_n "checking for $ac_word... " >&6; }
65706if ${ac_cv_path_CCACHE+:} false; then :
65707  $as_echo_n "(cached) " >&6
65708else
65709  case $CCACHE in
65710  [\\/]* | ?:[\\/]*)
65711  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65712  ;;
65713  *)
65714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65715for as_dir in $PATH
65716do
65717  IFS=$as_save_IFS
65718  test -z "$as_dir" && as_dir=.
65719    for ac_exec_ext in '' $ac_executable_extensions; do
65720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65721    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65723    break 2
65724  fi
65725done
65726  done
65727IFS=$as_save_IFS
65728
65729  ;;
65730esac
65731fi
65732CCACHE=$ac_cv_path_CCACHE
65733if test -n "$CCACHE"; then
65734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65735$as_echo "$CCACHE" >&6; }
65736else
65737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65738$as_echo "no" >&6; }
65739fi
65740
65741
65742  test -n "$CCACHE" && break
65743done
65744
65745  else
65746    # The variable is set, but is it from the command line or the environment?
65747
65748    # Try to remove the string !CCACHE! from our list.
65749    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65750    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65751      # If it failed, the variable was not from the command line. Ignore it,
65752      # but warn the user (except for BASH, which is always set by the calling BASH).
65753      if test "xCCACHE" != xBASH; then
65754        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65755$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65756      fi
65757      # Try to locate tool using the code snippet
65758      for ac_prog in ccache
65759do
65760  # Extract the first word of "$ac_prog", so it can be a program name with args.
65761set dummy $ac_prog; ac_word=$2
65762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65763$as_echo_n "checking for $ac_word... " >&6; }
65764if ${ac_cv_path_CCACHE+:} false; then :
65765  $as_echo_n "(cached) " >&6
65766else
65767  case $CCACHE in
65768  [\\/]* | ?:[\\/]*)
65769  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65770  ;;
65771  *)
65772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65773for as_dir in $PATH
65774do
65775  IFS=$as_save_IFS
65776  test -z "$as_dir" && as_dir=.
65777    for ac_exec_ext in '' $ac_executable_extensions; do
65778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65779    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65781    break 2
65782  fi
65783done
65784  done
65785IFS=$as_save_IFS
65786
65787  ;;
65788esac
65789fi
65790CCACHE=$ac_cv_path_CCACHE
65791if test -n "$CCACHE"; then
65792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65793$as_echo "$CCACHE" >&6; }
65794else
65795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65796$as_echo "no" >&6; }
65797fi
65798
65799
65800  test -n "$CCACHE" && break
65801done
65802
65803    else
65804      # If it succeeded, then it was overridden by the user. We will use it
65805      # for the tool.
65806
65807      # First remove it from the list of overridden variables, so we can test
65808      # for unknown variables in the end.
65809      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65810
65811      # Check if we try to supply an empty value
65812      if test "x$CCACHE" = x; then
65813        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65814$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65816$as_echo_n "checking for CCACHE... " >&6; }
65817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65818$as_echo "disabled" >&6; }
65819      else
65820        # Check if the provided tool contains a complete path.
65821        tool_specified="$CCACHE"
65822        tool_basename="${tool_specified##*/}"
65823        if test "x$tool_basename" = "x$tool_specified"; then
65824          # A command without a complete path is provided, search $PATH.
65825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65826$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65827          # Extract the first word of "$tool_basename", so it can be a program name with args.
65828set dummy $tool_basename; ac_word=$2
65829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65830$as_echo_n "checking for $ac_word... " >&6; }
65831if ${ac_cv_path_CCACHE+:} false; then :
65832  $as_echo_n "(cached) " >&6
65833else
65834  case $CCACHE in
65835  [\\/]* | ?:[\\/]*)
65836  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65837  ;;
65838  *)
65839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65840for as_dir in $PATH
65841do
65842  IFS=$as_save_IFS
65843  test -z "$as_dir" && as_dir=.
65844    for ac_exec_ext in '' $ac_executable_extensions; do
65845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65846    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65848    break 2
65849  fi
65850done
65851  done
65852IFS=$as_save_IFS
65853
65854  ;;
65855esac
65856fi
65857CCACHE=$ac_cv_path_CCACHE
65858if test -n "$CCACHE"; then
65859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65860$as_echo "$CCACHE" >&6; }
65861else
65862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65863$as_echo "no" >&6; }
65864fi
65865
65866
65867          if test "x$CCACHE" = x; then
65868            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65869          fi
65870        else
65871          # Otherwise we believe it is a complete path. Use it as it is.
65872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65873$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65874          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65875$as_echo_n "checking for CCACHE... " >&6; }
65876          if test ! -x "$tool_specified"; then
65877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65878$as_echo "not found" >&6; }
65879            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65880          fi
65881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65882$as_echo "$tool_specified" >&6; }
65883        fi
65884      fi
65885    fi
65886
65887  fi
65888
65889
65890
65891  if test "x$CCACHE" = x; then
65892    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65893  fi
65894
65895
65896      PATH="$OLD_PATH"
65897      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65898      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65899    else
65900      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65901$as_echo "no" >&6; }
65902      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65903$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65904    fi
65905  elif test "x$enable_ccache" = xno; then
65906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65907$as_echo "no, explicitly disabled" >&6; }
65908    CCACHE_STATUS="Disabled"
65909  elif test "x$enable_ccache" = x; then
65910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65911$as_echo "no" >&6; }
65912  else
65913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65914$as_echo "unknown" >&6; }
65915    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65916  fi
65917
65918
65919
65920# Check whether --with-ccache-dir was given.
65921if test "${with_ccache_dir+set}" = set; then :
65922  withval=$with_ccache_dir;
65923fi
65924
65925
65926  if test "x$with_ccache_dir" != x; then
65927    # When using a non home ccache directory, assume the use is to share ccache files
65928    # with other users. Thus change the umask.
65929    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65930    if test "x$CCACHE" = x; then
65931      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65932$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65933    fi
65934  fi
65935
65936  if test "x$CCACHE" != x; then
65937
65938  if test "x$CCACHE" != x; then
65939    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65940      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65941          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65942      if test "x$HAS_BAD_CCACHE" != "x"; then
65943        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65944      fi
65945      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65946$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65947      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65948      PUSHED_FLAGS="$CXXFLAGS"
65949      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65950      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65951/* end confdefs.h.  */
65952
65953int
65954main ()
65955{
65956
65957  ;
65958  return 0;
65959}
65960_ACEOF
65961if ac_fn_cxx_try_compile "$LINENO"; then :
65962  CC_KNOWS_CCACHE_TRICK=yes
65963else
65964  CC_KNOWS_CCACHE_TRICK=no
65965fi
65966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65967      CXXFLAGS="$PUSHED_FLAGS"
65968      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65970$as_echo "yes" >&6; }
65971        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65972
65973        CCACHE_SLOPPINESS=pch_defines,time_macros
65974      else
65975        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65976$as_echo "no" >&6; }
65977        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65978      fi
65979    fi
65980
65981    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65982        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65983
65984    if test "x$SET_CCACHE_DIR" != x; then
65985      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65986      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65987    fi
65988  fi
65989
65990  fi
65991
65992
65993###############################################################################
65994#
65995# And now the finish...
65996#
65997###############################################################################
65998
65999# Check for some common pitfalls
66000
66001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66002    file_to_test="$SRC_ROOT/LICENSE"
66003    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66004      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
66005    fi
66006  fi
66007
66008
66009  # Did user specify any unknown variables?
66010
66011  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66012    # Replace the separating ! with spaces before presenting for end user.
66013    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66014    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66015$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66016  fi
66017
66018
66019  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66020$as_echo_n "checking if build directory is on local disk... " >&6; }
66021
66022  # df -l lists only local disks; if the given directory is not found then
66023  # a non-zero exit code is given
66024  if test "x$DF" = x; then
66025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66026      # msys does not have df; use Windows "net use" instead.
66027      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66028      if test "x$IS_NETWORK_DISK" = x; then
66029        OUTPUT_DIR_IS_LOCAL="yes"
66030      else
66031        OUTPUT_DIR_IS_LOCAL="no"
66032      fi
66033    else
66034      # No df here, say it's local
66035      OUTPUT_DIR_IS_LOCAL="yes"
66036    fi
66037  else
66038    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66039      OUTPUT_DIR_IS_LOCAL="yes"
66040    else
66041      OUTPUT_DIR_IS_LOCAL="no"
66042    fi
66043  fi
66044
66045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66046$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66047
66048
66049
66050  # Check if the user has any old-style ALT_ variables set.
66051  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66052
66053  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66054  # Since we can't properly handle the dependencies for this, warn the user about the situation
66055  if test -e $OUTPUT_ROOT/spec.gmk; then
66056    IS_RECONFIGURE=yes
66057  else
66058    IS_RECONFIGURE=no
66059  fi
66060
66061
66062# At the end, call the custom hook. (Dummy macro if no custom sources available)
66063
66064
66065# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66066
66067  # Keep feature lists sorted and free of duplicates
66068  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66069  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66070  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66071  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66072  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66073  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66074  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66075
66076  # Validate features
66077  for variant in $JVM_VARIANTS; do
66078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66079$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66080    features_var_name=JVM_FEATURES_$variant
66081    JVM_FEATURES_TO_TEST=${!features_var_name}
66082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66083$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66084    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66085    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66086    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66087    if test "x$INVALID_FEATURES" != x; then
66088      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66089    fi
66090  done
66091
66092
66093# We're messing a bit with internal autoconf variables to put the config.status
66094# in the output directory instead of the current directory.
66095CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66096
66097# Create the actual output files. Now the main work of configure is done.
66098cat >confcache <<\_ACEOF
66099# This file is a shell script that caches the results of configure
66100# tests run on this system so they can be shared between configure
66101# scripts and configure runs, see configure's option --config-cache.
66102# It is not useful on other systems.  If it contains results you don't
66103# want to keep, you may remove or edit it.
66104#
66105# config.status only pays attention to the cache file if you give it
66106# the --recheck option to rerun configure.
66107#
66108# `ac_cv_env_foo' variables (set or unset) will be overridden when
66109# loading this file, other *unset* `ac_cv_foo' will be assigned the
66110# following values.
66111
66112_ACEOF
66113
66114# The following way of writing the cache mishandles newlines in values,
66115# but we know of no workaround that is simple, portable, and efficient.
66116# So, we kill variables containing newlines.
66117# Ultrix sh set writes to stderr and can't be redirected directly,
66118# and sets the high bit in the cache file unless we assign to the vars.
66119(
66120  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66121    eval ac_val=\$$ac_var
66122    case $ac_val in #(
66123    *${as_nl}*)
66124      case $ac_var in #(
66125      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66126$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66127      esac
66128      case $ac_var in #(
66129      _ | IFS | as_nl) ;; #(
66130      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66131      *) { eval $ac_var=; unset $ac_var;} ;;
66132      esac ;;
66133    esac
66134  done
66135
66136  (set) 2>&1 |
66137    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66138    *${as_nl}ac_space=\ *)
66139      # `set' does not quote correctly, so add quotes: double-quote
66140      # substitution turns \\\\ into \\, and sed turns \\ into \.
66141      sed -n \
66142	"s/'/'\\\\''/g;
66143	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66144      ;; #(
66145    *)
66146      # `set' quotes correctly as required by POSIX, so do not add quotes.
66147      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66148      ;;
66149    esac |
66150    sort
66151) |
66152  sed '
66153     /^ac_cv_env_/b end
66154     t clear
66155     :clear
66156     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66157     t end
66158     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66159     :end' >>confcache
66160if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66161  if test -w "$cache_file"; then
66162    if test "x$cache_file" != "x/dev/null"; then
66163      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66164$as_echo "$as_me: updating cache $cache_file" >&6;}
66165      if test ! -f "$cache_file" || test -h "$cache_file"; then
66166	cat confcache >"$cache_file"
66167      else
66168        case $cache_file in #(
66169        */* | ?:*)
66170	  mv -f confcache "$cache_file"$$ &&
66171	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66172        *)
66173	  mv -f confcache "$cache_file" ;;
66174	esac
66175      fi
66176    fi
66177  else
66178    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66179$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66180  fi
66181fi
66182rm -f confcache
66183
66184test "x$prefix" = xNONE && prefix=$ac_default_prefix
66185# Let make expand exec_prefix.
66186test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66187
66188# Transform confdefs.h into DEFS.
66189# Protect against shell expansion while executing Makefile rules.
66190# Protect against Makefile macro expansion.
66191#
66192# If the first sed substitution is executed (which looks for macros that
66193# take arguments), then branch to the quote section.  Otherwise,
66194# look for a macro that doesn't take arguments.
66195ac_script='
66196:mline
66197/\\$/{
66198 N
66199 s,\\\n,,
66200 b mline
66201}
66202t clear
66203:clear
66204s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66205t quote
66206s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66207t quote
66208b any
66209:quote
66210s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66211s/\[/\\&/g
66212s/\]/\\&/g
66213s/\$/$$/g
66214H
66215:any
66216${
66217	g
66218	s/^\n//
66219	s/\n/ /g
66220	p
66221}
66222'
66223DEFS=`sed -n "$ac_script" confdefs.h`
66224
66225
66226ac_libobjs=
66227ac_ltlibobjs=
66228U=
66229for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66230  # 1. Remove the extension, and $U if already installed.
66231  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66232  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66233  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66234  #    will be set to the directory where LIBOBJS objects are built.
66235  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66236  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66237done
66238LIBOBJS=$ac_libobjs
66239
66240LTLIBOBJS=$ac_ltlibobjs
66241
66242
66243
66244: "${CONFIG_STATUS=./config.status}"
66245ac_write_fail=0
66246ac_clean_files_save=$ac_clean_files
66247ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66248{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66249$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66250as_write_fail=0
66251cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66252#! $SHELL
66253# Generated by $as_me.
66254# Run this file to recreate the current configuration.
66255# Compiler output produced by configure, useful for debugging
66256# configure, is in config.log if it exists.
66257
66258debug=false
66259ac_cs_recheck=false
66260ac_cs_silent=false
66261
66262SHELL=\${CONFIG_SHELL-$SHELL}
66263export SHELL
66264_ASEOF
66265cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66266## -------------------- ##
66267## M4sh Initialization. ##
66268## -------------------- ##
66269
66270# Be more Bourne compatible
66271DUALCASE=1; export DUALCASE # for MKS sh
66272if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66273  emulate sh
66274  NULLCMD=:
66275  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66276  # is contrary to our usage.  Disable this feature.
66277  alias -g '${1+"$@"}'='"$@"'
66278  setopt NO_GLOB_SUBST
66279else
66280  case `(set -o) 2>/dev/null` in #(
66281  *posix*) :
66282    set -o posix ;; #(
66283  *) :
66284     ;;
66285esac
66286fi
66287
66288
66289as_nl='
66290'
66291export as_nl
66292# Printing a long string crashes Solaris 7 /usr/bin/printf.
66293as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66294as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66295as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66296# Prefer a ksh shell builtin over an external printf program on Solaris,
66297# but without wasting forks for bash or zsh.
66298if test -z "$BASH_VERSION$ZSH_VERSION" \
66299    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66300  as_echo='print -r --'
66301  as_echo_n='print -rn --'
66302elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66303  as_echo='printf %s\n'
66304  as_echo_n='printf %s'
66305else
66306  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66307    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66308    as_echo_n='/usr/ucb/echo -n'
66309  else
66310    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66311    as_echo_n_body='eval
66312      arg=$1;
66313      case $arg in #(
66314      *"$as_nl"*)
66315	expr "X$arg" : "X\\(.*\\)$as_nl";
66316	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66317      esac;
66318      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66319    '
66320    export as_echo_n_body
66321    as_echo_n='sh -c $as_echo_n_body as_echo'
66322  fi
66323  export as_echo_body
66324  as_echo='sh -c $as_echo_body as_echo'
66325fi
66326
66327# The user is always right.
66328if test "${PATH_SEPARATOR+set}" != set; then
66329  PATH_SEPARATOR=:
66330  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66331    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66332      PATH_SEPARATOR=';'
66333  }
66334fi
66335
66336
66337# IFS
66338# We need space, tab and new line, in precisely that order.  Quoting is
66339# there to prevent editors from complaining about space-tab.
66340# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66341# splitting by setting IFS to empty value.)
66342IFS=" ""	$as_nl"
66343
66344# Find who we are.  Look in the path if we contain no directory separator.
66345as_myself=
66346case $0 in #((
66347  *[\\/]* ) as_myself=$0 ;;
66348  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66349for as_dir in $PATH
66350do
66351  IFS=$as_save_IFS
66352  test -z "$as_dir" && as_dir=.
66353    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66354  done
66355IFS=$as_save_IFS
66356
66357     ;;
66358esac
66359# We did not find ourselves, most probably we were run as `sh COMMAND'
66360# in which case we are not to be found in the path.
66361if test "x$as_myself" = x; then
66362  as_myself=$0
66363fi
66364if test ! -f "$as_myself"; then
66365  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66366  exit 1
66367fi
66368
66369# Unset variables that we do not need and which cause bugs (e.g. in
66370# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66371# suppresses any "Segmentation fault" message there.  '((' could
66372# trigger a bug in pdksh 5.2.14.
66373for as_var in BASH_ENV ENV MAIL MAILPATH
66374do eval test x\${$as_var+set} = xset \
66375  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66376done
66377PS1='$ '
66378PS2='> '
66379PS4='+ '
66380
66381# NLS nuisances.
66382LC_ALL=C
66383export LC_ALL
66384LANGUAGE=C
66385export LANGUAGE
66386
66387# CDPATH.
66388(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66389
66390
66391# as_fn_error STATUS ERROR [LINENO LOG_FD]
66392# ----------------------------------------
66393# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66394# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66395# script with STATUS, using 1 if that was 0.
66396as_fn_error ()
66397{
66398  as_status=$1; test $as_status -eq 0 && as_status=1
66399  if test "$4"; then
66400    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66401    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66402  fi
66403  $as_echo "$as_me: error: $2" >&2
66404  as_fn_exit $as_status
66405} # as_fn_error
66406
66407
66408# as_fn_set_status STATUS
66409# -----------------------
66410# Set $? to STATUS, without forking.
66411as_fn_set_status ()
66412{
66413  return $1
66414} # as_fn_set_status
66415
66416# as_fn_exit STATUS
66417# -----------------
66418# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66419as_fn_exit ()
66420{
66421  set +e
66422  as_fn_set_status $1
66423  exit $1
66424} # as_fn_exit
66425
66426# as_fn_unset VAR
66427# ---------------
66428# Portably unset VAR.
66429as_fn_unset ()
66430{
66431  { eval $1=; unset $1;}
66432}
66433as_unset=as_fn_unset
66434# as_fn_append VAR VALUE
66435# ----------------------
66436# Append the text in VALUE to the end of the definition contained in VAR. Take
66437# advantage of any shell optimizations that allow amortized linear growth over
66438# repeated appends, instead of the typical quadratic growth present in naive
66439# implementations.
66440if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66441  eval 'as_fn_append ()
66442  {
66443    eval $1+=\$2
66444  }'
66445else
66446  as_fn_append ()
66447  {
66448    eval $1=\$$1\$2
66449  }
66450fi # as_fn_append
66451
66452# as_fn_arith ARG...
66453# ------------------
66454# Perform arithmetic evaluation on the ARGs, and store the result in the
66455# global $as_val. Take advantage of shells that can avoid forks. The arguments
66456# must be portable across $(()) and expr.
66457if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66458  eval 'as_fn_arith ()
66459  {
66460    as_val=$(( $* ))
66461  }'
66462else
66463  as_fn_arith ()
66464  {
66465    as_val=`expr "$@" || test $? -eq 1`
66466  }
66467fi # as_fn_arith
66468
66469
66470if expr a : '\(a\)' >/dev/null 2>&1 &&
66471   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66472  as_expr=expr
66473else
66474  as_expr=false
66475fi
66476
66477if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66478  as_basename=basename
66479else
66480  as_basename=false
66481fi
66482
66483if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66484  as_dirname=dirname
66485else
66486  as_dirname=false
66487fi
66488
66489as_me=`$as_basename -- "$0" ||
66490$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66491	 X"$0" : 'X\(//\)$' \| \
66492	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66493$as_echo X/"$0" |
66494    sed '/^.*\/\([^/][^/]*\)\/*$/{
66495	    s//\1/
66496	    q
66497	  }
66498	  /^X\/\(\/\/\)$/{
66499	    s//\1/
66500	    q
66501	  }
66502	  /^X\/\(\/\).*/{
66503	    s//\1/
66504	    q
66505	  }
66506	  s/.*/./; q'`
66507
66508# Avoid depending upon Character Ranges.
66509as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66510as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66511as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66512as_cr_digits='0123456789'
66513as_cr_alnum=$as_cr_Letters$as_cr_digits
66514
66515ECHO_C= ECHO_N= ECHO_T=
66516case `echo -n x` in #(((((
66517-n*)
66518  case `echo 'xy\c'` in
66519  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66520  xy)  ECHO_C='\c';;
66521  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66522       ECHO_T='	';;
66523  esac;;
66524*)
66525  ECHO_N='-n';;
66526esac
66527
66528rm -f conf$$ conf$$.exe conf$$.file
66529if test -d conf$$.dir; then
66530  rm -f conf$$.dir/conf$$.file
66531else
66532  rm -f conf$$.dir
66533  mkdir conf$$.dir 2>/dev/null
66534fi
66535if (echo >conf$$.file) 2>/dev/null; then
66536  if ln -s conf$$.file conf$$ 2>/dev/null; then
66537    as_ln_s='ln -s'
66538    # ... but there are two gotchas:
66539    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66540    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66541    # In both cases, we have to default to `cp -pR'.
66542    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66543      as_ln_s='cp -pR'
66544  elif ln conf$$.file conf$$ 2>/dev/null; then
66545    as_ln_s=ln
66546  else
66547    as_ln_s='cp -pR'
66548  fi
66549else
66550  as_ln_s='cp -pR'
66551fi
66552rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66553rmdir conf$$.dir 2>/dev/null
66554
66555
66556# as_fn_mkdir_p
66557# -------------
66558# Create "$as_dir" as a directory, including parents if necessary.
66559as_fn_mkdir_p ()
66560{
66561
66562  case $as_dir in #(
66563  -*) as_dir=./$as_dir;;
66564  esac
66565  test -d "$as_dir" || eval $as_mkdir_p || {
66566    as_dirs=
66567    while :; do
66568      case $as_dir in #(
66569      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66570      *) as_qdir=$as_dir;;
66571      esac
66572      as_dirs="'$as_qdir' $as_dirs"
66573      as_dir=`$as_dirname -- "$as_dir" ||
66574$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66575	 X"$as_dir" : 'X\(//\)[^/]' \| \
66576	 X"$as_dir" : 'X\(//\)$' \| \
66577	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66578$as_echo X"$as_dir" |
66579    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66580	    s//\1/
66581	    q
66582	  }
66583	  /^X\(\/\/\)[^/].*/{
66584	    s//\1/
66585	    q
66586	  }
66587	  /^X\(\/\/\)$/{
66588	    s//\1/
66589	    q
66590	  }
66591	  /^X\(\/\).*/{
66592	    s//\1/
66593	    q
66594	  }
66595	  s/.*/./; q'`
66596      test -d "$as_dir" && break
66597    done
66598    test -z "$as_dirs" || eval "mkdir $as_dirs"
66599  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66600
66601
66602} # as_fn_mkdir_p
66603if mkdir -p . 2>/dev/null; then
66604  as_mkdir_p='mkdir -p "$as_dir"'
66605else
66606  test -d ./-p && rmdir ./-p
66607  as_mkdir_p=false
66608fi
66609
66610
66611# as_fn_executable_p FILE
66612# -----------------------
66613# Test if FILE is an executable regular file.
66614as_fn_executable_p ()
66615{
66616  test -f "$1" && test -x "$1"
66617} # as_fn_executable_p
66618as_test_x='test -x'
66619as_executable_p=as_fn_executable_p
66620
66621# Sed expression to map a string onto a valid CPP name.
66622as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66623
66624# Sed expression to map a string onto a valid variable name.
66625as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66626
66627
66628exec 6>&1
66629## ----------------------------------- ##
66630## Main body of $CONFIG_STATUS script. ##
66631## ----------------------------------- ##
66632_ASEOF
66633test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66634
66635cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66636# Save the log message, to keep $0 and so on meaningful, and to
66637# report actual input values of CONFIG_FILES etc. instead of their
66638# values after options handling.
66639ac_log="
66640This file was extended by OpenJDK $as_me jdk9, which was
66641generated by GNU Autoconf 2.69.  Invocation command line was
66642
66643  CONFIG_FILES    = $CONFIG_FILES
66644  CONFIG_HEADERS  = $CONFIG_HEADERS
66645  CONFIG_LINKS    = $CONFIG_LINKS
66646  CONFIG_COMMANDS = $CONFIG_COMMANDS
66647  $ $0 $@
66648
66649on `(hostname || uname -n) 2>/dev/null | sed 1q`
66650"
66651
66652_ACEOF
66653
66654case $ac_config_files in *"
66655"*) set x $ac_config_files; shift; ac_config_files=$*;;
66656esac
66657
66658
66659
66660cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66661# Files that config.status was made for.
66662config_files="$ac_config_files"
66663
66664_ACEOF
66665
66666cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66667ac_cs_usage="\
66668\`$as_me' instantiates files and other configuration actions
66669from templates according to the current configuration.  Unless the files
66670and actions are specified as TAGs, all are instantiated by default.
66671
66672Usage: $0 [OPTION]... [TAG]...
66673
66674  -h, --help       print this help, then exit
66675  -V, --version    print version number and configuration settings, then exit
66676      --config     print configuration, then exit
66677  -q, --quiet, --silent
66678                   do not print progress messages
66679  -d, --debug      don't remove temporary files
66680      --recheck    update $as_me by reconfiguring in the same conditions
66681      --file=FILE[:TEMPLATE]
66682                   instantiate the configuration file FILE
66683
66684Configuration files:
66685$config_files
66686
66687Report bugs to <build-dev@openjdk.java.net>.
66688OpenJDK home page: <http://openjdk.java.net>."
66689
66690_ACEOF
66691cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66692ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66693ac_cs_version="\\
66694OpenJDK config.status jdk9
66695configured by $0, generated by GNU Autoconf 2.69,
66696  with options \\"\$ac_cs_config\\"
66697
66698Copyright (C) 2012 Free Software Foundation, Inc.
66699This config.status script is free software; the Free Software Foundation
66700gives unlimited permission to copy, distribute and modify it."
66701
66702ac_pwd='$ac_pwd'
66703srcdir='$srcdir'
66704AWK='$AWK'
66705test -n "\$AWK" || AWK=awk
66706_ACEOF
66707
66708cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66709# The default lists apply if the user does not specify any file.
66710ac_need_defaults=:
66711while test $# != 0
66712do
66713  case $1 in
66714  --*=?*)
66715    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66716    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66717    ac_shift=:
66718    ;;
66719  --*=)
66720    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66721    ac_optarg=
66722    ac_shift=:
66723    ;;
66724  *)
66725    ac_option=$1
66726    ac_optarg=$2
66727    ac_shift=shift
66728    ;;
66729  esac
66730
66731  case $ac_option in
66732  # Handling of the options.
66733  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66734    ac_cs_recheck=: ;;
66735  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66736    $as_echo "$ac_cs_version"; exit ;;
66737  --config | --confi | --conf | --con | --co | --c )
66738    $as_echo "$ac_cs_config"; exit ;;
66739  --debug | --debu | --deb | --de | --d | -d )
66740    debug=: ;;
66741  --file | --fil | --fi | --f )
66742    $ac_shift
66743    case $ac_optarg in
66744    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66745    '') as_fn_error $? "missing file argument" ;;
66746    esac
66747    as_fn_append CONFIG_FILES " '$ac_optarg'"
66748    ac_need_defaults=false;;
66749  --he | --h |  --help | --hel | -h )
66750    $as_echo "$ac_cs_usage"; exit ;;
66751  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66752  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66753    ac_cs_silent=: ;;
66754
66755  # This is an error.
66756  -*) as_fn_error $? "unrecognized option: \`$1'
66757Try \`$0 --help' for more information." ;;
66758
66759  *) as_fn_append ac_config_targets " $1"
66760     ac_need_defaults=false ;;
66761
66762  esac
66763  shift
66764done
66765
66766ac_configure_extra_args=
66767
66768if $ac_cs_silent; then
66769  exec 6>/dev/null
66770  ac_configure_extra_args="$ac_configure_extra_args --silent"
66771fi
66772
66773_ACEOF
66774cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66775if \$ac_cs_recheck; then
66776  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66777  shift
66778  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66779  CONFIG_SHELL='$SHELL'
66780  export CONFIG_SHELL
66781  exec "\$@"
66782fi
66783
66784_ACEOF
66785cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66786exec 5>>config.log
66787{
66788  echo
66789  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66790## Running $as_me. ##
66791_ASBOX
66792  $as_echo "$ac_log"
66793} >&5
66794
66795_ACEOF
66796cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66797_ACEOF
66798
66799cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66800
66801# Handling of arguments.
66802for ac_config_target in $ac_config_targets
66803do
66804  case $ac_config_target in
66805    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66806    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66807    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66808    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66809    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66810
66811  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66812  esac
66813done
66814
66815
66816# If the user did not use the arguments to specify the items to instantiate,
66817# then the envvar interface is used.  Set only those that are not.
66818# We use the long form for the default assignment because of an extremely
66819# bizarre bug on SunOS 4.1.3.
66820if $ac_need_defaults; then
66821  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66822fi
66823
66824# Have a temporary directory for convenience.  Make it in the build tree
66825# simply because there is no reason against having it here, and in addition,
66826# creating and moving files from /tmp can sometimes cause problems.
66827# Hook for its removal unless debugging.
66828# Note that there is a small window in which the directory will not be cleaned:
66829# after its creation but before its name has been assigned to `$tmp'.
66830$debug ||
66831{
66832  tmp= ac_tmp=
66833  trap 'exit_status=$?
66834  : "${ac_tmp:=$tmp}"
66835  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66836' 0
66837  trap 'as_fn_exit 1' 1 2 13 15
66838}
66839# Create a (secure) tmp directory for tmp files.
66840
66841{
66842  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66843  test -d "$tmp"
66844}  ||
66845{
66846  tmp=./conf$$-$RANDOM
66847  (umask 077 && mkdir "$tmp")
66848} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66849ac_tmp=$tmp
66850
66851# Set up the scripts for CONFIG_FILES section.
66852# No need to generate them if there are no CONFIG_FILES.
66853# This happens for instance with `./config.status config.h'.
66854if test -n "$CONFIG_FILES"; then
66855
66856
66857ac_cr=`echo X | tr X '\015'`
66858# On cygwin, bash can eat \r inside `` if the user requested igncr.
66859# But we know of no other shell where ac_cr would be empty at this
66860# point, so we can use a bashism as a fallback.
66861if test "x$ac_cr" = x; then
66862  eval ac_cr=\$\'\\r\'
66863fi
66864ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66865if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66866  ac_cs_awk_cr='\\r'
66867else
66868  ac_cs_awk_cr=$ac_cr
66869fi
66870
66871echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66872_ACEOF
66873
66874
66875{
66876  echo "cat >conf$$subs.awk <<_ACEOF" &&
66877  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66878  echo "_ACEOF"
66879} >conf$$subs.sh ||
66880  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66881ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66882ac_delim='%!_!# '
66883for ac_last_try in false false false false false :; do
66884  . ./conf$$subs.sh ||
66885    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66886
66887  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66888  if test $ac_delim_n = $ac_delim_num; then
66889    break
66890  elif $ac_last_try; then
66891    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66892  else
66893    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66894  fi
66895done
66896rm -f conf$$subs.sh
66897
66898cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66899cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66900_ACEOF
66901sed -n '
66902h
66903s/^/S["/; s/!.*/"]=/
66904p
66905g
66906s/^[^!]*!//
66907:repl
66908t repl
66909s/'"$ac_delim"'$//
66910t delim
66911:nl
66912h
66913s/\(.\{148\}\)..*/\1/
66914t more1
66915s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66916p
66917n
66918b repl
66919:more1
66920s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66921p
66922g
66923s/.\{148\}//
66924t nl
66925:delim
66926h
66927s/\(.\{148\}\)..*/\1/
66928t more2
66929s/["\\]/\\&/g; s/^/"/; s/$/"/
66930p
66931b
66932:more2
66933s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66934p
66935g
66936s/.\{148\}//
66937t delim
66938' <conf$$subs.awk | sed '
66939/^[^""]/{
66940  N
66941  s/\n//
66942}
66943' >>$CONFIG_STATUS || ac_write_fail=1
66944rm -f conf$$subs.awk
66945cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66946_ACAWK
66947cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66948  for (key in S) S_is_set[key] = 1
66949  FS = ""
66950
66951}
66952{
66953  line = $ 0
66954  nfields = split(line, field, "@")
66955  substed = 0
66956  len = length(field[1])
66957  for (i = 2; i < nfields; i++) {
66958    key = field[i]
66959    keylen = length(key)
66960    if (S_is_set[key]) {
66961      value = S[key]
66962      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66963      len += length(value) + length(field[++i])
66964      substed = 1
66965    } else
66966      len += 1 + keylen
66967  }
66968
66969  print line
66970}
66971
66972_ACAWK
66973_ACEOF
66974cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66975if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66976  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66977else
66978  cat
66979fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66980  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66981_ACEOF
66982
66983# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66984# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66985# trailing colons and then remove the whole line if VPATH becomes empty
66986# (actually we leave an empty line to preserve line numbers).
66987if test "x$srcdir" = x.; then
66988  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66989h
66990s///
66991s/^/:/
66992s/[	 ]*$/:/
66993s/:\$(srcdir):/:/g
66994s/:\${srcdir}:/:/g
66995s/:@srcdir@:/:/g
66996s/^:*//
66997s/:*$//
66998x
66999s/\(=[	 ]*\).*/\1/
67000G
67001s/\n//
67002s/^[^=]*=[	 ]*$//
67003}'
67004fi
67005
67006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67007fi # test -n "$CONFIG_FILES"
67008
67009
67010eval set X "  :F $CONFIG_FILES      "
67011shift
67012for ac_tag
67013do
67014  case $ac_tag in
67015  :[FHLC]) ac_mode=$ac_tag; continue;;
67016  esac
67017  case $ac_mode$ac_tag in
67018  :[FHL]*:*);;
67019  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67020  :[FH]-) ac_tag=-:-;;
67021  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67022  esac
67023  ac_save_IFS=$IFS
67024  IFS=:
67025  set x $ac_tag
67026  IFS=$ac_save_IFS
67027  shift
67028  ac_file=$1
67029  shift
67030
67031  case $ac_mode in
67032  :L) ac_source=$1;;
67033  :[FH])
67034    ac_file_inputs=
67035    for ac_f
67036    do
67037      case $ac_f in
67038      -) ac_f="$ac_tmp/stdin";;
67039      *) # Look for the file first in the build tree, then in the source tree
67040	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67041	 # because $ac_f cannot contain `:'.
67042	 test -f "$ac_f" ||
67043	   case $ac_f in
67044	   [\\/$]*) false;;
67045	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67046	   esac ||
67047	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67048      esac
67049      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67050      as_fn_append ac_file_inputs " '$ac_f'"
67051    done
67052
67053    # Let's still pretend it is `configure' which instantiates (i.e., don't
67054    # use $as_me), people would be surprised to read:
67055    #    /* config.h.  Generated by config.status.  */
67056    configure_input='Generated from '`
67057	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67058	`' by configure.'
67059    if test x"$ac_file" != x-; then
67060      configure_input="$ac_file.  $configure_input"
67061      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67062$as_echo "$as_me: creating $ac_file" >&6;}
67063    fi
67064    # Neutralize special characters interpreted by sed in replacement strings.
67065    case $configure_input in #(
67066    *\&* | *\|* | *\\* )
67067       ac_sed_conf_input=`$as_echo "$configure_input" |
67068       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67069    *) ac_sed_conf_input=$configure_input;;
67070    esac
67071
67072    case $ac_tag in
67073    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67074      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67075    esac
67076    ;;
67077  esac
67078
67079  ac_dir=`$as_dirname -- "$ac_file" ||
67080$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67081	 X"$ac_file" : 'X\(//\)[^/]' \| \
67082	 X"$ac_file" : 'X\(//\)$' \| \
67083	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67084$as_echo X"$ac_file" |
67085    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67086	    s//\1/
67087	    q
67088	  }
67089	  /^X\(\/\/\)[^/].*/{
67090	    s//\1/
67091	    q
67092	  }
67093	  /^X\(\/\/\)$/{
67094	    s//\1/
67095	    q
67096	  }
67097	  /^X\(\/\).*/{
67098	    s//\1/
67099	    q
67100	  }
67101	  s/.*/./; q'`
67102  as_dir="$ac_dir"; as_fn_mkdir_p
67103  ac_builddir=.
67104
67105case "$ac_dir" in
67106.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67107*)
67108  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67109  # A ".." for each directory in $ac_dir_suffix.
67110  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67111  case $ac_top_builddir_sub in
67112  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67113  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67114  esac ;;
67115esac
67116ac_abs_top_builddir=$ac_pwd
67117ac_abs_builddir=$ac_pwd$ac_dir_suffix
67118# for backward compatibility:
67119ac_top_builddir=$ac_top_build_prefix
67120
67121case $srcdir in
67122  .)  # We are building in place.
67123    ac_srcdir=.
67124    ac_top_srcdir=$ac_top_builddir_sub
67125    ac_abs_top_srcdir=$ac_pwd ;;
67126  [\\/]* | ?:[\\/]* )  # Absolute name.
67127    ac_srcdir=$srcdir$ac_dir_suffix;
67128    ac_top_srcdir=$srcdir
67129    ac_abs_top_srcdir=$srcdir ;;
67130  *) # Relative name.
67131    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67132    ac_top_srcdir=$ac_top_build_prefix$srcdir
67133    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67134esac
67135ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67136
67137
67138  case $ac_mode in
67139  :F)
67140  #
67141  # CONFIG_FILE
67142  #
67143
67144_ACEOF
67145
67146cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67147# If the template does not know about datarootdir, expand it.
67148# FIXME: This hack should be removed a few years after 2.60.
67149ac_datarootdir_hack=; ac_datarootdir_seen=
67150ac_sed_dataroot='
67151/datarootdir/ {
67152  p
67153  q
67154}
67155/@datadir@/p
67156/@docdir@/p
67157/@infodir@/p
67158/@localedir@/p
67159/@mandir@/p'
67160case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67161*datarootdir*) ac_datarootdir_seen=yes;;
67162*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67163  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67164$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67165_ACEOF
67166cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67167  ac_datarootdir_hack='
67168  s&@datadir@&$datadir&g
67169  s&@docdir@&$docdir&g
67170  s&@infodir@&$infodir&g
67171  s&@localedir@&$localedir&g
67172  s&@mandir@&$mandir&g
67173  s&\\\${datarootdir}&$datarootdir&g' ;;
67174esac
67175_ACEOF
67176
67177# Neutralize VPATH when `$srcdir' = `.'.
67178# Shell code in configure.ac might set extrasub.
67179# FIXME: do we really want to maintain this feature?
67180cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67181ac_sed_extra="$ac_vpsub
67182$extrasub
67183_ACEOF
67184cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67185:t
67186/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67187s|@configure_input@|$ac_sed_conf_input|;t t
67188s&@top_builddir@&$ac_top_builddir_sub&;t t
67189s&@top_build_prefix@&$ac_top_build_prefix&;t t
67190s&@srcdir@&$ac_srcdir&;t t
67191s&@abs_srcdir@&$ac_abs_srcdir&;t t
67192s&@top_srcdir@&$ac_top_srcdir&;t t
67193s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67194s&@builddir@&$ac_builddir&;t t
67195s&@abs_builddir@&$ac_abs_builddir&;t t
67196s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67197$ac_datarootdir_hack
67198"
67199eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67200  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67201
67202test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67203  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67204  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67205      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67206  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67207which seems to be undefined.  Please make sure it is defined" >&5
67208$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67209which seems to be undefined.  Please make sure it is defined" >&2;}
67210
67211  rm -f "$ac_tmp/stdin"
67212  case $ac_file in
67213  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67214  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67215  esac \
67216  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67217 ;;
67218
67219
67220
67221  esac
67222
67223done # for ac_tag
67224
67225
67226as_fn_exit 0
67227_ACEOF
67228ac_clean_files=$ac_clean_files_save
67229
67230test $ac_write_fail = 0 ||
67231  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67232
67233
67234# configure is writing to config.log, and then calls config.status.
67235# config.status does its own redirection, appending to config.log.
67236# Unfortunately, on DOS this fails, as config.log is still kept open
67237# by configure, so config.status won't be able to write to it; its
67238# output is simply discarded.  So we exec the FD to /dev/null,
67239# effectively closing config.log, so it can be properly (re)opened and
67240# appended to by config.status.  When coming back to configure, we
67241# need to make the FD available again.
67242if test "$no_create" != yes; then
67243  ac_cs_success=:
67244  ac_config_status_args=
67245  test "$silent" = yes &&
67246    ac_config_status_args="$ac_config_status_args --quiet"
67247  exec 5>/dev/null
67248  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67249  exec 5>>config.log
67250  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67251  # would make configure fail if this is the last instruction.
67252  $ac_cs_success || as_fn_exit 1
67253fi
67254if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67255  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67256$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67257fi
67258
67259
67260# After AC_OUTPUT, we need to do final work
67261
67262
67263  # Try to move config.log (generated by autoconf) to the configure-support directory.
67264  if test -e ./config.log; then
67265    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67266  fi
67267
67268  # Rotate our log file (configure.log)
67269  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67270    $RM -f "$OUTPUT_ROOT/configure.log.old"
67271  fi
67272  if test -e "$OUTPUT_ROOT/configure.log"; then
67273    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67274  fi
67275
67276  # Move configure.log from current directory to the build output root
67277  if test -e ./configure.log; then
67278    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67279  fi
67280
67281  # Make the compare script executable
67282  $CHMOD +x $OUTPUT_ROOT/compare.sh
67283
67284
67285# Finally output some useful information to the user
67286
67287  # Finally output some useful information to the user
67288
67289  printf "\n"
67290  printf "====================================================\n"
67291  if test "x$no_create" != "xyes"; then
67292    if test "x$IS_RECONFIGURE" != "xyes"; then
67293      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67294    else
67295      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67296    fi
67297  else
67298    if test "x$IS_RECONFIGURE" != "xyes"; then
67299      printf "A configuration has been successfully checked but not created\n"
67300    else
67301      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67302    fi
67303  fi
67304  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67305    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67306  else
67307    printf "using default settings.\n"
67308  fi
67309
67310  printf "\n"
67311  printf "Configuration summary:\n"
67312  printf "* Debug level:    $DEBUG_LEVEL\n"
67313  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67314  printf "* JDK variant:    $JDK_VARIANT\n"
67315  printf "* JVM variants:   $JVM_VARIANTS\n"
67316  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67317  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67318
67319  printf "\n"
67320  printf "Tools summary:\n"
67321  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67322    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67323  fi
67324  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67325  if test "x$TOOLCHAIN_VERSION" != "x"; then
67326    print_version=" $TOOLCHAIN_VERSION"
67327  fi
67328  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67329  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67330  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67331
67332  printf "\n"
67333  printf "Build performance summary:\n"
67334  printf "* Cores to use:   $JOBS\n"
67335  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67336  if test "x$CCACHE_STATUS" != "x"; then
67337    printf "* ccache status:  $CCACHE_STATUS\n"
67338  fi
67339  printf "\n"
67340
67341  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67342    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67343    printf "will result in longer build times.\n"
67344    printf "\n"
67345  fi
67346
67347  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67348    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67349    printf "These are not respected, and will be ignored. It is recommended\n"
67350    printf "that you clean your environment. The following variables are set:\n"
67351    printf "$FOUND_ALT_VARIABLES\n"
67352    printf "\n"
67353  fi
67354
67355  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67356    printf "WARNING: Your build output directory is not on a local disk.\n"
67357    printf "This will severely degrade build performance!\n"
67358    printf "It is recommended that you create an output directory on a local disk,\n"
67359    printf "and run the configure script again from that directory.\n"
67360    printf "\n"
67361  fi
67362
67363  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67364    printf "WARNING: The result of this configuration has overridden an older\n"
67365    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67366    printf "proper build. Failure to do so might result in strange build problems.\n"
67367    printf "\n"
67368  fi
67369
67370  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67371    printf "WARNING: The result of this configuration was not saved.\n"
67372    printf "You should run without '--no-create | -n' to create the configuration.\n"
67373    printf "\n"
67374  fi
67375
67376
67377
67378  # Locate config.log.
67379  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67380    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67381  elif test -e "./config.log"; then
67382    CONFIG_LOG_PATH="."
67383  fi
67384
67385  if test -e "$CONFIG_LOG_PATH/config.log"; then
67386    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67387    if test $? -eq 0; then
67388      printf "The following warnings were produced. Repeated here for convenience:\n"
67389      # We must quote sed expression (using []) to stop m4 from eating the [].
67390      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67391      printf "\n"
67392    fi
67393  fi
67394
67395